🎉
This commit is contained in:
Stephen Scott committed 2017-09-14 11:21:33 -06:00
1 parent 655fef1bf9
commit bcb4224205
6 files changed
+373 -290

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ Tip! Don't write this stuff manually.
-->
**Prettier 1.6.1**
**Prettier 1.7.0**
[Playground link](https://prettier.io/playground/#.....)
```sh
# Options (if any):
+6
View File
@@ -1,3 +1,9 @@
# 1.7.0
[link](https://github.com/jlongster/prettier/compare/1.6.1...1.7.0)
* [Release Notes](https://github.com/prettier/prettier/releases/tag/1.7.0)
# 1.6.1
[link](https://github.com/jlongster/prettier/compare/1.6.0...1.6.1)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "1.6.1",
"version": "1.7.0",
"description": "Prettier is an opinionated code formatter",
"bin": {
"prettier": "./bin/prettier.js"
+353 -284
View File
@@ -1,13 +1,13 @@
'use strict';var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}function _interopDefault(ex){return ex&&(typeof ex==='undefined'?'undefined':_typeof(ex))==='object'&&'default'in ex?ex['default']:ex;}var require$$0=_interopDefault(require('assert'));var require$$0$1=_interopDefault(require('path'));var os=_interopDefault(require('os'));var fs=_interopDefault(require('fs'));var util=_interopDefault(require('util'));var module$1=_interopDefault(require('module'));var index$2=function index$2(x){if(typeof x!=='string'){throw new TypeError('Expected a string, got '+(typeof x==='undefined'?'undefined':_typeof(x)));}// Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
// conversion translates it to FEFF (UTF-16 BOM)
if(x.charCodeAt(0)===0xFEFF){return x.slice(1);}return x;};function assertDoc(val){if(!(typeof val==="string"||val!=null&&typeof val.type==="string")){throw new Error("Value "+JSON.stringify(val)+" is not a valid document");}}function concat$1(parts){parts.forEach(assertDoc);// We cannot do this until we change `printJSXElement` to not
if(x.charCodeAt(0)===0xFEFF){return x.slice(1);}return x;};function assertDoc(val){/* istanbul ignore if */if(!(typeof val==="string"||val!=null&&typeof val.type==="string")){throw new Error("Value "+JSON.stringify(val)+" is not a valid document");}}function concat$1(parts){parts.forEach(assertDoc);// We cannot do this until we change `printJSXElement` to not
// access the internals of a document directly.
// if(parts.length === 1) {
// // If it's a single document, no need to concat it.
// return parts[0];
// }
return{type:"concat",parts:parts};}function indent$1(contents){assertDoc(contents);return{type:"indent",contents:contents};}function align(n,contents){assertDoc(contents);return{type:"align",contents:contents,n:n};}function group(contents,opts){opts=opts||{};assertDoc(contents);return{type:"group",contents:contents,break:!!opts.shouldBreak,expandedStates:opts.expandedStates};}function conditionalGroup(states,opts){return group(states[0],Object.assign(opts||{},{expandedStates:states}));}function fill(parts){parts.forEach(assertDoc);return{type:"fill",parts:parts};}function ifBreak(breakContents,flatContents){if(breakContents){assertDoc(breakContents);}if(flatContents){assertDoc(flatContents);}return{type:"if-break",breakContents:breakContents,flatContents:flatContents};}function lineSuffix$1(contents){assertDoc(contents);return{type:"line-suffix",contents:contents};}var lineSuffixBoundary={type:"line-suffix-boundary"};var breakParent$1={type:"break-parent"};var line={type:"line"};var softline={type:"line",soft:true};var hardline$1=concat$1([{type:"line",hard:true},breakParent$1]);var literalline=concat$1([{type:"line",hard:true,literal:true},breakParent$1]);var cursor$1={type:"cursor",placeholder:Symbol("cursor")};function join$1(sep,arr){var res=[];for(var _i2=0;_i2<arr.length;_i2++){if(_i2!==0){res.push(sep);}res.push(arr[_i2]);}return concat$1(res);}function addAlignmentToDoc(doc,size,tabWidth){var aligned=doc;if(size>0){// Use indent to add tabs for all the levels of tabs we need
for(var _i3=0;_i3<Math.floor(size/tabWidth);++_i3){aligned=indent$1(aligned);}// Use align for all the spaces that are needed
return{type:"concat",parts:parts};}function indent$1(contents){assertDoc(contents);return{type:"indent",contents:contents};}function align(n,contents){assertDoc(contents);return{type:"align",contents:contents,n:n};}function group(contents,opts){opts=opts||{};assertDoc(contents);return{type:"group",contents:contents,break:!!opts.shouldBreak,expandedStates:opts.expandedStates};}function conditionalGroup(states,opts){return group(states[0],Object.assign(opts||{},{expandedStates:states}));}function fill(parts){parts.forEach(assertDoc);return{type:"fill",parts:parts};}function ifBreak(breakContents,flatContents){if(breakContents){assertDoc(breakContents);}if(flatContents){assertDoc(flatContents);}return{type:"if-break",breakContents:breakContents,flatContents:flatContents};}function lineSuffix$1(contents){assertDoc(contents);return{type:"line-suffix",contents:contents};}var lineSuffixBoundary={type:"line-suffix-boundary"};var breakParent$1={type:"break-parent"};var line={type:"line"};var softline={type:"line",soft:true};var hardline$1=concat$1([{type:"line",hard:true},breakParent$1]);var literalline=concat$1([{type:"line",hard:true,literal:true},breakParent$1]);var cursor$1={type:"cursor",placeholder:Symbol("cursor")};function join$1(sep,arr){var res=[];for(var _i=0;_i<arr.length;_i++){if(_i!==0){res.push(sep);}res.push(arr[_i]);}return concat$1(res);}function addAlignmentToDoc(doc,size,tabWidth){var aligned=doc;if(size>0){// Use indent to add tabs for all the levels of tabs we need
for(var _i2=0;_i2<Math.floor(size/tabWidth);++_i2){aligned=indent$1(aligned);}// Use align for all the spaces that are needed
aligned=align(size%tabWidth,aligned);// size is absolute from 0 and not relative to the current
// indentation, so we use -Infinity to reset the indentation to 0
aligned=align(-Infinity,aligned);}return aligned;}var docBuilders$1={concat:concat$1,join:join$1,line:line,softline:softline,hardline:hardline$1,literalline:literalline,group:group,conditionalGroup:conditionalGroup,fill:fill,lineSuffix:lineSuffix$1,lineSuffixBoundary:lineSuffixBoundary,cursor:cursor$1,breakParent:breakParent$1,ifBreak:ifBreak,indent:indent$1,align:align,addAlignmentToDoc:addAlignmentToDoc};function isExportDeclaration(node){if(node){switch(node.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return true;}}return false;}function getParentExportDeclaration(path){var parentNode=path.getParentNode();if(path.getName()==="declaration"&&isExportDeclaration(parentNode)){return parentNode;}return null;}function getPenultimate(arr){if(arr.length>1){return arr[arr.length-2];}return null;}function getLast(arr){if(arr.length>0){return arr[arr.length-1];}return null;}function skip(chars){return function(text,index,opts){var backwards=opts&&opts.backwards;// Allow `skip` functions to be threaded together without having
@@ -16,14 +16,14 @@ if(index===false){return false;}var length=text.length;var cursor=index;while(cu
// out-of-bounds cursor. It's up to the caller to handle this
// correctly. We don't want to indicate `false` though if it
// actually skipped valid characters.
return cursor;}return false;};}var skipWhitespace=skip(/\s/);var skipSpaces=skip(" \t");var skipToLineEnd=skip(",; \t");var skipEverythingButNewLine=skip(/[^\r\n]/);function skipInlineComment(text,index){if(index===false){return false;}if(text.charAt(index)==="/"&&text.charAt(index+1)==="*"){for(var _i4=index+2;_i4<text.length;++_i4){if(text.charAt(_i4)==="*"&&text.charAt(_i4+1)==="/"){return _i4+2;}}}return index;}function skipTrailingComment(text,index){if(index===false){return false;}if(text.charAt(index)==="/"&&text.charAt(index+1)==="/"){return skipEverythingButNewLine(text,index);}return index;}// This one doesn't use the above helper function because it wants to
return cursor;}return false;};}var skipWhitespace=skip(/\s/);var skipSpaces=skip(" \t");var skipToLineEnd=skip(",; \t");var skipEverythingButNewLine=skip(/[^\r\n]/);function skipInlineComment(text,index){if(index===false){return false;}if(text.charAt(index)==="/"&&text.charAt(index+1)==="*"){for(var _i3=index+2;_i3<text.length;++_i3){if(text.charAt(_i3)==="*"&&text.charAt(_i3+1)==="/"){return _i3+2;}}}return index;}function skipTrailingComment(text,index){if(index===false){return false;}if(text.charAt(index)==="/"&&text.charAt(index+1)==="/"){return skipEverythingButNewLine(text,index);}return index;}// This one doesn't use the above helper function because it wants to
// test \r\n in order and `skip` doesn't support ordering and we only
// want to skip one newline. It's simple to implement.
function skipNewline(text,index,opts){var backwards=opts&&opts.backwards;if(index===false){return false;}var atIndex=text.charAt(index);if(backwards){if(text.charAt(index-1)==="\r"&&atIndex==="\n"){return index-2;}if(atIndex==="\n"||atIndex==="\r"||atIndex==='\u2028'||atIndex==='\u2029'){return index-1;}}else{if(atIndex==="\r"&&text.charAt(index+1)==="\n"){return index+2;}if(atIndex==="\n"||atIndex==="\r"||atIndex==='\u2028'||atIndex==='\u2029'){return index+1;}}return index;}function hasNewline(text,index,opts){opts=opts||{};var idx=skipSpaces(text,opts.backwards?index-1:index,opts);var idx2=skipNewline(text,idx,opts);return idx!==idx2;}function hasNewlineInRange(text,start,end){for(var _i5=start;_i5<end;++_i5){if(text.charAt(_i5)==="\n"){return true;}}return false;}// Note: this function doesn't ignore leading comments unlike isNextLineEmpty
function skipNewline(text,index,opts){var backwards=opts&&opts.backwards;if(index===false){return false;}var atIndex=text.charAt(index);if(backwards){if(text.charAt(index-1)==="\r"&&atIndex==="\n"){return index-2;}if(atIndex==="\n"||atIndex==="\r"||atIndex==='\u2028'||atIndex==='\u2029'){return index-1;}}else{if(atIndex==="\r"&&text.charAt(index+1)==="\n"){return index+2;}if(atIndex==="\n"||atIndex==="\r"||atIndex==='\u2028'||atIndex==='\u2029'){return index+1;}}return index;}function hasNewline(text,index,opts){opts=opts||{};var idx=skipSpaces(text,opts.backwards?index-1:index,opts);var idx2=skipNewline(text,idx,opts);return idx!==idx2;}function hasNewlineInRange(text,start,end){for(var _i4=start;_i4<end;++_i4){if(text.charAt(_i4)==="\n"){return true;}}return false;}// Note: this function doesn't ignore leading comments unlike isNextLineEmpty
function isPreviousLineEmpty(text,node){var idx=locStart$1(node)-1;idx=skipSpaces(text,idx,{backwards:true});idx=skipNewline(text,idx,{backwards:true});idx=skipSpaces(text,idx,{backwards:true});var idx2=skipNewline(text,idx,{backwards:true});return idx!==idx2;}function isNextLineEmpty(text,node){var oldIdx=null;var idx=locEnd$1(node);while(idx!==oldIdx){// We need to skip all the potential trailing inline comments
oldIdx=idx;idx=skipToLineEnd(text,idx);idx=skipInlineComment(text,idx);idx=skipSpaces(text,idx);}idx=skipTrailingComment(text,idx);idx=skipNewline(text,idx);return hasNewline(text,idx);}function getNextNonSpaceNonCommentCharacter$1(text,node){var oldIdx=null;var idx=locEnd$1(node);while(idx!==oldIdx){oldIdx=idx;idx=skipSpaces(text,idx);idx=skipInlineComment(text,idx);idx=skipTrailingComment(text,idx);idx=skipNewline(text,idx);}return text.charAt(idx);}function hasSpaces(text,index,opts){opts=opts||{};var idx=skipSpaces(text,opts.backwards?index-1:index,opts);return idx!==index;}function locStart$1(node){// Handle nodes with decorators. They should start at the first decorator
if(node.declaration&&node.declaration.decorators&&node.declaration.decorators.length>0){return locStart$1(node.declaration.decorators[0]);}if(node.decorators&&node.decorators.length>0){return locStart$1(node.decorators[0]);}if(node.__location){return node.__location.startOffset;}if(node.range){return node.range[0];}if(typeof node.start==="number"){return node.start;}if(node.source){return lineColumnToIndex(node.source.start,node.source.input.css)-1;}if(node.loc){return node.loc.start;}}function locEnd$1(node){var endNode=node.nodes&&getLast(node.nodes);if(endNode&&node.source&&!node.source.end){node=endNode;}var loc=void 0;if(node.range){loc=node.range[1];}else if(typeof node.end==="number"){loc=node.end;}else if(node.source){loc=lineColumnToIndex(node.source.end,node.source.input.css);}if(node.__location){return node.__location.endOffset;}if(node.typeAnnotation){return Math.max(loc,locEnd$1(node.typeAnnotation));}if(node.loc&&!loc){return node.loc.end;}return loc;}// Super inefficient, needs to be cached.
function lineColumnToIndex(lineColumn,text){var index=0;for(var _i6=0;_i6<lineColumn.line-1;++_i6){index=text.indexOf("\n",index)+1;if(index===-1){return-1;}}return index+lineColumn.column;}function setLocStart(node,index){if(node.range){node.range[0]=index;}else{node.start=index;}}function setLocEnd(node,index){if(node.range){node.range[1]=index;}else{node.end=index;}}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i;});});function getPrecedence(op){return PRECEDENCE[op];}var equalityOperators={"==":true,"!=":true,"===":true,"!==":true};var multiplicativeOperators={"*":true,"/":true,"%":true};var bitshiftOperators={">>":true,">>>":true,"<<":true};function shouldFlatten(parentOp,nodeOp){if(getPrecedence(nodeOp)!==getPrecedence(parentOp)){return false;}// ** is right-associative
function lineColumnToIndex(lineColumn,text){var index=0;for(var _i5=0;_i5<lineColumn.line-1;++_i5){index=text.indexOf("\n",index)+1;if(index===-1){return-1;}}return index+lineColumn.column;}function setLocStart(node,index){if(node.range){node.range[0]=index;}else{node.start=index;}}function setLocEnd(node,index){if(node.range){node.range[1]=index;}else{node.end=index;}}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i;});});function getPrecedence(op){return PRECEDENCE[op];}var equalityOperators={"==":true,"!=":true,"===":true,"!==":true};var multiplicativeOperators={"*":true,"/":true,"%":true};var bitshiftOperators={">>":true,">>>":true,"<<":true};function shouldFlatten(parentOp,nodeOp){if(getPrecedence(nodeOp)!==getPrecedence(parentOp)){return false;}// ** is right-associative
// x ** y ** z --> x ** (y ** z)
if(parentOp==="**"){return false;}// x == y == z --> (x == y) == z
if(equalityOperators[parentOp]&&equalityOperators[nodeOp]){return false;}// x * y % z --> (x * y) % z
@@ -35,7 +35,7 @@ case"ObjectPattern":return!forbidFunctionAndClass;case"FunctionExpression":case"
return false;}return startsWithNoLookaheadToken(node.tag,forbidFunctionAndClass);case"CallExpression":if(node.callee.type==="FunctionExpression"){// IIFEs are always already parenthesized
return false;}return startsWithNoLookaheadToken(node.callee,forbidFunctionAndClass);case"ConditionalExpression":return startsWithNoLookaheadToken(node.test,forbidFunctionAndClass);case"UpdateExpression":return!node.prefix&&startsWithNoLookaheadToken(node.argument,forbidFunctionAndClass);case"BindExpression":return node.object&&startsWithNoLookaheadToken(node.object,forbidFunctionAndClass);case"SequenceExpression":return startsWithNoLookaheadToken(node.expressions[0],forbidFunctionAndClass);case"TSAsExpression":return startsWithNoLookaheadToken(node.expression,forbidFunctionAndClass);default:return false;}}function getLeftMost(node){if(node.left){return getLeftMost(node.left);}return node;}function hasBlockComments(node){return node.comments&&node.comments.some(isBlockComment);}function isBlockComment(comment){return comment.type==="Block"||comment.type==="CommentBlock";}function hasClosureCompilerTypeCastComment(text,node){// https://github.com/google/closure-compiler/wiki/Annotating-Types#type-casts
// Syntax example: var x = /** @type {string} */ (fruit);
return node.comments&&node.comments.some(function(comment){return comment.leading&&isBlockComment(comment)&&comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/)&&getNextNonSpaceNonCommentCharacter$1(text,comment)==="(";});}function getAlignmentSize(value,tabWidth,startIndex){startIndex=startIndex||0;var size=0;for(var _i7=startIndex;_i7<value.length;++_i7){if(value[_i7]==="\t"){// Tabs behave in a way that they are aligned to the nearest
return node.comments&&node.comments.some(function(comment){return comment.leading&&isBlockComment(comment)&&comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/)&&getNextNonSpaceNonCommentCharacter$1(text,comment)==="(";});}function getAlignmentSize(value,tabWidth,startIndex){startIndex=startIndex||0;var size=0;for(var _i6=startIndex;_i6<value.length;++_i6){if(value[_i6]==="\t"){// Tabs behave in a way that they are aligned to the nearest
// multiple of tabWidth:
// 0 -> 4, 1 -> 4, 2 -> 4, 3 -> 4
// 4 -> 8, 5 -> 8, 6 -> 8, 7 -> 8 ...
@@ -66,14 +66,14 @@ if(escaped===otherQuote){return escaped;}// If we matched an unescaped quote and
if(quote===enclosingQuote){return"\\"+quote;}if(quote){return quote;}// Unescape any unnecessarily escaped character.
// Adapted from https://github.com/eslint/eslint/blob/de0b4ad7bd820ade41b1f606008bea68683dc11a/lib/rules/no-useless-escape.js#L27
return unescapeUnnecessaryEscapes&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(escaped)?escaped:"\\"+escaped;});return enclosingQuote+newContent+enclosingQuote;}function printNumber(rawNumber){return rawNumber.toLowerCase// Remove unnecessary plus and zeroes from scientific notation.
().replace(/^([\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3"// Remove unnecessary scientific notation (1e0).
).replace(/^([\d.]+)e[+-]?0+$/,"$1"// Make sure numbers always start with a digit.
).replace(/^\./,"0."// Remove extraneous trailing decimal zeroes.
().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3"// Remove unnecessary scientific notation (1e0).
).replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1"// Make sure numbers always start with a digit.
).replace(/^([+-])?\./,"$10."// Remove extraneous trailing decimal zeroes.
).replace(/(\.\d+?)0+(?=e|$)/,"$1"// Remove trailing dot.
).replace(/\.(?=e|$)/,"");}var util$3={getPrecedence:getPrecedence,shouldFlatten:shouldFlatten,isBitwiseOperator:isBitwiseOperator,isExportDeclaration:isExportDeclaration,getParentExportDeclaration:getParentExportDeclaration,getPenultimate:getPenultimate,getLast:getLast,getNextNonSpaceNonCommentCharacter:getNextNonSpaceNonCommentCharacter$1,skipWhitespace:skipWhitespace,skipSpaces:skipSpaces,skipNewline:skipNewline,isNextLineEmpty:isNextLineEmpty,isPreviousLineEmpty:isPreviousLineEmpty,hasNewline:hasNewline,hasNewlineInRange:hasNewlineInRange,hasSpaces:hasSpaces,locStart:locStart$1,locEnd:locEnd$1,setLocStart:setLocStart,setLocEnd:setLocEnd,startsWithNoLookaheadToken:startsWithNoLookaheadToken,hasBlockComments:hasBlockComments,isBlockComment:isBlockComment,hasClosureCompilerTypeCastComment:hasClosureCompilerTypeCastComment,getAlignmentSize:getAlignmentSize,printString:printString,printNumber:printNumber};var assert=require$$0;var docBuilders=docBuilders$1;var concat=docBuilders.concat;var hardline=docBuilders.hardline;var breakParent=docBuilders.breakParent;var indent=docBuilders.indent;var lineSuffix=docBuilders.lineSuffix;var join=docBuilders.join;var cursor=docBuilders.cursor;var util$2=util$3;var childNodesCacheKey=Symbol("child-nodes");var locStart=util$2.locStart;var locEnd=util$2.locEnd;var getNextNonSpaceNonCommentCharacter=util$2.getNextNonSpaceNonCommentCharacter;function getSortedChildNodes(node,text,resultArray){if(!node){return;}if(resultArray){if(node&&(node.type&&node.type!=="CommentBlock"&&node.type!=="CommentLine"&&node.type!=="Line"&&node.type!=="Block"&&node.type!=="EmptyStatement"&&node.type!=="TemplateElement"||node.kind&&node.kind!=="Comment")){// This reverse insertion sort almost always takes constant
).replace(/\.(?=e|$)/,"");}var util$3={getPrecedence:getPrecedence,shouldFlatten:shouldFlatten,isBitwiseOperator:isBitwiseOperator,isExportDeclaration:isExportDeclaration,getParentExportDeclaration:getParentExportDeclaration,getPenultimate:getPenultimate,getLast:getLast,getNextNonSpaceNonCommentCharacter:getNextNonSpaceNonCommentCharacter$1,skipWhitespace:skipWhitespace,skipSpaces:skipSpaces,skipNewline:skipNewline,isNextLineEmpty:isNextLineEmpty,isPreviousLineEmpty:isPreviousLineEmpty,hasNewline:hasNewline,hasNewlineInRange:hasNewlineInRange,hasSpaces:hasSpaces,locStart:locStart$1,locEnd:locEnd$1,setLocStart:setLocStart,setLocEnd:setLocEnd,startsWithNoLookaheadToken:startsWithNoLookaheadToken,hasBlockComments:hasBlockComments,isBlockComment:isBlockComment,hasClosureCompilerTypeCastComment:hasClosureCompilerTypeCastComment,getAlignmentSize:getAlignmentSize,printString:printString,printNumber:printNumber};var assert=require$$0;var docBuilders=docBuilders$1;var concat=docBuilders.concat;var hardline=docBuilders.hardline;var breakParent=docBuilders.breakParent;var indent=docBuilders.indent;var lineSuffix=docBuilders.lineSuffix;var join=docBuilders.join;var cursor=docBuilders.cursor;var util$2=util$3;var childNodesCacheKey=Symbol("child-nodes");var locStart=util$2.locStart;var locEnd=util$2.locEnd;var getNextNonSpaceNonCommentCharacter=util$2.getNextNonSpaceNonCommentCharacter;function getSortedChildNodes(node,text,resultArray){if(!node){return;}if(resultArray){if(node&&(node.type&&node.type!=="CommentBlock"&&node.type!=="CommentLine"&&node.type!=="Line"&&node.type!=="Block"&&node.type!=="EmptyStatement"&&node.type!=="TemplateElement"&&node.type!=="Import"&&!(node.callee&&node.callee.type==="Import")||node.kind&&node.kind!=="Comment")){// This reverse insertion sort almost always takes constant
// time because we almost always (maybe always?) append the
// nodes in order anyway.
var _i8=void 0;for(_i8=resultArray.length-1;_i8>=0;--_i8){if(locStart(resultArray[_i8])<=locStart(node)&&locEnd(resultArray[_i8])<=locEnd(node)){break;}}resultArray.splice(_i8+1,0,node);return;}}else if(node[childNodesCacheKey]){return node[childNodesCacheKey];}var names=void 0;if(node&&(typeof node==='undefined'?'undefined':_typeof(node))==="object"){names=Object.keys(node).filter(function(n){return n!=="enclosingNode"&&n!=="precedingNode"&&n!=="followingNode";});}else{return;}if(!resultArray){Object.defineProperty(node,childNodesCacheKey,{value:resultArray=[],enumerable:false});}for(var _i9=0,nameCount=names.length;_i9<nameCount;++_i9){getSortedChildNodes(node[names[_i9]],text,resultArray);}return resultArray;}// As efficiently as possible, decorate the comment object with
var _i7=void 0;for(_i7=resultArray.length-1;_i7>=0;--_i7){if(locStart(resultArray[_i7])<=locStart(node)&&locEnd(resultArray[_i7])<=locEnd(node)){break;}}resultArray.splice(_i7+1,0,node);return;}}else if(node[childNodesCacheKey]){return node[childNodesCacheKey];}var names=void 0;if(node&&(typeof node==='undefined'?'undefined':_typeof(node))==="object"){names=Object.keys(node).filter(function(n){return n!=="enclosingNode"&&n!=="precedingNode"&&n!=="followingNode";});}else{return;}if(!resultArray){Object.defineProperty(node,childNodesCacheKey,{value:resultArray=[],enumerable:false});}for(var _i8=0,nameCount=names.length;_i8<nameCount;++_i8){getSortedChildNodes(node[names[_i8]],text,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,text){var childNodes=getSortedChildNodes(node,text);var precedingNode=void 0;var followingNode=void 0;// Time to dust off the old binary search robes and wizard hat.
@@ -87,25 +87,25 @@ precedingNode=child;left=middle+1;continue;}if(locEnd(comment)-locStart(child)<=
// 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.
followingNode=child;right=middle;continue;}throw new Error("Comment location overlaps with node location");}// We don't want comments inside of different expressions inside of the same
followingNode=child;right=middle;continue;}/* istanbul ignore next */throw new Error("Comment location overlaps with node location");}// We don't want comments inside of different expressions inside of the same
// template literal to move to another expression.
if(comment.enclosingNode&&comment.enclosingNode.type==="TemplateLiteral"){var quasis=comment.enclosingNode.quasis;var commentIndex=findExpressionIndexForComment(quasis,comment);if(precedingNode&&findExpressionIndexForComment(quasis,precedingNode)!==commentIndex){precedingNode=null;}if(followingNode&&findExpressionIndexForComment(quasis,followingNode)!==commentIndex){followingNode=null;}}if(precedingNode){comment.precedingNode=precedingNode;}if(followingNode){comment.followingNode=followingNode;}}function attach(comments,ast,text){if(!Array.isArray(comments)){return;}var tiesToBreak=[];comments.forEach(function(comment,i){decorateComment(ast,comment,text);var precedingNode=comment.precedingNode;var enclosingNode=comment.enclosingNode;var followingNode=comment.followingNode;var isLastComment=comments.length-1===i;if(util$2.hasNewline(text,locStart(comment),{backwards:true})){// If a comment exists on its own line, prefer a leading comment.
// We also need to check if it's the first line of the file.
if(handleLastFunctionArgComments(text,precedingNode,enclosingNode,followingNode,comment)||handleMemberExpressionComments(enclosingNode,followingNode,comment)||handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment)||handleTryStatementComments(enclosingNode,followingNode,comment)||handleClassComments(enclosingNode,precedingNode,followingNode,comment)||handleImportSpecifierComments(enclosingNode,comment)||handleObjectPropertyComments(enclosingNode,comment)||handleForComments(enclosingNode,precedingNode,comment)||handleUnionTypeComments(precedingNode,enclosingNode,followingNode,comment)||handleOnlyComments(enclosingNode,ast,comment,isLastComment)||handleImportDeclarationComments(text,enclosingNode,precedingNode,comment)||handleAssignmentPatternComments(enclosingNode,comment)){// We're good
}else if(followingNode){// Always a leading comment.
addLeadingComment(followingNode,comment);}else if(precedingNode){addTrailingComment(precedingNode,comment);}else if(enclosingNode){addDanglingComment(enclosingNode,comment);}else{// There are no nodes, let's attach it to the root of the ast
addDanglingComment(ast,comment);}}else if(util$2.hasNewline(text,locEnd(comment))){if(handleLastFunctionArgComments(text,precedingNode,enclosingNode,followingNode,comment)||handleConditionalExpressionComments(enclosingNode,precedingNode,followingNode,comment,text)||handleImportSpecifierComments(enclosingNode,comment)||handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment)||handleClassComments(enclosingNode,precedingNode,followingNode,comment)||handleLabeledStatementComments(enclosingNode,comment)||handleCallExpressionComments(precedingNode,enclosingNode,comment)||handlePropertyComments(enclosingNode,comment)||handleExportNamedDeclarationComments(enclosingNode,comment)||handleOnlyComments(enclosingNode,ast,comment,isLastComment)||handleClassMethodComments(enclosingNode,comment)||handleTypeAliasComments(enclosingNode,followingNode,comment)||handleVariableDeclaratorComments(enclosingNode,followingNode,comment)){// We're good
/* istanbul ignore next */addDanglingComment(ast,comment);}}else if(util$2.hasNewline(text,locEnd(comment))){if(handleLastFunctionArgComments(text,precedingNode,enclosingNode,followingNode,comment)||handleConditionalExpressionComments(enclosingNode,precedingNode,followingNode,comment,text)||handleImportSpecifierComments(enclosingNode,comment)||handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment)||handleClassComments(enclosingNode,precedingNode,followingNode,comment)||handleLabeledStatementComments(enclosingNode,comment)||handleCallExpressionComments(precedingNode,enclosingNode,comment)||handlePropertyComments(enclosingNode,comment)||handleExportNamedDeclarationComments(enclosingNode,comment)||handleOnlyComments(enclosingNode,ast,comment,isLastComment)||handleClassMethodComments(enclosingNode,comment)||handleTypeAliasComments(enclosingNode,followingNode,comment)||handleVariableDeclaratorComments(enclosingNode,followingNode,comment)){// We're good
}else if(precedingNode){// There is content before this comment on the same line, but
// none after it, so prefer a trailing comment of the previous node.
addTrailingComment(precedingNode,comment);}else if(followingNode){addLeadingComment(followingNode,comment);}else if(enclosingNode){addDanglingComment(enclosingNode,comment);}else{// There are no nodes, let's attach it to the root of the ast
addDanglingComment(ast,comment);}}else{if(handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment)||handleObjectPropertyAssignment(enclosingNode,precedingNode,comment)||handleCommentInEmptyParens(text,enclosingNode,comment)||handleMethodNameComments(text,enclosingNode,precedingNode,comment)||handleOnlyComments(enclosingNode,ast,comment,isLastComment)){// We're good
/* istanbul ignore next */addDanglingComment(ast,comment);}}else{if(handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment)||handleObjectPropertyAssignment(enclosingNode,precedingNode,comment)||handleCommentInEmptyParens(text,enclosingNode,comment)||handleMethodNameComments(text,enclosingNode,precedingNode,comment)||handleOnlyComments(enclosingNode,ast,comment,isLastComment)){// We're good
}else if(precedingNode&&followingNode){// Otherwise, text exists both before and after the comment on
// the same line. If there is both a preceding and following
// node, use a tie-breaking algorithm to determine if it should
// be attached to the next or previous node. In the last case,
// simply attach the right node;
var tieCount=tiesToBreak.length;if(tieCount>0){var lastTie=tiesToBreak[tieCount-1];if(lastTie.followingNode!==comment.followingNode){breakTies(tiesToBreak,text);}}tiesToBreak.push(comment);}else if(precedingNode){addTrailingComment(precedingNode,comment);}else if(followingNode){addLeadingComment(followingNode,comment);}else if(enclosingNode){addDanglingComment(enclosingNode,comment);}else{// There are no nodes, let's attach it to the root of the ast
addDanglingComment(ast,comment);}}});breakTies(tiesToBreak,text);comments.forEach(function(comment){// These node references were useful for breaking ties, but we
/* istanbul ignore next */addDanglingComment(ast,comment);}}});breakTies(tiesToBreak,text);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,text){var tieCount=tiesToBreak.length;if(tieCount===0){return;}var precedingNode=tiesToBreak[0].precedingNode;var followingNode=tiesToBreak[0].followingNode;var gapEndPos=locStart(followingNode);// Iterate backwards through tiesToBreak, examining the gaps
@@ -135,12 +135,16 @@ if(node.type==="JSXText"){comment.printed=true;}}function addLeadingComment(node
// ...
// }
function handleIfStatementComments(text,precedingNode,enclosingNode,followingNode,comment){if(!enclosingNode||enclosingNode.type!=="IfStatement"||!followingNode){return false;}// We unfortunately have no way using the AST or location of nodes to know
// if the comment is positioned before or after the condition parenthesis:
// if the comment is positioned before the condition parenthesis:
// if (a /* comment */) {}
// if (a) /* comment */ {}
// The only workaround I found is to look at the next character to see if
// it is a ).
if(getNextNonSpaceNonCommentCharacter(text,comment)===")"){addTrailingComment(precedingNode,comment);return true;}if(followingNode.type==="BlockStatement"){addBlockStatementFirstComment(followingNode,comment);return true;}if(followingNode.type==="IfStatement"){addBlockOrNotComment(followingNode.consequent,comment);return true;}return false;}// Same as IfStatement but for TryStatement
var nextCharacter=getNextNonSpaceNonCommentCharacter(text,comment);if(nextCharacter===")"){addTrailingComment(precedingNode,comment);return true;}if(followingNode.type==="BlockStatement"){addBlockStatementFirstComment(followingNode,comment);return true;}if(followingNode.type==="IfStatement"){addBlockOrNotComment(followingNode.consequent,comment);return true;}// For comments positioned after the condition parenthesis in an if statement
// before the consequent with or without brackets on, such as
// if (a) /* comment */ {} or if (a) /* comment */ true,
// we look at the next character to see if it is a { or if the following node
// is the consequent for the if statement
if(nextCharacter==="{"||enclosingNode.consequent===followingNode){addLeadingComment(followingNode,comment);return true;}return false;}// Same as IfStatement but for TryStatement
function handleTryStatementComments(enclosingNode,followingNode,comment){if(!enclosingNode||enclosingNode.type!=="TryStatement"||!followingNode){return false;}if(followingNode.type==="BlockStatement"){addBlockStatementFirstComment(followingNode,comment);return true;}if(followingNode.type==="TryStatement"){addBlockOrNotComment(followingNode.finalizer,comment);return true;}if(followingNode.type==="CatchClause"){addBlockOrNotComment(followingNode.body,comment);return true;}return false;}function handleMemberExpressionComments(enclosingNode,followingNode,comment){if(enclosingNode&&enclosingNode.type==="MemberExpression"&&followingNode&&followingNode.type==="Identifier"){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleConditionalExpressionComments(enclosingNode,precedingNode,followingNode,comment,text){var isSameLineAsPrecedingNode=precedingNode&&!util$2.hasNewlineInRange(text,locEnd(precedingNode),locStart(comment));if((!precedingNode||!isSameLineAsPrecedingNode)&&enclosingNode&&enclosingNode.type==="ConditionalExpression"&&followingNode){addLeadingComment(followingNode,comment);return true;}return false;}function handleObjectPropertyAssignment(enclosingNode,precedingNode,comment){if(enclosingNode&&(enclosingNode.type==="ObjectProperty"||enclosingNode.type==="Property")&&enclosingNode.shorthand&&enclosingNode.key===precedingNode&&enclosingNode.value.type==="AssignmentPattern"){addTrailingComment(enclosingNode.value.left,comment);return true;}return false;}function handleClassComments(enclosingNode,precedingNode,followingNode,comment){if(enclosingNode&&(enclosingNode.type==="ClassDeclaration"||enclosingNode.type==="ClassExpression")&&enclosingNode.decorators&&enclosingNode.decorators.length>0&&!(followingNode&&followingNode.type==="Decorator")){if(!enclosingNode.decorators||enclosingNode.decorators.length===0){addLeadingComment(enclosingNode,comment);}else{addTrailingComment(enclosingNode.decorators[enclosingNode.decorators.length-1],comment);}return true;}return false;}function handleMethodNameComments(text,enclosingNode,precedingNode,comment){// This is only needed for estree parsers (flow, typescript) to attach
// after a method name:
// obj = { fn /*comment*/() {} };
@@ -152,9 +156,9 @@ if(enclosingNode&&((enclosingNode.type==="FunctionDeclaration"||enclosingNode.ty
if(precedingNode&&precedingNode.type==="FunctionTypeParam"&&enclosingNode&&enclosingNode.type==="FunctionTypeAnnotation"&&followingNode&&followingNode.type!=="FunctionTypeParam"){addTrailingComment(precedingNode,comment);return true;}// Real functions
if(precedingNode&&(precedingNode.type==="Identifier"||precedingNode.type==="AssignmentPattern")&&enclosingNode&&(enclosingNode.type==="ArrowFunctionExpression"||enclosingNode.type==="FunctionExpression"||enclosingNode.type==="FunctionDeclaration"||enclosingNode.type==="ObjectMethod"||enclosingNode.type==="ClassMethod")&&getNextNonSpaceNonCommentCharacter(text,comment)===")"){addTrailingComment(precedingNode,comment);return true;}return false;}function handleImportSpecifierComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="ImportSpecifier"){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleObjectPropertyComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="ObjectProperty"){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleLabeledStatementComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="LabeledStatement"){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleCallExpressionComments(precedingNode,enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="CallExpression"&&precedingNode&&enclosingNode.callee===precedingNode&&enclosingNode.arguments.length>0){addLeadingComment(enclosingNode.arguments[0],comment);return true;}return false;}function handleUnionTypeComments(precedingNode,enclosingNode,followingNode,comment){if(enclosingNode&&(enclosingNode.type==="UnionTypeAnnotation"||enclosingNode.type==="TSUnionType")){addTrailingComment(precedingNode,comment);return true;}return false;}function handlePropertyComments(enclosingNode,comment){if(enclosingNode&&(enclosingNode.type==="Property"||enclosingNode.type==="ObjectProperty")){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleExportNamedDeclarationComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="ExportNamedDeclaration"){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleOnlyComments(enclosingNode,ast,comment,isLastComment){// With Flow the enclosingNode is undefined so use the AST instead.
if(ast&&ast.body&&ast.body.length===0){if(isLastComment){addDanglingComment(ast,comment);}else{addLeadingComment(ast,comment);}return true;}else if(enclosingNode&&enclosingNode.type==="Program"&&enclosingNode.body.length===0&&enclosingNode.directives&&enclosingNode.directives.length===0){if(isLastComment){addDanglingComment(enclosingNode,comment);}else{addLeadingComment(enclosingNode,comment);}return true;}return false;}function handleForComments(enclosingNode,precedingNode,comment){if(enclosingNode&&(enclosingNode.type==="ForInStatement"||enclosingNode.type==="ForOfStatement")){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleImportDeclarationComments(text,enclosingNode,precedingNode,comment){if(precedingNode&&enclosingNode&&enclosingNode.type==="ImportDeclaration"&&util$2.hasNewline(text,util$2.locEnd(comment))){addTrailingComment(precedingNode,comment);return true;}return false;}function handleAssignmentPatternComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="AssignmentPattern"){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleClassMethodComments(enclosingNode,comment){if(enclosingNode&&enclosingNode.type==="ClassMethod"){addTrailingComment(enclosingNode,comment);return true;}return false;}function handleTypeAliasComments(enclosingNode,followingNode,comment){if(enclosingNode&&enclosingNode.type==="TypeAlias"){addLeadingComment(enclosingNode,comment);return true;}return false;}function handleVariableDeclaratorComments(enclosingNode,followingNode,comment){if(enclosingNode&&enclosingNode.type==="VariableDeclarator"&&followingNode&&(followingNode.type==="ObjectExpression"||followingNode.type==="ArrayExpression")){addLeadingComment(followingNode,comment);return true;}return false;}function printComment(commentPath,options){var comment=commentPath.getValue();comment.printed=true;switch(comment.type||comment.kind){case"Comment":return"#"+comment.value.trimRight();case"CommentBlock":case"Block":return"/*"+comment.value+"*/";case"CommentLine":case"Line":// Print shebangs with the proper comment characters
if(options.originalText.slice(util$2.locStart(comment)).startsWith("#!")){return"#!"+comment.value.trimRight();}return"//"+comment.value.trimRight();default:throw new Error("Not a comment: "+JSON.stringify(comment));}}function findExpressionIndexForComment(quasis,comment){var startPos=locStart(comment)-1;for(var _i10=1;_i10<quasis.length;++_i10){if(startPos<getQuasiRange(quasis[_i10]).start){return _i10-1;}}// We haven't found it, it probably means that some of the locations are off.
if(options.originalText.slice(util$2.locStart(comment)).startsWith("#!")){return"#!"+comment.value.trimRight();}return"//"+comment.value.trimRight();default:throw new Error("Not a comment: "+JSON.stringify(comment));}}function findExpressionIndexForComment(quasis,comment){var startPos=locStart(comment)-1;for(var _i9=1;_i9<quasis.length;++_i9){if(startPos<getQuasiRange(quasis[_i9]).start){return _i9-1;}}// We haven't found it, it probably means that some of the locations are off.
// Let's just return the first one.
return 0;}function getQuasiRange(expr){if(expr.start!==undefined){// Babylon
/* istanbul ignore next */return 0;}function getQuasiRange(expr){if(expr.start!==undefined){// Babylon
return{start:expr.start,end:expr.end};}// Flow
return{start:expr.range[0],end:expr.range[1]};}function printLeadingComment(commentPath,print,options){var comment=commentPath.getValue();var contents=printComment(commentPath,options);if(!contents){return"";}var isBlock=util$2.isBlockComment(comment);// Leading block comments should see if they need to stay on the
// same line or not.
@@ -170,27 +174,27 @@ if(isBlock){return concat([contents,util$2.hasNewline(options.originalText,locEn
// if this a comment on its own line; normal trailing comments are
// always at the end of another expression.
var isLineBeforeEmpty=util$2.isPreviousLineEmpty(options.originalText,comment);return lineSuffix(concat([hardline,isLineBeforeEmpty?hardline:"",contents]));}else if(isBlock){// Trailing block comments never need a newline
return concat([" ",contents]);}return concat([lineSuffix(" "+contents),!isBlock?breakParent:""]);}function printDanglingComments(path,options,sameIndent){var parts=[];var node=path.getValue();if(!node||!node.comments){return"";}path.each(function(commentPath){var comment=commentPath.getValue();if(comment&&!comment.leading&&!comment.trailing){parts.push(printComment(commentPath,options));}},"comments");if(parts.length===0){return"";}if(sameIndent){return join(hardline,parts);}return indent(concat([hardline,join(hardline,parts)]));}function prependCursorPlaceholder(path,options,printed){if(path.getNode()===options.cursorNode&&path.getValue()){return concat([cursor,printed]);}return printed;}function printComments(path,print,options,needsSemi){var value=path.getValue();var printed=print(path);var comments=value&&value.comments;if(!comments||comments.length===0){return prependCursorPlaceholder(path,options,printed);}var leadingParts=[];var trailingParts=[needsSemi?";":"",printed];path.each(function(commentPath){var comment=commentPath.getValue();var leading=comment.leading;var trailing=comment.trailing;if(leading){var contents=printLeadingComment(commentPath,print,options);if(!contents){return;}leadingParts.push(contents);var text=options.originalText;if(util$2.hasNewline(text,util$2.skipNewline(text,util$2.locEnd(comment)))){leadingParts.push(hardline);}}else if(trailing){trailingParts.push(printTrailingComment(commentPath,print,options));}},"comments");return prependCursorPlaceholder(path,options,concat(leadingParts.concat(trailingParts)));}var comments$1={attach:attach,printComments:printComments,printDanglingComments:printDanglingComments,getSortedChildNodes:getSortedChildNodes};var name="prettier";var version$1="1.6.1";var description="Prettier is an opinionated code formatter";var bin={"prettier":"./bin/prettier.js"};var repository="prettier/prettier";var homepage="https://prettier.io";var author="James Long";var license="MIT";var main="./index.js";var dependencies={"babel-code-frame":"7.0.0-alpha.12","babylon":"7.0.0-beta.22","chalk":"2.0.1","cosmiconfig":"2.2.2","dashify":"0.2.2","diff":"3.2.0","esutils":"2.0.2","flow-parser":"0.51.0","get-stream":"3.0.0","globby":"^6.1.0","graphql":"0.10.1","ignore":"^3.3.3","jest-validate":"20.0.3","minimatch":"3.0.4","minimist":"1.2.0","parse5":"3.0.2","postcss":"^6.0.1","postcss-less":"^1.0.0","postcss-media-query-parser":"0.2.3","postcss-scss":"1.0.0","postcss-selector-parser":"2.2.3","postcss-values-parser":"git://github.com/lydell/postcss-values-parser.git#af2c80b2bb558a6e7d61540d97f068f9fa162b38","strip-bom":"3.0.0","typescript":"2.5.1","typescript-eslint-parser":"git://github.com/eslint/typescript-eslint-parser.git#801d65585af6995a223136862944095b48f5c567"};var devDependencies={"babel-cli":"6.24.1","babel-preset-es2015":"6.24.1","codecov":"2.2.0","cross-env":"5.0.1","cross-spawn":"5.1.0","eslint":"4.1.1","eslint-friendly-formatter":"3.0.0","eslint-plugin-import":"2.6.1","eslint-plugin-prettier":"2.1.2","eslint-plugin-react":"7.1.0","jest":"20.0.0","mkdirp":"^0.5.1","prettier":"1.6.0","rimraf":"2.6.1","rollup":"0.41.1","rollup-plugin-commonjs":"7.0.0","rollup-plugin-json":"2.1.0","rollup-plugin-node-builtins":"2.0.0","rollup-plugin-node-globals":"1.1.0","rollup-plugin-node-resolve":"2.0.0","rollup-plugin-replace":"1.1.1","shelljs":"0.7.8","sw-toolbox":"3.6.0","uglify-es":"3.0.15","webpack":"2.6.1"};var scripts={"test":"jest","test-integration":"jest tests_integration","lint":"cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter","build":"./scripts/build/build.js"};var _package={name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts};var _package$1=Object.freeze({name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts,default:_package});var assert$2=require$$0;var util$6=util$3;var startsWithNoLookaheadToken$1=util$6.startsWithNoLookaheadToken;function FastPath$1(value){assert$2.ok(this instanceof FastPath$1);this.stack=[value];}// The name of the current property is always the penultimate element of
return concat([" ",contents]);}return concat([lineSuffix(" "+contents),!isBlock?breakParent:""]);}function printDanglingComments(path,options,sameIndent){var parts=[];var node=path.getValue();if(!node||!node.comments){return"";}path.each(function(commentPath){var comment=commentPath.getValue();if(comment&&!comment.leading&&!comment.trailing){parts.push(printComment(commentPath,options));}},"comments");if(parts.length===0){return"";}if(sameIndent){return join(hardline,parts);}return indent(concat([hardline,join(hardline,parts)]));}function prependCursorPlaceholder(path,options,printed){if(path.getNode()===options.cursorNode&&path.getValue()){return concat([cursor,printed]);}return printed;}function printComments(path,print,options,needsSemi){var value=path.getValue();var printed=print(path);var comments=value&&value.comments;if(!comments||comments.length===0){return prependCursorPlaceholder(path,options,printed);}var leadingParts=[];var trailingParts=[needsSemi?";":"",printed];path.each(function(commentPath){var comment=commentPath.getValue();var leading=comment.leading;var trailing=comment.trailing;if(leading){var contents=printLeadingComment(commentPath,print,options);if(!contents){return;}leadingParts.push(contents);var text=options.originalText;if(util$2.hasNewline(text,util$2.skipNewline(text,util$2.locEnd(comment)))){leadingParts.push(hardline);}}else if(trailing){trailingParts.push(printTrailingComment(commentPath,print,options));}},"comments");return prependCursorPlaceholder(path,options,concat(leadingParts.concat(trailingParts)));}var comments$1={attach:attach,printComments:printComments,printDanglingComments:printDanglingComments,getSortedChildNodes:getSortedChildNodes};var name="prettier";var version$1="1.7.0";var description="Prettier is an opinionated code formatter";var bin={"prettier":"./bin/prettier.js"};var repository="prettier/prettier";var homepage="https://prettier.io";var author="James Long";var license="MIT";var main="./index.js";var dependencies={"babel-code-frame":"7.0.0-alpha.12","babylon":"7.0.0-beta.22","chalk":"2.1.0","cosmiconfig":"git://github.com/davidtheclark/cosmiconfig.git#6eb3cc85d3a435e6b9e252b341e601960312f410","dashify":"0.2.2","diff":"3.2.0","esutils":"2.0.2","flow-parser":"0.51.0","get-stream":"3.0.0","globby":"^6.1.0","graphql":"0.10.1","ignore":"^3.3.3","jest-docblock":"21.1.0","jest-validate":"21.1.0","minimatch":"3.0.4","minimist":"1.2.0","parse5":"3.0.2","postcss":"^6.0.1","postcss-less":"^1.0.0","postcss-media-query-parser":"0.2.3","postcss-scss":"1.0.0","postcss-selector-parser":"2.2.3","postcss-values-parser":"git://github.com/lydell/postcss-values-parser.git#af2c80b2bb558a6e7d61540d97f068f9fa162b38","strip-bom":"3.0.0","typescript":"2.5.1","typescript-eslint-parser":"git://github.com/eslint/typescript-eslint-parser.git#5576fb48c89165967557e867b9462d43431dcb10"};var devDependencies={"babel-cli":"6.24.1","babel-preset-es2015":"6.24.1","codecov":"2.2.0","cross-env":"5.0.1","eslint":"4.1.1","eslint-friendly-formatter":"3.0.0","eslint-plugin-import":"2.6.1","eslint-plugin-prettier":"2.1.2","eslint-plugin-react":"7.1.0","jest":"21.1.0","markdown-toc":"1.1.0","mkdirp":"^0.5.1","prettier":"1.6.0","rimraf":"2.6.1","rollup":"0.41.1","rollup-plugin-commonjs":"7.0.0","rollup-plugin-json":"2.1.0","rollup-plugin-node-builtins":"2.0.0","rollup-plugin-node-globals":"1.1.0","rollup-plugin-node-resolve":"2.0.0","rollup-plugin-replace":"1.1.1","shelljs":"0.7.8","sw-toolbox":"3.6.0","uglify-es":"3.0.15","webpack":"2.6.1"};var scripts={"test":"jest","test-integration":"jest tests_integration","lint":"cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter","build":"node ./scripts/build/build.js","toc":"node ./scripts/table-of-contents.js"};var _package={name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts};var _package$1=Object.freeze({name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts,default:_package});var assert$2=require$$0;var util$6=util$3;var startsWithNoLookaheadToken$1=util$6.startsWithNoLookaheadToken;function FastPath$1(value){assert$2.ok(this instanceof FastPath$1);this.stack=[value];}// The name of the current property is always the penultimate element of
// this.stack, and always a String.
FastPath$1.prototype.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
/* istanbul ignore next */return null;};// The value of the current property is always the final element of
// this.stack.
FastPath$1.prototype.getValue=function getValue(){var s=this.stack;return s[s.length-1];};function getNodeHelper(path,count){var s=path.stack;for(var _i11=s.length-1;_i11>=0;_i11-=2){var value=s[_i11];if(value&&!Array.isArray(value)&&--count<0){return value;}}return null;}FastPath$1.prototype.getNode=function getNode(count){return getNodeHelper(this,~~count);};FastPath$1.prototype.getParentNode=function getParentNode(count){return getNodeHelper(this,~~count+1);};// Temporarily push properties named by string arguments given after the
FastPath$1.prototype.getValue=function getValue(){var s=this.stack;return s[s.length-1];};function getNodeHelper(path,count){var s=path.stack;for(var _i10=s.length-1;_i10>=0;_i10-=2){var value=s[_i10];if(value&&!Array.isArray(value)&&--count<0){return value;}}return null;}FastPath$1.prototype.getNode=function getNode(count){return getNodeHelper(this,~~count);};FastPath$1.prototype.getParentNode=function getParentNode(count){return getNodeHelper(this,~~count+1);};// 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.
FastPath$1.prototype.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 _i12=1;_i12<argc;++_i12){var _name=arguments[_i12];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
FastPath$1.prototype.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 _i11=1;_i11<argc;++_i11){var _name=arguments[_i11];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.
FastPath$1.prototype.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 _i13=1;_i13<argc;++_i13){var _name2=arguments[_i13];value=value[_name2];s.push(_name2,value);}for(var _i14=0;_i14<value.length;++_i14){if(_i14 in value){s.push(_i14,value[_i14]);// If the callback needs to know the value of i, call
FastPath$1.prototype.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 _i12=1;_i12<argc;++_i12){var _name2=arguments[_i12];value=value[_name2];s.push(_name2,value);}for(var _i13=0;_i13<value.length;++_i13){if(_i13 in value){s.push(_i13,value[_i13]);// 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.
FastPath$1.prototype.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 _i15=1;_i15<argc;++_i15){var _name3=arguments[_i15];value=value[_name3];s.push(_name3,value);}var result=new Array(value.length);for(var _i16=0;_i16<value.length;++_i16){if(_i16 in value){s.push(_i16,value[_i16]);result[_i16]=callback(this,_i16);s.length-=2;}}s.length=origLen;return result;};FastPath$1.prototype.needsParens=function(options){var _this=this;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
FastPath$1.prototype.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 _i14=1;_i14<argc;++_i14){var _name3=arguments[_i14];value=value[_name3];s.push(_name3,value);}var result=new Array(value.length);for(var _i15=0;_i15<value.length;++_i15){if(_i15 in value){s.push(_i15,value[_i15]);result[_i15]=callback(this,_i15);s.length-=2;}}s.length=origLen;return result;};FastPath$1.prototype.needsParens=function(options){var _this=this;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 statements don't need parentheses.
@@ -200,9 +204,9 @@ if(util$6.hasClosureCompilerTypeCastComment(options.originalText,node)){return t
if(node.type==="Identifier"){return false;}if(parent.type==="ParenthesizedExpression"){return false;}// Add parens around the extends clause of a class. It is needed for almost
// all expressions.
if((parent.type==="ClassDeclaration"||parent.type==="ClassExpression")&&parent.superClass===node&&(node.type==="ArrowFunctionExpression"||node.type==="AssignmentExpression"||node.type==="AwaitExpression"||node.type==="BinaryExpression"||node.type==="ConditionalExpression"||node.type==="LogicalExpression"||node.type==="NewExpression"||node.type==="ObjectExpression"||node.type==="ParenthesizedExpression"||node.type==="SequenceExpression"||node.type==="TaggedTemplateExpression"||node.type==="UnaryExpression"||node.type==="UpdateExpression"||node.type==="YieldExpression")){return true;}if(parent.type==="ArrowFunctionExpression"&&parent.body===node&&node.type!=="SequenceExpression"&&// these have parens added anyway
startsWithNoLookaheadToken$1(node,/* forbidFunctionAndClass */false)||parent.type==="ExpressionStatement"&&startsWithNoLookaheadToken$1(node,/* forbidFunctionAndClass */true)){return true;}switch(node.type){case"CallExpression":{var firstParentNotMemberExpression=parent;var _i17=0;while(firstParentNotMemberExpression&&firstParentNotMemberExpression.type==="MemberExpression"){firstParentNotMemberExpression=this.getParentNode(++_i17);}if(firstParentNotMemberExpression.type==="NewExpression"&&firstParentNotMemberExpression.callee===this.getParentNode(_i17-1)){return true;}return false;}case"MemberExpression":{return parent.type==="MemberExpression"&&parent.object===node&&node.optional;}case"SpreadElement":case"SpreadProperty":return parent.type==="MemberExpression"&&name==="object"&&parent.object===node;case"UpdateExpression":if(parent.type==="UnaryExpression"){return node.prefix&&(node.operator==="++"&&parent.operator==="+"||node.operator==="--"&&parent.operator==="-");}// else fallthrough
startsWithNoLookaheadToken$1(node,/* forbidFunctionAndClass */false)||parent.type==="ExpressionStatement"&&startsWithNoLookaheadToken$1(node,/* forbidFunctionAndClass */true)){return true;}switch(node.type){case"CallExpression":{var firstParentNotMemberExpression=parent;var _i16=0;while(firstParentNotMemberExpression&&firstParentNotMemberExpression.type==="MemberExpression"){firstParentNotMemberExpression=this.getParentNode(++_i16);}if(firstParentNotMemberExpression.type==="NewExpression"&&firstParentNotMemberExpression.callee===this.getParentNode(_i16-1)){return true;}return false;}case"MemberExpression":{return parent.type==="MemberExpression"&&parent.object===node&&node.optional;}case"SpreadElement":case"SpreadProperty":return parent.type==="MemberExpression"&&name==="object"&&parent.object===node;case"UpdateExpression":if(parent.type==="UnaryExpression"){return node.prefix&&(node.operator==="++"&&parent.operator==="+"||node.operator==="--"&&parent.operator==="-");}// else fallthrough
case"UnaryExpression":switch(parent.type){case"UnaryExpression":return node.operator===parent.operator&&(node.operator==="+"||node.operator==="-");case"MemberExpression":return name==="object"&&parent.object===node;case"TaggedTemplateExpression":return true;case"NewExpression":case"CallExpression":return name==="callee"&&parent.callee===node;case"BinaryExpression":return parent.operator==="**"&&name==="left";default:return false;}case"BinaryExpression":{if(parent.type==="UpdateExpression"){return true;}var isLeftOfAForStatement=function isLeftOfAForStatement(node){var i=0;while(node){var _parent=_this.getParentNode(i++);if(!_parent){return false;}if(_parent.type==="ForStatement"&&_parent.init===node){return true;}node=_parent;}return false;};if(node.operator==="in"&&isLeftOfAForStatement(node)){return true;}}// fallthrough
case"TSTypeAssertionExpression":case"TSAsExpression":case"LogicalExpression":switch(parent.type){case"CallExpression":case"NewExpression":return name==="callee"&&parent.callee===node;case"ClassDeclaration":return name==="superClass"&&parent.superClass===node;case"TSTypeAssertionExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BindExpression":case"AwaitExpression":case"TSAsExpression":case"TSNonNullExpression":return true;case"MemberExpression":return name==="object"&&parent.object===node;case"AssignmentExpression":return parent.left===node&&(node.type==="TSTypeAssertionExpression"||node.type==="TSAsExpression");case"BinaryExpression":case"LogicalExpression":{if(!node.operator&&node.type!=="TSTypeAssertionExpression"){return true;}var po=parent.operator;var pp=util$6.getPrecedence(po);var no=node.operator;var np=util$6.getPrecedence(no);if(pp>np){return true;}if(po==="||"&&no==="&&"){return true;}if(pp===np&&name==="right"){assert$2.strictEqual(parent.right,node);return true;}if(pp===np&&!util$6.shouldFlatten(po,no)){return true;}// Add parenthesis when working with binary operators
case"TSTypeAssertionExpression":case"TSAsExpression":case"LogicalExpression":switch(parent.type){case"CallExpression":case"NewExpression":return name==="callee"&&parent.callee===node;case"ClassDeclaration":return name==="superClass"&&parent.superClass===node;case"TSTypeAssertionExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"ExperimentalSpreadProperty":case"BindExpression":case"AwaitExpression":case"TSAsExpression":case"TSNonNullExpression":return true;case"MemberExpression":return name==="object"&&parent.object===node;case"AssignmentExpression":return parent.left===node&&(node.type==="TSTypeAssertionExpression"||node.type==="TSAsExpression");case"BinaryExpression":case"LogicalExpression":{if(!node.operator&&node.type!=="TSTypeAssertionExpression"){return true;}var po=parent.operator;var pp=util$6.getPrecedence(po);var no=node.operator;var np=util$6.getPrecedence(no);if(pp>np){return true;}if(po==="||"&&no==="&&"){return true;}if(pp===np&&name==="right"){assert$2.strictEqual(parent.right,node);return true;}if(pp===np&&!util$6.shouldFlatten(po,no)){return true;}// Add parenthesis when working with binary operators
// It's not stricly needed but helps with code understanding
if(util$6.isBitwiseOperator(po)){return true;}return false;}default:return false;}case"TSParenthesizedType":{var grandParent=this.getParentNode(1);if((parent.type==="TypeParameter"||parent.type==="VariableDeclarator"||parent.type==="TypeAnnotation"||parent.type==="GenericTypeAnnotation"||parent.type==="TSTypeReference")&&node.typeAnnotation.type==="TypeAnnotation"&&node.typeAnnotation.typeAnnotation.type!=="TSFunctionType"&&grandParent.type!=="TSTypeOperator"){return false;}// Delegate to inner TSParenthesizedType
if(node.typeAnnotation.type==="TSParenthesizedType"){return false;}return true;}case"SequenceExpression":switch(parent.type){case"ReturnStatement":return false;case"ForStatement":// Although parentheses wouldn't hurt around sequence
@@ -219,7 +223,7 @@ case"AwaitExpression":switch(parent.type){case"TaggedTemplateExpression":case"Bi
options.parser!=="typescript"&&!parent.directive||options.parser==="typescript"&&options.originalText.substr(util$6.locStart(node)-1,1)==="(")){// To avoid becoming a directive
var _grandParent=this.getParentNode(1);return _grandParent.type==="Program"||_grandParent.type==="BlockStatement";}return parent.type==="MemberExpression"&&typeof node.value==="number"&&name==="object"&&parent.object===node;case"AssignmentExpression":{var _grandParent2=this.getParentNode(1);if(parent.type==="ArrowFunctionExpression"&&parent.body===node){return true;}else if(parent.type==="ClassProperty"&&parent.key===node&&parent.computed){return false;}else if(parent.type==="TSPropertySignature"&&parent.name===node){return false;}else if(parent.type==="ForStatement"&&(parent.init===node||parent.update===node)){return false;}else if(parent.type==="ExpressionStatement"){return node.left.type==="ObjectPattern";}else if(parent.type==="TSPropertySignature"&&parent.key===node){return false;}else if(parent.type==="AssignmentExpression"){return false;}else if(parent.type==="SequenceExpression"&&_grandParent2&&_grandParent2.type==="ForStatement"&&(_grandParent2.init===parent||_grandParent2.update===parent)){return false;}return true;}case"ConditionalExpression":switch(parent.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertionExpression":case"TSAsExpression":case"TSNonNullExpression":return true;case"NewExpression":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"FunctionExpression":switch(parent.type){case"CallExpression":return name==="callee";// Not strictly necessary, but it's clearer to the reader if IIFEs are wrapped in parentheses.
case"TaggedTemplateExpression":return true;// This is basically a kind of IIFE.
case"ExportDefaultDeclaration":return true;default:return false;}case"ArrowFunctionExpression":switch(parent.type){case"CallExpression":return name==="callee";case"NewExpression":return name==="callee";case"MemberExpression":return name==="object";case"TSAsExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"BinaryExpression":case"AwaitExpression":case"TSTypeAssertionExpression":return true;case"ConditionalExpression":return name==="test";default:return false;}case"ClassExpression":return parent.type==="ExportDefaultDeclaration";}return false;};function isStatement(node){return node.type==="BlockStatement"||node.type==="BreakStatement"||node.type==="ClassBody"||node.type==="ClassDeclaration"||node.type==="ClassMethod"||node.type==="ClassProperty"||node.type==="ContinueStatement"||node.type==="DebuggerStatement"||node.type==="DeclareClass"||node.type==="DeclareExportAllDeclaration"||node.type==="DeclareExportDeclaration"||node.type==="DeclareFunction"||node.type==="DeclareInterface"||node.type==="DeclareModule"||node.type==="DeclareModuleExports"||node.type==="DeclareVariable"||node.type==="DoWhileStatement"||node.type==="ExportAllDeclaration"||node.type==="ExportDefaultDeclaration"||node.type==="ExportNamedDeclaration"||node.type==="ExpressionStatement"||node.type==="ForAwaitStatement"||node.type==="ForInStatement"||node.type==="ForOfStatement"||node.type==="ForStatement"||node.type==="FunctionDeclaration"||node.type==="IfStatement"||node.type==="ImportDeclaration"||node.type==="InterfaceDeclaration"||node.type==="LabeledStatement"||node.type==="MethodDefinition"||node.type==="ReturnStatement"||node.type==="SwitchStatement"||node.type==="ThrowStatement"||node.type==="TryStatement"||node.type==="TSAbstractClassDeclaration"||node.type==="TSEnumDeclaration"||node.type==="TSImportEqualsDeclaration"||node.type==="TSInterfaceDeclaration"||node.type==="TSModuleDeclaration"||node.type==="TSNamespaceExportDeclaration"||node.type==="TSNamespaceFunctionDeclaration"||node.type==="TypeAlias"||node.type==="VariableDeclaration"||node.type==="WhileStatement"||node.type==="WithStatement";}var fastPath=FastPath$1;function traverseDoc(doc,onEnter,onExit,shouldTraverseConditionalGroups){function traverseDocRec(doc){var shouldRecurse=true;if(onEnter){if(onEnter(doc)===false){shouldRecurse=false;}}if(shouldRecurse){if(doc.type==="concat"||doc.type==="fill"){for(var _i18=0;_i18<doc.parts.length;_i18++){traverseDocRec(doc.parts[_i18]);}}else if(doc.type==="if-break"){if(doc.breakContents){traverseDocRec(doc.breakContents);}if(doc.flatContents){traverseDocRec(doc.flatContents);}}else if(doc.type==="group"&&doc.expandedStates){if(shouldTraverseConditionalGroups){doc.expandedStates.forEach(traverseDocRec);}else{traverseDocRec(doc.contents);}}else if(doc.contents){traverseDocRec(doc.contents);}}if(onExit){onExit(doc);}}traverseDocRec(doc);}function mapDoc(doc,func){doc=func(doc);if(doc.type==="concat"||doc.type==="fill"){return Object.assign({},doc,{parts:doc.parts.map(function(d){return mapDoc(d,func);})});}else if(doc.type==="if-break"){return Object.assign({},doc,{breakContents:doc.breakContents&&mapDoc(doc.breakContents,func),flatContents:doc.flatContents&&mapDoc(doc.flatContents,func)});}else if(doc.contents){return Object.assign({},doc,{contents:mapDoc(doc.contents,func)});}return doc;}function findInDoc(doc,fn,defaultValue){var result=defaultValue;var hasStopped=false;traverseDoc(doc,function(doc){var maybeResult=fn(doc);if(maybeResult!==undefined){hasStopped=true;result=maybeResult;}if(hasStopped){return false;}});return result;}function isEmpty$1(n){return typeof n==="string"&&n.length===0;}function isLineNext$1(doc){return findInDoc(doc,function(doc){if(typeof doc==="string"){return false;}if(doc.type==="line"){return true;}},false);}function willBreak$1(doc){return findInDoc(doc,function(doc){if(doc.type==="group"&&doc.break){return true;}if(doc.type==="line"&&doc.hard){return true;}if(doc.type==="break-parent"){return true;}},false);}function breakParentGroup(groupStack){if(groupStack.length>0){var parentGroup=groupStack[groupStack.length-1];// Breaks are not propagated through conditional groups because
case"ExportDefaultDeclaration":return true;default:return false;}case"ArrowFunctionExpression":switch(parent.type){case"CallExpression":return name==="callee";case"NewExpression":return name==="callee";case"MemberExpression":return name==="object";case"TSAsExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"BinaryExpression":case"AwaitExpression":case"TSTypeAssertionExpression":return true;case"ConditionalExpression":return name==="test";default:return false;}case"ClassExpression":return parent.type==="ExportDefaultDeclaration";}return false;};function isStatement(node){return node.type==="BlockStatement"||node.type==="BreakStatement"||node.type==="ClassBody"||node.type==="ClassDeclaration"||node.type==="ClassMethod"||node.type==="ClassProperty"||node.type==="ContinueStatement"||node.type==="DebuggerStatement"||node.type==="DeclareClass"||node.type==="DeclareExportAllDeclaration"||node.type==="DeclareExportDeclaration"||node.type==="DeclareFunction"||node.type==="DeclareInterface"||node.type==="DeclareModule"||node.type==="DeclareModuleExports"||node.type==="DeclareVariable"||node.type==="DoWhileStatement"||node.type==="ExportAllDeclaration"||node.type==="ExportDefaultDeclaration"||node.type==="ExportNamedDeclaration"||node.type==="ExpressionStatement"||node.type==="ForAwaitStatement"||node.type==="ForInStatement"||node.type==="ForOfStatement"||node.type==="ForStatement"||node.type==="FunctionDeclaration"||node.type==="IfStatement"||node.type==="ImportDeclaration"||node.type==="InterfaceDeclaration"||node.type==="LabeledStatement"||node.type==="MethodDefinition"||node.type==="ReturnStatement"||node.type==="SwitchStatement"||node.type==="ThrowStatement"||node.type==="TryStatement"||node.type==="TSAbstractClassDeclaration"||node.type==="TSEnumDeclaration"||node.type==="TSImportEqualsDeclaration"||node.type==="TSInterfaceDeclaration"||node.type==="TSModuleDeclaration"||node.type==="TSNamespaceExportDeclaration"||node.type==="TSNamespaceFunctionDeclaration"||node.type==="TypeAlias"||node.type==="VariableDeclaration"||node.type==="WhileStatement"||node.type==="WithStatement";}var fastPath=FastPath$1;function traverseDoc(doc,onEnter,onExit,shouldTraverseConditionalGroups){function traverseDocRec(doc){var shouldRecurse=true;if(onEnter){if(onEnter(doc)===false){shouldRecurse=false;}}if(shouldRecurse){if(doc.type==="concat"||doc.type==="fill"){for(var _i17=0;_i17<doc.parts.length;_i17++){traverseDocRec(doc.parts[_i17]);}}else if(doc.type==="if-break"){if(doc.breakContents){traverseDocRec(doc.breakContents);}if(doc.flatContents){traverseDocRec(doc.flatContents);}}else if(doc.type==="group"&&doc.expandedStates){if(shouldTraverseConditionalGroups){doc.expandedStates.forEach(traverseDocRec);}else{traverseDocRec(doc.contents);}}else if(doc.contents){traverseDocRec(doc.contents);}}if(onExit){onExit(doc);}}traverseDocRec(doc);}function mapDoc(doc,func){doc=func(doc);if(doc.type==="concat"||doc.type==="fill"){return Object.assign({},doc,{parts:doc.parts.map(function(d){return mapDoc(d,func);})});}else if(doc.type==="if-break"){return Object.assign({},doc,{breakContents:doc.breakContents&&mapDoc(doc.breakContents,func),flatContents:doc.flatContents&&mapDoc(doc.flatContents,func)});}else if(doc.contents){return Object.assign({},doc,{contents:mapDoc(doc.contents,func)});}return doc;}function findInDoc(doc,fn,defaultValue){var result=defaultValue;var hasStopped=false;traverseDoc(doc,function(doc){var maybeResult=fn(doc);if(maybeResult!==undefined){hasStopped=true;result=maybeResult;}if(hasStopped){return false;}});return result;}function isEmpty$1(n){return typeof n==="string"&&n.length===0;}function isLineNext$1(doc){return findInDoc(doc,function(doc){if(typeof doc==="string"){return false;}if(doc.type==="line"){return true;}},false);}function willBreak$1(doc){return findInDoc(doc,function(doc){if(doc.type==="group"&&doc.break){return true;}if(doc.type==="line"&&doc.hard){return true;}if(doc.type==="break-parent"){return true;}},false);}function breakParentGroup(groupStack){if(groupStack.length>0){var parentGroup=groupStack[groupStack.length-1];// Breaks are not propagated through conditional groups because
// the user is expected to manually handle what breaks.
if(!parentGroup.expandedStates){parentGroup.break=true;}}return null;}function propagateBreaks(doc){var alreadyVisited=new Map();var groupStack=[];traverseDoc(doc,function(doc){if(doc.type==="break-parent"){breakParentGroup(groupStack);}if(doc.type==="group"){groupStack.push(doc);if(alreadyVisited.has(doc)){return false;}alreadyVisited.set(doc,true);}},function(doc){if(doc.type==="group"){var _group=groupStack.pop();if(_group.break){breakParentGroup(groupStack);}}},/* shouldTraverseConditionalGroups */true);}function removeLines(doc){// Force this doc into flat mode by statically converting all
// lines into spaces (or soft lines into nothing). Hard lines
@@ -355,7 +359,7 @@ var originalDim=ansiStyles.dim.open;if(isSimpleWindowsTerm&&(nestedStyles.indexO
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str=code.open+str.replace(code.closeRe,code.open)+code.close;}// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
ansiStyles.dim.open=originalDim;return str;}function init(){var ret={};Object.keys(styles).forEach(function(name){ret[name]={get:function get(){return build.call(this,[name]);}};});return ret;}defineProps(Chalk.prototype,init());var index$8=new Chalk();var styles_1=ansiStyles;var hasColor=hasAnsi;var stripColor=stripAnsi;var supportsColor_1=supportsColor;index$8.styles=styles_1;index$8.hasColor=hasColor;index$8.stripColor=stripColor;index$8.supportsColor=supportsColor_1;var index$4=createCommonjsModule(function(module,exports){"use strict";exports.__esModule=true;exports.codeFrameColumns=codeFrameColumns;exports.default=function(rawLines,lineNumber,colNumber){var opts=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(!deprecationWarningShown){deprecationWarningShown=true;var deprecationError=new Error("Passing lineNumber and colNumber is deprecated to babel-code-frame. Please use `codeFrameColumns`.");deprecationError.name="DeprecationWarning";if(process.emitWarning){process.emitWarning(deprecationError);}else{console.warn(deprecationError);}}colNumber=Math.max(colNumber,0);var location={start:{column:colNumber,line:lineNumber}};return codeFrameColumns(rawLines,location,opts);};var _jsTokens=index$6;var _jsTokens2=_interopRequireDefault(_jsTokens);var _esutils=utils;var _esutils2=_interopRequireDefault(_esutils);var _chalk=index$8;var _chalk2=_interopRequireDefault(_chalk);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var deprecationWarningShown=false;function getDefs(chalk){return{keyword:chalk.cyan,capitalized:chalk.yellow,jsx_tag:chalk.yellow,punctuator:chalk.yellow,number:chalk.magenta,string:chalk.green,regex:chalk.magenta,comment:chalk.grey,invalid:chalk.white.bgRed.bold,gutter:chalk.grey,marker:chalk.red.bold};}var NEWLINE=/\r\n|[\n\r\u2028\u2029]/;var JSX_TAG=/^[a-z][\w-]*$/i;var BRACKET=/^[()\[\]{}]$/;function getTokenType(match){var _match$slice=match.slice(-2),offset=_match$slice[0],text=_match$slice[1];var token=(0,_jsTokens.matchToToken)(match);if(token.type==="name"){if(_esutils2.default.keyword.isReservedWordES6(token.value)){return"keyword";}if(JSX_TAG.test(token.value)&&(text[offset-1]==="<"||text.substr(offset-2,2)=="</")){return"jsx_tag";}if(token.value[0]!==token.value[0].toLowerCase()){return"capitalized";}}if(token.type==="punctuator"&&BRACKET.test(token.value)){return"bracket";}return token.type;}function highlight(defs,text){return text.replace(_jsTokens2.default,function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}var type=getTokenType(args);var colorize=defs[type];if(colorize){return args[0].split(NEWLINE).map(function(str){return colorize(str);}).join("\n");}else{return args[0];}});}function getMarkerLines(loc,source,opts){var startLoc=Object.assign({},{column:0,line:-1},loc.start);var endLoc=Object.assign({},startLoc,loc.end);var linesAbove=opts.linesAbove||2;var linesBelow=opts.linesBelow||3;var startLine=startLoc.line;var startColumn=startLoc.column;var endLine=endLoc.line;var endColumn=endLoc.column;var start=Math.max(startLine-(linesAbove+1),0);var end=Math.min(source.length,endLine+linesBelow);if(startLine===-1){start=0;}if(endLine===-1){end=source.length;}var lineDiff=endLine-startLine;var markerLines={};if(lineDiff){for(var i=0;i<=lineDiff;i++){var lineNumber=i+startLine;if(!startColumn){markerLines[lineNumber]=true;}else if(i===0){var sourceLength=source[lineNumber-1].length;markerLines[lineNumber]=[startColumn,sourceLength-startColumn];}else if(i===lineDiff){markerLines[lineNumber]=[0,endColumn];}else{var _sourceLength=source[lineNumber-i].length;markerLines[lineNumber]=[0,_sourceLength];}}}else{if(startColumn===endColumn){if(startColumn){markerLines[startLine]=[startColumn,0];}else{markerLines[startLine]=true;}}else{markerLines[startLine]=[startColumn,endColumn-startColumn];}}return{start:start,end:end,markerLines:markerLines};}function codeFrameColumns(rawLines,loc){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var highlighted=opts.highlightCode&&_chalk2.default.supportsColor||opts.forceColor;var chalk=_chalk2.default;if(opts.forceColor){chalk=new _chalk2.default.constructor({enabled:true});}var maybeHighlight=function maybeHighlight(chalkFn,string){return highlighted?chalkFn(string):string;};var defs=getDefs(chalk);if(highlighted)rawLines=highlight(defs,rawLines);var lines=rawLines.split(NEWLINE);var _getMarkerLines=getMarkerLines(loc,lines,opts),start=_getMarkerLines.start,end=_getMarkerLines.end,markerLines=_getMarkerLines.markerLines;var numberMaxWidth=String(end).length;var frame=lines.slice(start,end).map(function(line,index){var number=start+1+index;var paddedNumber=(" "+number).slice(-numberMaxWidth);var gutter=" "+paddedNumber+" | ";var hasMarker=markerLines[number];if(hasMarker){var markerLine="";if(Array.isArray(hasMarker)){var markerSpacing=line.slice(0,Math.max(hasMarker[0]-1,0)).replace(/[^\t]/g," ");var numberOfMarkers=hasLine truncated
ansiStyles.dim.open=originalDim;return str;}function init(){var ret={};Object.keys(styles).forEach(function(name){ret[name]={get:function get(){return build.call(this,[name]);}};});return ret;}defineProps(Chalk.prototype,init());var index$8=new Chalk();var styles_1=ansiStyles;var hasColor=hasAnsi;var stripColor=stripAnsi;var supportsColor_1=supportsColor;index$8.styles=styles_1;index$8.hasColor=hasColor;index$8.stripColor=stripColor;index$8.supportsColor=supportsColor_1;var index$4=createCommonjsModule(function(module,exports){"use strict";exports.__esModule=true;exports.codeFrameColumns=codeFrameColumns;exports.default=function(rawLines,lineNumber,colNumber){var opts=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(!deprecationWarningShown){deprecationWarningShown=true;var deprecationError=new Error("Passing lineNumber and colNumber is deprecated to babel-code-frame. Please use `codeFrameColumns`.");deprecationError.name="DeprecationWarning";if(process.emitWarning){process.emitWarning(deprecationError);}else{console.warn(deprecationError);}}colNumber=Math.max(colNumber,0);var location={start:{column:colNumber,line:lineNumber}};return codeFrameColumns(rawLines,location,opts);};var _jsTokens=index$6;var _jsTokens2=_interopRequireDefault(_jsTokens);var _esutils=utils;var _esutils2=_interopRequireDefault(_esutils);var _chalk=index$8;var _chalk2=_interopRequireDefault(_chalk);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var deprecationWarningShown=false;function getDefs(chalk){return{keyword:chalk.cyan,capitalized:chalk.yellow,jsx_tag:chalk.yellow,punctuator:chalk.yellow,number:chalk.magenta,string:chalk.green,regex:chalk.magenta,comment:chalk.grey,invalid:chalk.white.bgRed.bold,gutter:chalk.grey,marker:chalk.red.bold};}var NEWLINE=/\r\n|[\n\r\u2028\u2029]/;var JSX_TAG=/^[a-z][\w-]*$/i;var BRACKET=/^[()\[\]{}]$/;function getTokenType(match){var _match$slice=match.slice(-2),offset=_match$slice[0],text=_match$slice[1];var token=(0,_jsTokens.matchToToken)(match);if(token.type==="name"){if(_esutils2.default.keyword.isReservedWordES6(token.value)){return"keyword";}if(JSX_TAG.test(token.value)&&(text[offset-1]==="<"||text.substr(offset-2,2)=="</")){return"jsx_tag";}if(token.value[0]!==token.value[0].toLowerCase()){return"capitalized";}}if(token.type==="punctuator"&&BRACKET.test(token.value)){return"bracket";}return token.type;}function highlight(defs,text){return text.replace(_jsTokens2.default,function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}var type=getTokenType(args);var colorize=defs[type];if(colorize){return args[0].split(NEWLINE).map(function(str){return colorize(str);}).join("\n");}else{return args[0];}});}function getMarkerLines(loc,source,opts){var startLoc=Object.assign({},{column:0,line:-1},loc.start);var endLoc=Object.assign({},startLoc,loc.end);var linesAbove=opts.linesAbove||2;var linesBelow=opts.linesBelow||3;var startLine=startLoc.line;var startColumn=startLoc.column;var endLine=endLoc.line;var endColumn=endLoc.column;var start=Math.max(startLine-(linesAbove+1),0);var end=Math.min(source.length,endLine+linesBelow);if(startLine===-1){start=0;}if(endLine===-1){end=source.length;}var lineDiff=endLine-startLine;var markerLines={};if(lineDiff){for(var i=0;i<=lineDiff;i++){var lineNumber=i+startLine;if(!startColumn){markerLines[lineNumber]=true;}else if(i===0){var sourceLength=source[lineNumber-1].length;markerLines[lineNumber]=[startColumn,sourceLength-startColumn];}else if(i===lineDiff){markerLines[lineNumber]=[0,endColumn];}else{var _sourceLength=source[lineNumber-i].length;markerLines[lineNumber]=[0,_sourceLength];}}}else{if(startColumn===endColumn){if(startColumn){markerLines[startLine]=[startColumn,0];}else{markerLines[startLine]=true;}}else{markerLines[startLine]=[startColumn,endColumn-startColumn];}}return{start:start,end:end,markerLines:markerLines};}function codeFrameColumns(rawLines,loc){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var highlighted=opts.highlightCode&&_chalk2.default.supportsColor||opts.forceColor;var chalk=_chalk2.default;if(opts.forceColor){chalk=new _chalk2.default.constructor({enabled:true});}var maybeHighlight=function maybeHighlight(chalkFn,string){return highlighted?chalkFn(string):string;};var defs=getDefs(chalk);if(highlighted)rawLines=highlight(defs,rawLines);var lines=rawLines.split(NEWLINE);var _getMarkerLines=getMarkerLines(loc,lines,opts),start=_getMarkerLines.start,end=_getMarkerLines.end,markerLines=_getMarkerLines.markerLines;var numberMaxWidth=String(end).length;var frame=lines.slice(start,end).map(function(line,index){var number=start+1+index;var paddedNumber=(" "+number).slice(-numberMaxWidth);var gutter=" "+paddedNumber+" | ";var hasMarker=markerLines[number];if(hasMarker){var markerLine="";if(Array.isArray(hasMarker)){var markerSpacing=line.slice(0,Math.max(hasMarker[0]-1,0)).replace(/[^\t]/g," ");var numberOfMarkers=hasLine truncated
* @returns {{ text, options?, transformDoc? } | void}
*/function getSubtreeParser(path,options){switch(options.parser){case"parse5":return fromHtmlParser2(path,options);case"babylon":case"flow":case"typescript":return fromBabylonFlowOrTypeScript(path,options);}}function fromBabylonFlowOrTypeScript(path){var node=path.getValue();switch(node.type){case"TemplateLiteral":{var isCss=[isStyledJsx,isStyledComponents].some(function(isIt){return isIt(path);});if(isCss){// Get full template literal with expressions replaced by placeholders
var rawQuasis=node.quasis.map(function(q){return q.value.raw;});var text=rawQuasis.join("@prettier-placeholder");return{options:{parser:"postcss"},transformDoc:transformCssDoc,text:text};}break;}case"TemplateElement":{var parent=path.getParentNode();var parentParent=path.getParentNode(1);/*
@@ -363,7 +367,7 @@ var rawQuasis=node.quasis.map(function(q){return q.value.raw;});var text=rawQuas
* graphql`...`
* graphql.experimental`...`
* gql`...`
*/if(parentParent&&parentParent.type==="TaggedTemplateExpression"&&parent.quasis.length===1&&(parentParent.tag.type==="MemberExpression"&&parentParent.tag.object.name==="graphql"&&parentParent.tag.property.name==="experimental"||parentParent.tag.type==="Identifier"&&(parentParent.tag.name==="gql"||parentParent.tag.name==="graphql"))){return{options:{parser:"graphql"},transformDoc:function transformDoc(doc){return concat$3([indent$3(concat$3([softline$2,stripTrailingHardline(doc)])),softline$2]);},text:parent.quasis[0].value.raw};}break;}}}function fromHtmlParser2(path,options){var node=path.getValue();switch(node.type){case"text":{var parent=path.getParentNode();// Inline JavaScript
*/if(parentParent&&(parentParent.type==="TaggedTemplateExpression"&&parent.quasis.length===1&&(parentParent.tag.type==="MemberExpression"&&parentParent.tag.object.name==="graphql"&&parentParent.tag.property.name==="experimental"||parentParent.tag.type==="Identifier"&&(parentParent.tag.name==="gql"||parentParent.tag.name==="graphql"))||parentParent.type==="CallExpression"&&parentParent.callee.type==="Identifier"&&parentParent.callee.name==="graphql")){return{options:{parser:"graphql"},transformDoc:function transformDoc(doc){return concat$3([indent$3(concat$3([softline$2,stripTrailingHardline(doc)])),softline$2]);},text:parent.quasis[0].value.raw};}break;}}}function fromHtmlParser2(path,options){var node=path.getValue();switch(node.type){case"text":{var parent=path.getParentNode();// Inline JavaScript
if(parent.type==="script"&&(!parent.attribs.lang&&!parent.attribs.lang||parent.attribs.type==="text/javascript"||parent.attribs.type==="application/javascript")){var _parser=options.parser==="flow"?"flow":"babylon";return{options:{parser:_parser},transformDoc:function transformDoc(doc){return concat$3([hardline$3,doc]);},text:getText(options,node)};}// Inline TypeScript
if(parent.type==="script"&&(parent.attribs.type==="application/x-typescript"||parent.attribs.lang==="ts")){return{options:{parser:"typescript"},transformDoc:function transformDoc(doc){return concat$3([hardline$3,doc]);},text:getText(options,node)};}// Inline Styles
if(parent.type==="style"){return{options:{parser:"postcss"},transformDoc:function transformDoc(doc){return concat$3([hardline$3,stripTrailingHardline(doc)]);},text:getText(options,node)};}break;}case"attribute":{/*
@@ -374,7 +378,7 @@ if(parent.type==="style"){return{options:{parser:"postcss"},transformDoc:functio
* @click="someFunction()"
*/if(/(^@)|(^v-)|:/.test(node.key)&&!/^\w+$/.test(node.value)){return{text:node.value,options:{parser:parseJavaScriptExpression,// Use singleQuote since HTML attributes use double-quotes.
// TODO(azz): We still need to do an entity escape on the attribute.
singleQuote:true},transformDoc:function transformDoc(doc){return concat$3([node.key,'="',util$7.hasNewlineInRange(node.value,0,node.value.length)?doc:docUtils$1.removeLines(doc),'"']);}};}}}}function transformCssDoc(quasisDoc,parent){var parentNode=parent.path.getValue();var expressionDocs=parentNode.expressions?parent.path.map(parent.print,"expressions"):[];var newDoc=replacePlaceholders(quasisDoc,expressionDocs);if(!newDoc){throw new Error("Couldn't insert all the expressions");}return concat$3(["`",indent$3(concat$3([softline$2,stripTrailingHardline(newDoc)])),softline$2,"`"]);}// Search all the placeholders in the quasisDoc tree
singleQuote:true},transformDoc:function transformDoc(doc){return concat$3([node.key,'="',util$7.hasNewlineInRange(node.value,0,node.value.length)?doc:docUtils$1.removeLines(doc),'"']);}};}}}}function transformCssDoc(quasisDoc,parent){var parentNode=parent.path.getValue();var expressionDocs=parentNode.expressions?parent.path.map(parent.print,"expressions"):[];var newDoc=replacePlaceholders(quasisDoc,expressionDocs);/* istanbul ignore if */if(!newDoc){throw new Error("Couldn't insert all the expressions");}return concat$3(["`",indent$3(concat$3([softline$2,stripTrailingHardline(newDoc)])),softline$2,"`"]);}// Search all the placeholders in the quasisDoc tree
// and replace them with the expression docs one by one
// returns a new doc with all the placeholders replaced,
// or null if it couldn't replace any expression
@@ -395,22 +399,23 @@ isStyledIdentifier(tag.object)||// Component.extend``
/^[A-Z]/.test(tag.object.name)&&tag.property.name==="extend");case"CallExpression":return(// styled(Component)``
isStyledIdentifier(tag.callee)||// styled.foo.attr({})``
tag.callee.type==="MemberExpression"&&tag.callee.object.type==="MemberExpression"&&isStyledIdentifier(tag.callee.object.object));case"Identifier":// css``
return tag.name==="css";default:return false;}}function isStyledIdentifier(node){return node.type==="Identifier"&&node.name==="styled";}var multiparser$1={getSubtreeParser:getSubtreeParser,printSubtree:printSubtree};var docBuilders$5=docBuilders$1;var concat$4=docBuilders$5.concat;var join$3=docBuilders$5.join;var hardline$4=docBuilders$5.hardline;var line$2=docBuilders$5.line;var softline$3=docBuilders$5.softline;var group$2=docBuilders$5.group;var indent$4=docBuilders$5.indent;var ifBreak$2=docBuilders$5.ifBreak;function genericPrint$1(path,options,print){var n=path.getValue();if(!n){return"";}if(typeof n==="string"){return n;}switch(n.kind){case"Document":{return concat$4([join$3(concat$4([hardline$4,hardline$4]),path.map(print,"definitions")),hardline$4]);}case"OperationDefinition":{return concat$4([n.name===null?"":n.operation,n.name?concat$4([" ",path.call(print,"name")]):"",n.variableDefinitions&&n.variableDefinitions.length?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"variableDefinitions"))])),softline$3,")"])):"",printDirectives(path,print,n),n.selectionSet?n.name===null?"":" ":"",path.call(print,"selectionSet")]);}case"FragmentDefinition":{return concat$4(["fragment ",path.call(print,"name")," on ",path.call(print,"typeCondition"),printDirectives(path,print,n)," ",path.call(print,"selectionSet")]);}case"SelectionSet":{return concat$4(["{",indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"selections"))])),hardline$4,"}"]);}case"Field":{return group$2(concat$4([n.alias?concat$4([path.call(print,"alias"),": "]):"",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",printDirectives(path,print,n),n.selectionSet?" ":"",path.call(print,"selectionSet")]));}case"Name":{return n.value;}case"StringValue":{return concat$4(['"',n.value,'"']);}case"IntValue":case"FloatValue":case"EnumValue":{return n.value;}case"BooleanValue":{return n.value?"true":"false";}case"NullValue":{return"null";}case"Variable":{return concat$4(["$",path.call(print,"name")]);}case"ListValue":{return group$2(concat$4(["[",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"values"))])),softline$3,"]"]));}case"ObjectValue":{return group$2(concat$4(["{",options.bracketSpacing&&n.fields.length>0?" ":"",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"fields"))])),softline$3,ifBreak$2("",options.bracketSpacing&&n.fields.length>0?" ":""),"}"]));}case"ObjectField":case"Argument":{return concat$4([path.call(print,"name"),": ",path.call(print,"value")]);}case"Directive":{return concat$4(["@",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):""]);}case"NamedType":{return path.call(print,"name");}case"VariableDefinition":{return concat$4([path.call(print,"variable"),": ",path.call(print,"type"),n.defaultValue?concat$4([" = ",path.call(print,"defaultValue")]):""]);}case"TypeExtensionDefinition":{return concat$4(["extend ",path.call(print,"definition")]);}case"ObjectTypeDefinition":{return concat$4(["type ",path.call(print,"name"),n.interfaces.length>0?concat$4([" implements ",join$3(", ",path.map(print,"interfaces"))]):"",printDirectives(path,print,n)," {",n.fields.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"fields"))])):"",hardline$4,"}"]);}case"FieldDefinition":{return concat$4([path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",": ",path.call(print,"type"),printDirectives(path,print,n)]);}case"DirectiveDefinition":{return concat$4(["directive ","@",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",concat$4([" on ",join$3(" | ",path.map(print,"locations"))])]);}case"EnumTypeDefinition":{return concat$4(["enum ",path.call(print,"name"),printDirectives(path,print,n)," {",n.values.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"values"))])):"",hardline$4,"}"]);}case"EnumValueDefinition":{return concat$4([path.call(print,"name"),printDirectives(path,print,n)]);}case"InputValueDefinition":{return concat$4([path.call(print,"name"),": ",path.call(print,"type"),n.defaultValue?concat$4([" = ",path.call(print,"defaultValue")]):"",printDirectives(path,print,n)]);}case"InputObjectTypeDefinition":{return concat$4(["input ",path.call(print,"name"),printDirectives(path,print,n)," {",n.fields.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(Line truncated
return tag.name==="css";default:return false;}}function isStyledIdentifier(node){return node.type==="Identifier"&&node.name==="styled";}var multiparser$1={getSubtreeParser:getSubtreeParser,printSubtree:printSubtree};var docBuilders$5=docBuilders$1;var concat$4=docBuilders$5.concat;var join$3=docBuilders$5.join;var hardline$4=docBuilders$5.hardline;var line$2=docBuilders$5.line;var softline$3=docBuilders$5.softline;var group$2=docBuilders$5.group;var indent$4=docBuilders$5.indent;var ifBreak$2=docBuilders$5.ifBreak;function genericPrint$1(path,options,print){var n=path.getValue();if(!n){return"";}if(typeof n==="string"){return n;}switch(n.kind){case"Document":{return concat$4([join$3(concat$4([hardline$4,hardline$4]),path.map(print,"definitions")),hardline$4]);}case"OperationDefinition":{return concat$4([n.name===null?"":n.operation,n.name?concat$4([" ",path.call(print,"name")]):"",n.variableDefinitions&&n.variableDefinitions.length?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"variableDefinitions"))])),softline$3,")"])):"",printDirectives(path,print,n),n.selectionSet?n.name===null?"":" ":"",path.call(print,"selectionSet")]);}case"FragmentDefinition":{return concat$4(["fragment ",path.call(print,"name")," on ",path.call(print,"typeCondition"),printDirectives(path,print,n)," ",path.call(print,"selectionSet")]);}case"SelectionSet":{return concat$4(["{",indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"selections"))])),hardline$4,"}"]);}case"Field":{return group$2(concat$4([n.alias?concat$4([path.call(print,"alias"),": "]):"",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",printDirectives(path,print,n),n.selectionSet?" ":"",path.call(print,"selectionSet")]));}case"Name":{return n.value;}case"StringValue":{return concat$4(['"',n.value,'"']);}case"IntValue":case"FloatValue":case"EnumValue":{return n.value;}case"BooleanValue":{return n.value?"true":"false";}case"NullValue":{return"null";}case"Variable":{return concat$4(["$",path.call(print,"name")]);}case"ListValue":{return group$2(concat$4(["[",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"values"))])),softline$3,"]"]));}case"ObjectValue":{return group$2(concat$4(["{",options.bracketSpacing&&n.fields.length>0?" ":"",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"fields"))])),softline$3,ifBreak$2("",options.bracketSpacing&&n.fields.length>0?" ":""),"}"]));}case"ObjectField":case"Argument":{return concat$4([path.call(print,"name"),": ",path.call(print,"value")]);}case"Directive":{return concat$4(["@",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):""]);}case"NamedType":{return path.call(print,"name");}case"VariableDefinition":{return concat$4([path.call(print,"variable"),": ",path.call(print,"type"),n.defaultValue?concat$4([" = ",path.call(print,"defaultValue")]):""]);}case"TypeExtensionDefinition":{return concat$4(["extend ",path.call(print,"definition")]);}case"ObjectTypeDefinition":{return concat$4(["type ",path.call(print,"name"),n.interfaces.length>0?concat$4([" implements ",join$3(", ",path.map(print,"interfaces"))]):"",printDirectives(path,print,n)," {",n.fields.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"fields"))])):"",hardline$4,"}"]);}case"FieldDefinition":{return concat$4([path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",": ",path.call(print,"type"),printDirectives(path,print,n)]);}case"DirectiveDefinition":{return concat$4(["directive ","@",path.call(print,"name"),n.arguments.length>0?group$2(concat$4(["(",indent$4(concat$4([softline$3,join$3(concat$4([ifBreak$2("",", "),softline$3]),path.map(print,"arguments"))])),softline$3,")"])):"",concat$4([" on ",join$3(" | ",path.map(print,"locations"))])]);}case"EnumTypeDefinition":{return concat$4(["enum ",path.call(print,"name"),printDirectives(path,print,n)," {",n.values.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(print,"values"))])):"",hardline$4,"}"]);}case"EnumValueDefinition":{return concat$4([path.call(print,"name"),printDirectives(path,print,n)]);}case"InputValueDefinition":{return concat$4([path.call(print,"name"),": ",path.call(print,"type"),n.defaultValue?concat$4([" = ",path.call(print,"defaultValue")]):"",printDirectives(path,print,n)]);}case"InputObjectTypeDefinition":{return concat$4(["input ",path.call(print,"name"),printDirectives(path,print,n)," {",n.fields.length>0?indent$4(concat$4([hardline$4,join$3(hardline$4,path.map(Line truncated
// http://w3c.github.io/html/single-page.html#void-elements
var voidTags={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};function genericPrint$2(path,options,print){var n=path.getValue();if(!n){return"";}if(typeof n==="string"){return n;}switch(n.type){case"root":{return printChildren(path,print);}case"directive":{return concat$5(["<",n.data,">",hardline$5]);}case"text":{return n.data.replace(/\s+/g," ").trim();}case"script":case"style":case"tag":{var selfClose=voidTags[n.name]?">":" />";var children=printChildren(path,print);var _hasNewline=util$8.hasNewlineInRange(options.originalText,util$8.locStart(n),util$8.locEnd(n));return group$3(concat$5([_hasNewline?hardline$5:"","<",n.name,printAttributes(path,print),n.children.length?">":selfClose,n.name.toLowerCase()==="html"?concat$5([hardline$5,children]):indent$5(children),n.children.length?concat$5([softline$4,"</",n.name,">"]):hardline$5]));}case"comment":{return concat$5(["<!-- ",n.data.trim()," -->"]);}case"attribute":{if(!n.value){return n.key;}return concat$5([n.key,'="',n.value,'"']);}default:throw new Error("unknown htmlparser2 type: "+n.type);}}function printAttributes(path,print){var node=path.getValue();return concat$5([node.attributes.length?" ":"",indent$5(join$4(line$3,path.map(print,"attributes")))]);}function printChildren(path,print){var children=[];path.each(function(childPath){var child=childPath.getValue();if(child.type!=="text"){children.push(hardline$5);}children.push(childPath.call(print));},"children");return concat$5(children);}var printerHtmlparser2=genericPrint$2;var util$9=util$3;var docBuilders$7=docBuilders$1;var concat$6=docBuilders$7.concat;var join$5=docBuilders$7.join;var line$4=docBuilders$7.line;var hardline$6=docBuilders$7.hardline;var softline$5=docBuilders$7.softline;var group$4=docBuilders$7.group;var fill$2=docBuilders$7.fill;var indent$6=docBuilders$7.indent;var docUtils$4=docUtils$2;var removeLines$1=docUtils$4.removeLines;function genericPrint$3(path,options,print){var n=path.getValue();if(!n){return"";}if(typeof n==="string"){return n;}switch(n.type){case"css-root":{return concat$6([printNodeSequence(path,options,print),hardline$6]);}case"css-comment":{if(n.raws.content){return n.raws.content;}var text=options.originalText.slice(util$9.locStart(n),util$9.locEnd(n));var _rawText=n.raws.text||n.text;// Workaround a bug where the location is off.
var voidTags={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};function genericPrint$2(path,options,print){var n=path.getValue();if(!n){return"";}if(typeof n==="string"){return n;}switch(n.type){case"root":{return printChildren(path,print);}case"directive":{return concat$5(["<",n.data,">",hardline$5]);}case"text":{return n.data.replace(/\s+/g," ").trim();}case"script":case"style":case"tag":{var selfClose=voidTags[n.name]?">":" />";var children=printChildren(path,print);var _hasNewline=util$8.hasNewlineInRange(options.originalText,util$8.locStart(n),util$8.locEnd(n));return group$3(concat$5([_hasNewline?hardline$5:"","<",n.name,printAttributes(path,print),n.children.length?">":selfClose,n.name.toLowerCase()==="html"?concat$5([hardline$5,children]):indent$5(children),n.children.length?concat$5([softline$4,"</",n.name,">"]):hardline$5]));}case"comment":{return concat$5(["<!-- ",n.data.trim()," -->"]);}case"attribute":{if(!n.value){return n.key;}return concat$5([n.key,'="',n.value,'"']);}default:/* istanbul ignore next */throw new Error("unknown htmlparser2 type: "+n.type);}}function printAttributes(path,print){var node=path.getValue();return concat$5([node.attributes.length?" ":"",indent$5(join$4(line$3,path.map(print,"attributes")))]);}function printChildren(path,print){var children=[];path.each(function(childPath){var child=childPath.getValue();if(child.type!=="text"){children.push(hardline$5);}children.push(childPath.call(print));},"children");return concat$5(children);}var printerHtmlparser2=genericPrint$2;var util$9=util$3;var docBuilders$7=docBuilders$1;var concat$6=docBuilders$7.concat;var join$5=docBuilders$7.join;var line$4=docBuilders$7.line;var hardline$6=docBuilders$7.hardline;var softline$5=docBuilders$7.softline;var group$4=docBuilders$7.group;var fill$2=docBuilders$7.fill;var indent$6=docBuilders$7.indent;var docUtils$4=docUtils$2;var removeLines$1=docUtils$4.removeLines;function genericPrint$3(path,options,print){var n=path.getValue();/* istanbul ignore if */if(!n){return"";}if(typeof n==="string"){return n;}switch(n.type){case"css-root":{return concat$6([printNodeSequence(path,options,print),hardline$6]);}case"css-comment":{if(n.raws.content){return n.raws.content;}var text=options.originalText.slice(util$9.locStart(n),util$9.locEnd(n));var _rawText=n.raws.text||n.text;// Workaround a bug where the location is off.
// https://github.com/postcss/postcss-scss/issues/63
if(text.indexOf(_rawText)===-1){if(n.raws.inline){return concat$6(["// ",_rawText]);}return concat$6(["/* ",_rawText," */"]);}return text;}case"css-rule":{return concat$6([path.call(print,"selector"),n.important?" !important":"",n.nodes?concat$6([" {",n.nodes.length>0?indent$6(concat$6([hardline$6,printNodeSequence(path,options,print)])):"",hardline$6,"}"]):";"]);}case"css-decl":{// When the following less construct &:extend(.foo); is parsed with scss,
// it will put a space after `:` and break it. Ideally we should parse
// less files with less, but we can hardcode this to work with scss as
// well.
var isValueExtend=n.value.type==="value-root"&&n.value.group.type==="value-value"&&n.value.group.group.type==="value-func"&&n.value.group.group.value==="extend";var isComposed=n.value.type==="value-root"&&n.value.group.type==="value-value"&&n.prop==="composes";return concat$6([n.raws.before.replace(/[\s;]/g,""),n.prop,":",isValueExtend?"":" ",isComposed?removeLines$1(path.call(print,"value")):path.call(print,"value"),n.important?" !important":"",n.nodes?concat$6([" {",indent$6(concat$6([softline$5,printNodeSequence(path,options,print)])),softline$5,"}"]):";"]);}case"css-atrule":{var hasParams=n.params&&!(n.params.type==="media-query-list"&&n.params.value==="");return concat$6(["@",n.name,hasParams?concat$6([" ",path.call(print,"params")]):"",n.nodes?concat$6([" {",indent$6(concat$6([n.nodes.length>0?softline$5:"",printNodeSequence(path,options,print)])),softline$5,"}"]):";"]);}case"css-import":{return concat$6(["@",n.name," ",n.directives?concat$6([n.directives," "]):"",adjustStrings(n.importPath,options),n.nodes.length>0?concat$6([" {",indent$6(concat$6([softline$5,printNodeSequence(path,options,print)])),softline$5,"}"]):";"]);}// postcss-media-query-parser
case"media-query-list":{var parts=[];path.each(function(childPath){var node=childPath.getValue();if(node.type==="media-query"&&node.value===""){return;}parts.push(childPath.call(print));},"nodes");return group$4(indent$6(join$5(concat$6([",",line$4]),parts)));}case"media-query":{return join$5(" ",path.map(print,"nodes"));}case"media-type":{var parent=path.getParentNode(2);if(parent.type==="css-atrule"&&parent.name.toLowerCase()==="charset"){return n.value;}return adjustStrings(n.value,options);}case"media-feature-expression":{if(!n.nodes){return n.value;}return concat$6(["(",concat$6(path.map(print,"nodes")),")"]);}case"media-feature":{return adjustStrings(n.value.replace(/ +/g," "),options);}case"media-colon":{return concat$6([n.value," "]);}case"media-value":{return adjustNumbers(adjustStrings(n.value,options));}case"media-keyword":{return n.value;}case"media-url":{return n.value;}case"media-unknown":{return adjustStrings(n.value,options);}// postcss-selector-parser
case"selector-root":{return group$4(join$5(concat$6([",",hardline$6]),path.map(print,"nodes")));}case"selector-comment":{return n.value;}case"selector-string":{return adjustStrings(n.value,options);}case"selector-tag":{return n.value;}case"selector-id":{return concat$6(["#",n.value]);}case"selector-class":{return concat$6([".",n.value]);}case"selector-attribute":{return concat$6(["[",n.attribute,n.operator?n.operator:"",n.value?quoteAttributeValue(adjustStrings(n.value,options),options):"",n.insensitive?" i":"","]"]);}case"selector-combinator":{if(n.value==="+"||n.value===">"||n.value==="~"){var _parent2=path.getParentNode();var leading=_parent2.type==="selector-selector"&&_parent2.nodes[0]===n?"":line$4;return concat$6([leading,n.value," "]);}return n.value.trim()||line$4;}case"selector-universal":{return n.value;}case"selector-selector":{return group$4(indent$6(concat$6(path.map(print,"nodes"))));}case"selector-pseudo":{return concat$6([n.value,n.nodes&&n.nodes.length>0?concat$6(["(",join$5(", ",path.map(print,"nodes")),")"]):""]);}case"selector-nesting":{return printValue(n.value);}// postcss-values-parser
case"value-root":{return path.call(print,"group");}case"value-comma_group":{var printed=path.map(print,"groups");var _parts=[];for(var _i19=0;_i19<n.groups.length;++_i19){_parts.push(printed[_i19]);if(_i19!==n.groups.length-1&&n.groups[_i19+1].raws&&n.groups[_i19+1].raws.before!==""){if(n.groups[_i19+1].type==="value-operator"&&["+","-","/","*","%"].indexOf(n.groups[_i19+1].value)!==-1){_parts.push(" ");}else{_parts.push(line$4);}}}return group$4(indent$6(fill$2(_parts)));}case"value-paren_group":{var _parent3=path.getParentNode();var isURLCall=_parent3&&_parent3.type==="value-func"&&_parent3.value==="url";if(isURLCall&&(n.groups.length===1||n.groups.length>0&&n.groups[0].type==="value-comma_group"&&n.groups[0].groups.length>0&&n.groups[0].groups[0].type==="value-word"&&n.groups[0].groups[0].value==="data")){return concat$6([n.open?path.call(print,"open"):"",join$5(",",path.map(print,"groups")),n.close?path.call(print,"close"):""]);}if(!n.open){var _printed=path.map(print,"groups");var res=[];for(var _i20=0;_i20<_printed.length;_i20++){if(_i20!==0){res.push(concat$6([",",line$4]));}res.push(_printed[_i20]);}return group$4(indent$6(fill$2(res)));}return group$4(concat$6([n.open?path.call(print,"open"):"",indent$6(concat$6([softline$5,join$5(concat$6([",",line$4]),path.map(print,"groups"))])),softline$5,n.close?path.call(print,"close"):""]));}case"value-value":{return path.call(print,"group");}case"value-func":{return concat$6([n.value,path.call(print,"group")]);}case"value-paren":{if(n.raws.before!==""){return concat$6([line$4,n.value]);}return n.value;}case"value-number":{return concat$6([printNumber$1(n.value),n.unit]);}case"value-operator":{return n.value;}case"value-word":{if(n.isColor&&n.isHex){return n.value.toLowerCase();}return n.value;}case"value-colon":{return n.value;}case"value-comma":{return concat$6([n.value," "]);}case"value-string":{return util$9.printString(n.raws.quote+n.value+n.raws.quote,options);}case"value-atword":{return concat$6(["@",n.value]);}default:throw new Error("unknown postcss type: "+JSON.stringify(n.type));}}function printNodeSequence(path,options,print){var node=path.getValue();var parts=[];var i=0;path.map(function(pathChild){var prevNode=node.nodes[i-1];if(prevNode&&prevNode.type==="css-comment"&&prevNode.text.trim()==="prettier-ignore"){var childNode=pathChild.getValue();parts.push(options.originalText.slice(util$9.locStart(childNode),util$9.locEnd(childNode)));}else{parts.push(pathChild.call(print));}if(i!==node.nodes.length-1){if(node.nodes[i+1].type==="css-comment"&&!util$9.hasNewline(options.originalText,util$9.locStart(node.nodes[i+1]),{backwards:true})||node.nodes[i+1].type==="css-atrule"&&node.nodes[i+1].name==="else"&&node.nodes[i].type!=="css-comment"){parts.push(" ");}else{parts.push(hardline$6);if(util$9.isNextLineEmpty(options.originalText,pathChild.getValue())){parts.push(hardline$6);}}}i++;},"nodes");return concat$6(parts);}function printValue(value){return value;}var STRING_REGEX=/(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g;var NUMBER_REGEX=/(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;var STRING_OR_NUMBER_REGEX=RegExp(STRING_REGEX.source+'|('+NUMBER_REGEX.source+')',"g");function adjustStrings(value,options){return value.replace(STRING_REGEX,function(match){return util$9.printString(match,options);});}function quoteAttributeValue(value,options){var quote=options.singleQuote?"'":'"';return value.includes('"')||value.includes("'")?value:quote+value+quote;}function adjustNumbers(value){return value.replace(STRING_OR_NUMBER_REGEX,function(match,quote,number){return number?printNumber$1(number):match;});}function printNumber$1(rawNumber){return util$9.printNumber(rawNumber// Remove trailing `.0`.
).replace(/\.0(?=$|e)/,"");}var printerPostcss=genericPrint$3;var assert$1=require$$0;var comments$3=comments$1;var FastPath=fastPath;var multiparser=multiparser$1;var util$5=util$3;var isIdentifierName=utils.keyword.isIdentifierNameES6;var docBuilders$3=docBuilders$1;var concat$2=docBuilders$3.concat;var join$2=docBuilders$3.join;var line$1=docBuilders$3.line;var hardline$2=docBuilders$3.hardline;var softline$1=docBuilders$3.softline;var literalline$1=docBuilders$3.literalline;var group$1=docBuilders$3.group;var indent$2=docBuilders$3.indent;var align$1=docBuilders$3.align;var conditionalGroup$1=docBuilders$3.conditionalGroup;var fill$1=docBuilders$3.fill;var ifBreak$1=docBuilders$3.ifBreak;var breakParent$2=docBuilders$3.breakParent;var lineSuffixBoundary$1=docBuilders$3.lineSuffixBoundary;var addAlignmentToDoc$1=docBuilders$3.addAlignmentToDoc;var docUtils=docUtils$2;var willBreak=docUtils.willBreak;var isLineNext=docUtils.isLineNext;var isEmpty=docUtils.isEmpty;var rawText=docUtils.rawText;function shouldPrintComma(options,level){level=level||"es5";switch(options.trailingComma){case"all":if(level==="all"){return true;}// fallthrough
var isValueExtend=n.value.type==="value-root"&&n.value.group.type==="value-value"&&n.value.group.group.type==="value-func"&&n.value.group.group.value==="extend";var isComposed=n.value.type==="value-root"&&n.value.group.type==="value-value"&&n.prop==="composes";return concat$6([n.raws.before.replace(/[\s;]/g,""),n.prop.startsWith("--")?n.prop:maybeToLowerCase(n.prop),":",isValueExtend?"":" ",isComposed?removeLines$1(path.call(print,"value")):path.call(print,"value"),n.important?" !important":"",n.nodes?concat$6([" {",indent$6(concat$6([softline$5,printNodeSequence(path,options,print)])),softline$5,"}"]):";"]);}case"css-atrule":{var hasParams=n.params&&!(n.params.type==="media-query-list"&&n.params.value==="");var isDetachedRulesetCall=hasParams&&n.params.type==="media-query-list"&&/^\(\s*\)$/.test(n.params.value);return concat$6(["@",isDetachedRulesetCall?n.name:maybeToLowerCase(n.name),hasParams?concat$6([isDetachedRulesetCall?"":" ",path.call(print,"params")]):"",n.nodes?concat$6([" {",indent$6(concat$6([n.nodes.length>0?softline$5:"",printNodeSequence(path,options,print)])),softline$5,"}"]):";"]);}case"css-import":{return concat$6(["@",maybeToLowerCase(n.name)," ",n.directives?concat$6([n.directives," "]):"",adjustStrings(n.importPath,options),n.nodes.length>0?concat$6([" {",indent$6(concat$6([softline$5,printNodeSequence(path,options,print)])),softline$5,"}"]):";"]);}// postcss-media-query-parser
case"media-query-list":{var parts=[];path.each(function(childPath){var node=childPath.getValue();if(node.type==="media-query"&&node.value===""){return;}parts.push(childPath.call(print));},"nodes");return group$4(indent$6(join$5(concat$6([",",line$4]),parts)));}case"media-query":{return join$5(" ",path.map(print,"nodes"));}case"media-type":{var parent=path.getParentNode(2);if(parent.type==="css-atrule"&&parent.name.toLowerCase()==="charset"){return n.value;}return adjustNumbers(adjustStrings(n.value,options));}case"media-feature-expression":{if(!n.nodes){return n.value;}return concat$6(["(",concat$6(path.map(print,"nodes")),")"]);}case"media-feature":{return maybeToLowerCase(adjustStrings(n.value.replace(/ +/g," "),options));}case"media-colon":{return concat$6([n.value," "]);}case"media-value":{return adjustNumbers(adjustStrings(n.value,options));}case"media-keyword":{return adjustStrings(n.value,options);}case"media-url":{return adjustStrings(n.value,options);}case"media-unknown":{return adjustStrings(n.value,options);}// postcss-selector-parser
case"selector-root-invalid":{// This is likely a SCSS nested property: `background: { color: red; }`.
return adjustNumbers(adjustStrings(maybeToLowerCase(n.value),options));}case"selector-root":{return group$4(join$5(concat$6([",",hardline$6]),path.map(print,"nodes")));}case"selector-comment":{return n.value;}case"selector-string":{return adjustStrings(n.value,options);}case"selector-tag":{return maybeToLowerCase(n.value);}case"selector-id":{return concat$6(["#",n.value]);}case"selector-class":{return concat$6([".",adjustNumbers(adjustStrings(n.value,options))]);}case"selector-attribute":{return concat$6(["[",maybeToLowerCase(n.attribute),n.operator?n.operator:"",n.value?quoteAttributeValue(adjustStrings(n.value,options),options):"",n.insensitive?" i":"","]"]);}case"selector-combinator":{if(n.value==="+"||n.value===">"||n.value==="~"){var _parent2=path.getParentNode();var _leading=_parent2.type==="selector-selector"&&_parent2.nodes[0]===n?"":line$4;return concat$6([_leading,n.value," "]);}var leading=n.value.trim().startsWith("(")?line$4:"";var value=adjustNumbers(adjustStrings(n.value.trim(),options))||line$4;return concat$6([leading,value]);}case"selector-universal":{return n.value;}case"selector-selector":{return group$4(indent$6(concat$6(path.map(print,"nodes"))));}case"selector-pseudo":{return concat$6([maybeToLowerCase(n.value),n.nodes&&n.nodes.length>0?concat$6(["(",join$5(", ",path.map(print,"nodes")),")"]):""]);}case"selector-nesting":{return printValue(n.value);}// postcss-values-parser
case"value-root":{return path.call(print,"group");}case"value-comma_group":{var printed=path.map(print,"groups");var _parts=[];for(var _i18=0;_i18<n.groups.length;++_i18){_parts.push(printed[_i18]);if(_i18!==n.groups.length-1&&n.groups[_i18+1].raws&&n.groups[_i18+1].raws.before!==""){if(n.groups[_i18+1].type==="value-operator"&&["+","-","/","*","%"].indexOf(n.groups[_i18+1].value)!==-1){_parts.push(" ");}else{_parts.push(line$4);}}}return group$4(indent$6(fill$2(_parts)));}case"value-paren_group":{var _parent3=path.getParentNode();var isURLCall=_parent3&&_parent3.type==="value-func"&&_parent3.value==="url";if(isURLCall&&(n.groups.length===1||n.groups.length>0&&n.groups[0].type==="value-comma_group"&&n.groups[0].groups.length>0&&n.groups[0].groups[0].type==="value-word"&&n.groups[0].groups[0].value==="data")){return concat$6([n.open?path.call(print,"open"):"",join$5(",",path.map(print,"groups")),n.close?path.call(print,"close"):""]);}if(!n.open){var _printed=path.map(print,"groups");var res=[];for(var _i19=0;_i19<_printed.length;_i19++){if(_i19!==0){res.push(concat$6([",",line$4]));}res.push(_printed[_i19]);}return group$4(indent$6(fill$2(res)));}return group$4(concat$6([n.open?path.call(print,"open"):"",indent$6(concat$6([softline$5,join$5(concat$6([",",line$4]),path.map(print,"groups"))])),softline$5,n.close?path.call(print,"close"):""]));}case"value-value":{return path.call(print,"group");}case"value-func":{return concat$6([n.value,path.call(print,"group")]);}case"value-paren":{if(n.raws.before!==""){return concat$6([line$4,n.value]);}return n.value;}case"value-number":{return concat$6([printNumber$1(n.value),maybeToLowerCase(n.unit)]);}case"value-operator":{return n.value;}case"value-word":{if(n.isColor&&n.isHex){return n.value.toLowerCase();}return n.value;}case"value-colon":{return n.value;}case"value-comma":{return concat$6([n.value," "]);}case"value-string":{return util$9.printString(n.raws.quote+n.value+n.raws.quote,options);}case"value-atword":{return concat$6(["@",n.value]);}default:/* istanbul ignore next */throw new Error("unknown postcss type: "+JSON.stringify(n.type));}}function printNodeSequence(path,options,print){var node=path.getValue();var parts=[];var i=0;path.map(function(pathChild){var prevNode=node.nodes[i-1];if(prevNode&&prevNode.type==="css-comment"&&prevNode.text.trim()==="prettier-ignore"){var childNode=pathChild.getValue();parts.push(options.originalText.slice(util$9.locStart(childNode),util$9.locEnd(childNode)));}else{parts.push(pathChild.call(print));}if(i!==node.nodes.length-1){if(node.nodes[i+1].type==="css-comment"&&!util$9.hasNewline(options.originalText,util$9.locStart(node.nodes[i+1]),{backwards:true})||node.nodes[i+1].type==="css-atrule"&&node.nodes[i+1].name==="else"&&node.nodes[i].type!=="css-comment"){parts.push(" ");}else{parts.push(hardline$6);if(util$9.isNextLineEmpty(options.originalText,pathChild.getValue())){parts.push(hardline$6);}}}i++;},"nodes");return concat$6(parts);}function printValue(value){return value;}var STRING_REGEX=/(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g;var NUMBER_REGEX=/(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;var STANDARD_UNIT_REGEX=/[a-zA-Z]+/g;var WORD_PART_REGEX=/[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g;var ADJUST_NUMBERS_REGEX=RegExp(STRING_REGEX.source+'|'+('('+WORD_PART_REGEX.source+')?')+('('+NUMBER_REGEX.source+')')+('('+STANDARD_UNIT_REGEX.source+')?'),"g");function adjustStrings(value,options){return value.replace(STRING_REGEX,function(match){return util$9.printString(match,options);});}function quoteAttributeValue(value,options){var quote=options.singleQuote?"'":'"';return value.includes('"')||value.includes("'")?value:quote+value+quote;}function adjustNumbers(value){return value.replace(ADJUST_NUMBERS_REGEX,function(match,quote,wordPart,number,unit){return!wordPart&&number?(wordPart||"")+printNumber$1(number)+maybeToLowerCase(unit||""):match;});}function printNumber$1(rawNumber){return util$9.printNumber(rawNumber// Remove trailing `.0`.
).replace(/\.0(?=$|e)/,"");}function maybeToLowerCase(value){return value.includes("$")||value.includes("@")||value.includes("#")?value:value.toLowerCase();}var printerPostcss=genericPrint$3;var assert$1=require$$0;var comments$3=comments$1;var FastPath=fastPath;var multiparser=multiparser$1;var util$5=util$3;var isIdentifierName=utils.keyword.isIdentifierNameES6;var docBuilders$3=docBuilders$1;var concat$2=docBuilders$3.concat;var join$2=docBuilders$3.join;var line$1=docBuilders$3.line;var hardline$2=docBuilders$3.hardline;var softline$1=docBuilders$3.softline;var literalline$1=docBuilders$3.literalline;var group$1=docBuilders$3.group;var indent$2=docBuilders$3.indent;var align$1=docBuilders$3.align;var conditionalGroup$1=docBuilders$3.conditionalGroup;var fill$1=docBuilders$3.fill;var ifBreak$1=docBuilders$3.ifBreak;var breakParent$2=docBuilders$3.breakParent;var lineSuffixBoundary$1=docBuilders$3.lineSuffixBoundary;var addAlignmentToDoc$1=docBuilders$3.addAlignmentToDoc;var docUtils=docUtils$2;var willBreak=docUtils.willBreak;var isLineNext=docUtils.isLineNext;var isEmpty=docUtils.isEmpty;var rawText=docUtils.rawText;function shouldPrintComma(options,level){level=level||"es5";switch(options.trailingComma){case"all":if(level==="all"){return true;}// fallthrough
case"es5":if(level==="es5"){return true;}// fallthrough
case"none":default:return false;}}function getPrintFunction(options){switch(options.parser){case"graphql":return printerGraphql;case"parse5":return printerHtmlparser2;case"postcss":return printerPostcss;default:return genericPrintNoParens;}}function hasIgnoreComment(path){var node=path.getValue();return hasNodeIgnoreComment(node)||hasJsxIgnoreComment(path);}function hasNodeIgnoreComment(node){return node&&node.comments&&node.comments.length>0&&node.comments.some(function(comment){return comment.value.trim()==="prettier-ignore";});}function hasJsxIgnoreComment(path){var node=path.getValue();var parent=path.getParentNode();if(!parent||!node||node.type!=="JSXElement"||parent.type!=="JSXElement"){return false;}// Lookup the previous sibling, ignoring any empty JSXText elements
var index=parent.children.indexOf(node);var prevSibling=null;for(var _i21=index;_i21>0;_i21--){var candidate=parent.children[_i21-1];if(candidate.type==="JSXText"&&!isMeaningfulJSXText(candidate)){continue;}prevSibling=candidate;break;}return prevSibling&&prevSibling.type==="JSXExpressionContainer"&&prevSibling.expression.type==="JSXEmptyExpression"&&prevSibling.expression.comments&&prevSibling.expression.comments.find(function(comment){return comment.value.trim()==="prettier-ignore";});}function genericPrint(path,options,printPath,args){assert$1.ok(path instanceof FastPath);var node=path.getValue();// Escape hatch
var index=parent.children.indexOf(node);var prevSibling=null;for(var _i20=index;_i20>0;_i20--){var candidate=parent.children[_i20-1];if(candidate.type==="JSXText"&&!isMeaningfulJSXText(candidate)){continue;}prevSibling=candidate;break;}return prevSibling&&prevSibling.type==="JSXExpressionContainer"&&prevSibling.expression.type==="JSXEmptyExpression"&&prevSibling.expression.comments&&prevSibling.expression.comments.find(function(comment){return comment.value.trim()==="prettier-ignore";});}function genericPrint(path,options,printPath,args){assert$1.ok(path instanceof FastPath);var node=path.getValue();// Escape hatch
if(hasIgnoreComment(path)){return options.originalText.slice(util$5.locStart(node),util$5.locEnd(node));}if(node){// Potentially switch to a different parser
var next=multiparser.getSubtreeParser(path,options);if(next){try{return multiparser.printSubtree(next,path,printPath,options);}catch(error){/* istanbul ignore if */if(process.env.PRETTIER_DEBUG){var e=new Error(error);e.parser=next.options.parser;throw e;}// Continue with current parser
}}}var needsParens=false;var linesWithoutParens=getPrintFunction(options)(path,options,printPath,args);if(!node||isEmpty(linesWithoutParens)){return linesWithoutParens;}var decorators=[];if(node.decorators&&node.decorators.length>0&&// If the parent node is an export declaration, it will be
@@ -438,11 +443,17 @@ case"ParenthesizedExpression":return concat$2(["(",path.call(print,"expression")
// this.hasPlugin("dynamicImports") &&
// this.lookahead().type === tt.parenLeft
// ) {
if(isInsideParenthesis){return concat$2(_parts2);}if(parent.type==="UnaryExpression"){return group$1(concat$2([indent$2(concat$2([softline$1,concat$2(_parts2)])),softline$1]));}// Avoid indenting sub-expressions in assignment/return/etc statements.
if(parent.type==="AssignmentExpression"||parent.type==="VariableDeclarator"||shouldInlineLogicalExpression(n)||parent.type==="ReturnStatement"||parent.type==="JSXExpressionContainer"&&parentParent.type==="JSXAttribute"||n===parent.body&&parent.type==="ArrowFunctionExpression"||n!==parent.body&&parent.type==="ForStatement"||parent.type==="ObjectProperty"||parent.type==="Property"||parent.type==="ConditionalExpression"){return group$1(concat$2(_parts2));}var rest=concat$2(_parts2.slice(1));return group$1(concat$2([// Don't include the initial expression in the indentation
if(isInsideParenthesis){return concat$2(_parts2);}if(parent.type==="UnaryExpression"){return group$1(concat$2([indent$2(concat$2([softline$1,concat$2(_parts2)])),softline$1]));}// Avoid indenting sub-expressions in some cases where the first sub-expression is already
// idented accordingly. We should ident sub-expressions where the first case isn't idented.
var shouldNotIdent=parent.type==="ReturnStatement"||parent.type==="JSXExpressionContainer"&&parentParent.type==="JSXAttribute"||n===parent.body&&parent.type==="ArrowFunctionExpression"||n!==parent.body&&parent.type==="ForStatement"||parent.type==="ConditionalExpression"&&parentParent.type!=="ReturnStatement";var shouldIdentIfInlining=parent.type==="AssignmentExpression"||parent.type==="VariableDeclarator"||parent.type==="ObjectProperty"||parent.type==="Property";var logicalSubExpression=n.left.type==="LogicalExpression";if(shouldNotIdent||shouldInlineLogicalExpression(n)&&!logicalSubExpression||!shouldInlineLogicalExpression(n)&&shouldIdentIfInlining){return group$1(concat$2(_parts2));}var rest=concat$2(_parts2.slice(1));// Break the closing paren to keep the chain right after it:
// (a &&
// b &&
// c
// ).call()
var breakClosingParen=parent.type==="MemberExpression"&&!parent.computed;return group$1(concat$2([// Don't include the initial expression in the indentation
// level. The first item is guaranteed to be the first
// left-most expression.
_parts2.length>0?_parts2[0]:"",indent$2(rest)]));}case"AssignmentPattern":return concat$2([path.call(print,"left")," = ",path.call(print,"right")]);case"TSTypeAssertionExpression":return concat$2(["<",path.call(print,"typeAnnotation"),">",path.call(print,"expression")]);case"MemberExpression":{var _parent4=path.getParentNode();var firstNonMemberParent=void 0;var _i22=0;do{firstNonMemberParent=path.getParentNode(_i22);_i22++;}while(firstNonMemberParent&&firstNonMemberParent.type==="MemberExpression");var shouldInline=firstNonMemberParent&&(firstNonMemberParent.type==="VariableDeclarator"&&firstNonMemberParent.id.type!=="Identifier"||firstNonMemberParent.type==="AssignmentExpression"&&firstNonMemberParent.left.type!=="Identifier")||n.computed||n.object.type==="Identifier"&&n.property.type==="Identifier"&&_parent4.type!=="MemberExpression";return concat$2([path.call(print,"object"),shouldInline?printMemberLookup(path,options,print):group$1(indent$2(concat$2([softline$1,printMemberLookup(path,options,print)])))]);}case"MetaProperty":return concat$2([path.call(print,"meta"),".",path.call(print,"property")]);case"BindExpression":if(n.object){parts.push(path.call(print,"object"));}parts.push(printBindExpressionCallee(path,options,print));return concat$2(parts);case"Identifier":{var parentNode=path.getParentNode();var isFunctionDeclarationIdentifier=parentNode.type==="DeclareFunction"&&parentNode.id===n;return concat$2([n.name,printOptionalToken(path),n.typeAnnotation&&!isFunctionDeclarationIdentifier?": ":"",path.call(print,"typeAnnotation")]);}case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"ExperimentalRestProperty":case"ExperimentalSpreadProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":case"ObjectTypeSpreadProperty":return concat$2(["...",path.call(print,"argument"),n.typeAnnotation?": ":"",path.call(print,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSNamespaceFunctionDeclaration":if(isNodeStartingWithDeclare(n,options)){parts.push("declare ");}parts.push(printFunctionDeclaration(path,print,options));if(!n.body){parts.push(semi);}return concat$2(parts);case"ArrowFunctionExpression":{if(n.async){parts.push("async ");}if(canPrintParamsWithoutParens(n)){parts.push(path.call(print,"params",0));}else{parts.push(group$1(concat$2([printFunctionParams(path,print,options,/* expandLast */args&&(args.expandLastArg||args.expandFirstArg),/* printTypeParams */true),printReturnType(path,print)])));}parts.push(" =>");var body=path.call(function(bodyPath){return print(bodyPath,args);},"body");// We want to always keep these types of nodes on the same line
_parts2.length>0?_parts2[0]:"",indent$2(rest),breakClosingParen?softline$1:""]));}case"AssignmentPattern":return concat$2([path.call(print,"left")," = ",path.call(print,"right")]);case"TSTypeAssertionExpression":return concat$2(["<",path.call(print,"typeAnnotation"),">",path.call(print,"expression")]);case"MemberExpression":{var _parent4=path.getParentNode();var firstNonMemberParent=void 0;var _i21=0;do{firstNonMemberParent=path.getParentNode(_i21);_i21++;}while(firstNonMemberParent&&firstNonMemberParent.type==="MemberExpression");var shouldInline=firstNonMemberParent&&(firstNonMemberParent.type==="VariableDeclarator"&&firstNonMemberParent.id.type!=="Identifier"||firstNonMemberParent.type==="AssignmentExpression"&&firstNonMemberParent.left.type!=="Identifier")||n.computed||n.object.type==="Identifier"&&n.property.type==="Identifier"&&_parent4.type!=="MemberExpression";return concat$2([path.call(print,"object"),shouldInline?printMemberLookup(path,options,print):group$1(indent$2(concat$2([softline$1,printMemberLookup(path,options,print)])))]);}case"MetaProperty":return concat$2([path.call(print,"meta"),".",path.call(print,"property")]);case"BindExpression":if(n.object){parts.push(path.call(print,"object"));}parts.push(printBindExpressionCallee(path,options,print));return concat$2(parts);case"Identifier":{var parentNode=path.getParentNode();var isFunctionDeclarationIdentifier=parentNode.type==="DeclareFunction"&&parentNode.id===n;return concat$2([n.name,printOptionalToken(path),n.typeAnnotation&&!isFunctionDeclarationIdentifier?": ":"",path.call(print,"typeAnnotation")]);}case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"ExperimentalRestProperty":case"ExperimentalSpreadProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":case"ObjectTypeSpreadProperty":return concat$2(["...",path.call(print,"argument"),n.typeAnnotation?": ":"",path.call(print,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSNamespaceFunctionDeclaration":if(isNodeStartingWithDeclare(n,options)){parts.push("declare ");}parts.push(printFunctionDeclaration(path,print,options));if(!n.body){parts.push(semi);}return concat$2(parts);case"ArrowFunctionExpression":{if(n.async){parts.push("async ");}if(canPrintParamsWithoutParens(n)){parts.push(path.call(print,"params",0));}else{parts.push(group$1(concat$2([printFunctionParams(path,print,options,/* expandLast */args&&(args.expandLastArg||args.expandFirstArg),/* printTypeParams */true),printReturnType(path,print)])));}parts.push(" =>");var body=path.call(function(bodyPath){return print(bodyPath,args);},"body");// We want to always keep these types of nodes on the same line
// as the arrow.
if(!hasLeadingOwnLineComment(options.originalText,n.body)&&(n.body.type==="ArrayExpression"||n.body.type==="ObjectExpression"||n.body.type==="BlockStatement"||n.body.type==="JSXElement"||isTemplateOnItsOwnLine(n.body,options.originalText)||n.body.type==="ArrowFunctionExpression")){return group$1(concat$2([concat$2(parts)," ",body]));}// We handle sequence expressions as the body of arrows specially,
// so that the required parentheses end up on their own lines.
@@ -496,18 +507,23 @@ case"DirectiveLiteral":return nodeStr(n,options);case"UnaryExpression":parts.pus
var jsxMode=false;var _parent8=path.getParentNode();var forceNoIndent=_parent8.type==="ConditionalExpression";// Find the outermost non-ConditionalExpression parent, and the outermost
// ConditionalExpression parent. We'll use these to determine if we should
// print in JSX mode.
var currentParent=void 0;var previousParent=void 0;var _i23=0;do{previousParent=currentParent||n;currentParent=path.getParentNode(_i23);_i23++;}while(currentParent&&currentParent.type==="ConditionalExpression");var firstNonConditionalParent=currentParent||_parent8;var lastConditionalParent=previousParent;if(n.test.type==="JSXElement"||n.consequent.type==="JSXElement"||n.alternate.type==="JSXElement"||_parent8.type==="JSXExpressionContainer"||firstNonConditionalParent.type==="JSXExpressionContainer"||conditionalExpressionChainContainsJSX(lastConditionalParent)){jsxMode=true;forceNoIndent=true;// Even though they don't need parens, we wrap (almost) everything in
var currentParent=void 0;var previousParent=void 0;var _i22=0;do{previousParent=currentParent||n;currentParent=path.getParentNode(_i22);_i22++;}while(currentParent&&currentParent.type==="ConditionalExpression");var firstNonConditionalParent=currentParent||_parent8;var lastConditionalParent=previousParent;if(n.test.type==="JSXElement"||n.consequent.type==="JSXElement"||n.alternate.type==="JSXElement"||conditionalExpressionChainContainsJSX(lastConditionalParent)){jsxMode=true;forceNoIndent=true;// Even though they don't need parens, we wrap (almost) everything in
// parens when using ?: within JSX, because the parens are analagous to
// curly braces in an if statement.
var wrap=function wrap(doc){return concat$2([ifBreak$1("(",""),indent$2(concat$2([softline$1,doc])),softline$1,ifBreak$1(")","")]);};// The only things we don't wrap are:
// * Nested conditional expressions
// * Nested conditional expressions in alternates
// * null
var shouldNotWrap=function shouldNotWrap(node){return node.type==="ConditionalExpression"||node.type==="NullLiteral"||node.type==="Literal"&&node.value===null;};parts.push(" ? ",shouldNotWrap(n.consequent)?path.call(print,"consequent"):wrap(path.call(print,"consequent"))," : ",shouldNotWrap(n.alternate)?path.call(print,"alternate"):wrap(path.call(print,"alternate")));}else{// normal mode
var _isNull=function _isNull(node){return node.type==="NullLiteral"||node.type==="Literal"&&node.value===null;};parts.push(" ? ",_isNull(n.consequent)?path.call(print,"consequent"):wrap(path.call(print,"consequent"))," : ",n.alternate.type==="ConditionalExpression"||_isNull(n.alternate)?path.call(print,"alternate"):wrap(path.call(print,"alternate")));}else{// normal mode
parts.push(line$1,"? ",n.consequent.type==="ConditionalExpression"?ifBreak$1("","("):"",align$1(2,path.call(print,"consequent")),n.consequent.type==="ConditionalExpression"?ifBreak$1("",")"):"",line$1,": ",align$1(2,path.call(print,"alternate")));}// In JSX mode, we want a whole chain of ConditionalExpressions to all
// break if any of them break. That means we should only group around the
// outer-most ConditionalExpression.
var maybeGroup=function maybeGroup(doc){return jsxMode?_parent8===firstNonConditionalParent?group$1(doc):doc:group$1(doc);};// Always group in normal mode.
return maybeGroup(concat$2([path.call(print,"test"),forceNoIndent?concat$2(parts):indent$2(concat$2(parts))]));}case"VariableDeclaration":{var printed=path.map(function(childPath){return print(childPath);},"declarations");// We generally want to terminate all variable declarations with a
// Break the closing paren to keep the chain right after it:
// (a
// ? b
// : c
// ).call()
var _breakClosingParen=!jsxMode&&_parent8.type==="MemberExpression"&&!_parent8.computed;return maybeGroup(concat$2([path.call(print,"test"),forceNoIndent?concat$2(parts):indent$2(concat$2(parts)),_breakClosingParen?softline$1:""]));}case"VariableDeclaration":{var printed=path.map(function(childPath){return print(childPath);},"declarations");// We generally want to terminate all variable declarations with a
// semicolon, except when they in the () part of for loops.
var _parentNode=path.getParentNode();var isParentForLoop=_parentNode.type==="ForStatement"||_parentNode.type==="ForInStatement"||_parentNode.type==="ForOfStatement"||_parentNode.type==="ForAwaitStatement";var hasValue=n.declarations.some(function(decl){return decl.init;});var firstVariable=void 0;if(printed.length===1){firstVariable=printed[0];}else if(printed.length>1){// Indent first var to comply with eslint one-var rule
firstVariable=indent$2(printed[0]);}parts=[isNodeStartingWithDeclare(n,options)?"declare ":"",n.kind,firstVariable?concat$2([" ",firstVariable]):"",indent$2(concat$2(printed.slice(1).map(function(p){return concat$2([",",hasValue&&!isParentForLoop?hardline$2:line$1,p]);})))];if(!(isParentForLoop&&_parentNode.body!==n)){parts.push(semi);}return group$1(concat$2(parts));}case"VariableDeclarator":return printAssignment(n.id,concat$2([path.call(print,"id"),path.call(print,"typeParameters")])," =",n.init,n.init&&path.call(print,"init"),options);case"WithStatement":return group$1(concat$2(["with (",path.call(print,"object"),")",adjustClause(n.body,path.call(print,"body"))]));case"IfStatement":{var con=adjustClause(n.consequent,path.call(print,"consequent"));var opening=group$1(concat$2(["if (",group$1(concat$2([indent$2(concat$2([softline$1,path.call(print,"test")])),softline$1])),")",con]));parts.push(opening);if(n.alternate){if(n.consequent.type==="BlockStatement"){parts.push(" else");}else{parts.push(hardline$2,"else");}parts.push(group$1(adjustClause(n.alternate,path.call(print,"alternate"),n.alternate.type==="IfStatement")));}return concat$2(parts);}case"ForStatement":{var _body=adjustClause(n.body,path.call(print,"body"));// We want to keep dangling comments above the loop to stay consistent.
@@ -521,8 +537,8 @@ var isAwait=n.type==="ForAwaitStatement"||n.await;return group$1(concat$2(["for"
case"SwitchStatement":return concat$2(["switch (",path.call(print,"discriminant"),") {",n.cases.length>0?indent$2(concat$2([hardline$2,join$2(hardline$2,path.map(function(casePath){var caseNode=casePath.getValue();return concat$2([casePath.call(print),n.cases.indexOf(caseNode)!==n.cases.length-1&&util$5.isNextLineEmpty(options.originalText,caseNode)?hardline$2:""]);},"cases"))])):"",hardline$2,"}"]);case"SwitchCase":{if(n.test){parts.push("case ",path.call(print,"test"),":");}else{parts.push("default:");}var consequent=n.consequent.filter(function(node){return node.type!=="EmptyStatement";});if(consequent.length>0){var cons=path.call(function(consequentPath){return printStatementSequence(consequentPath,options,print);},"consequent");parts.push(consequent.length===1&&consequent[0].type==="BlockStatement"?concat$2([" ",cons]):indent$2(concat$2([hardline$2,cons])));}return concat$2(parts);}// JSX extensions below.
case"DebuggerStatement":return concat$2(["debugger",semi]);case"JSXAttribute":parts.push(path.call(print,"name"));if(n.value){var res=void 0;if(isStringLiteral(n.value)){var value=rawText(n.value);res='"'+value.slice(1,-1).replace(/"/g,"&quot;")+'"';}else{res=path.call(print,"value");}parts.push("=",res);}return concat$2(parts);case"JSXIdentifier":// Can be removed when this is fixed:
// https://github.com/eslint/typescript-eslint-parser/issues/337
if(!n.name){return"this";}return""+n.name;case"JSXNamespacedName":return join$2(":",[path.call(print,"namespace"),path.call(print,"name")]);case"JSXMemberExpression":return join$2(".",[path.call(print,"object"),path.call(print,"property")]);case"TSQualifiedName":return join$2(".",[path.call(print,"left"),path.call(print,"right")]);case"JSXSpreadAttribute":return concat$2(["{...",path.call(print,"argument"),"}"]);case"JSXExpressionContainer":{var _parent9=path.getParentNode(0);var _shouldInline=n.expression.type==="ArrayExpression"||n.expression.type==="ObjectExpression"||n.expression.type==="ArrowFunctionExpression"||n.expression.type==="CallExpression"||n.expression.type==="FunctionExpression"||n.expression.type==="JSXEmptyExpression"||n.expression.type==="TemplateLiteral"||n.expression.type==="TaggedTemplateExpression"||_parent9.type==="JSXElement"&&(n.expression.type==="ConditionalExpression"||isBinaryish(n.expression));if(_shouldInline){return group$1(concat$2(["{",path.call(print,"expression"),lineSuffixBoundary$1,"}"]));}return group$1(concat$2(["{",indent$2(concat$2([softline$1,path.call(print,"expression")])),softline$1,lineSuffixBoundary$1,"}"]));}case"JSXElement":{var elem=comments$3.printComments(path,function(){return printJSXElement(path,options,print);},options);return maybeWrapJSXElementInParens(path,elem);}case"JSXOpeningElement":{var _n2=path.getValue();// don't break up opening elements with a single long text attribute
if(_n2.attributes.length===1&&_n2.attributes[0].value&&isStringLiteral(_n2.attributes[0].value)){return group$1(concat$2(["<",path.call(print,"name")," ",concat$2(path.map(print,"attributes")),_n2.selfClosing?" />":">"]));}return group$1(concat$2(["<",path.call(print,"name"),concat$2([indent$2(concat$2(path.map(function(attr){return concat$2([line$1,print(attr)]);},"attributes"))),_n2.selfClosing?line$1:options.jsxBracketSameLine?">":softline$1]),_n2.selfClosing?"/>":options.jsxBracketSameLine?"":">"]));}case"JSXClosingElement":return concat$2(["</",path.call(print,"name"),">"]);case"JSXText":/* istanbul ignore next */throw new Error("JSXTest should be handled by JSXElement");case"JSXEmptyExpression":{var requiresHardline=n.comments&&!n.comments.every(util$5.isBlockComment);return concat$2([comments$3.printDanglingComments(path,options,/* sameIndent */!requiresHardline),requiresHardline?hardline$2:""]);}case"ClassBody":if(!n.comments&&n.body.length===0){return"{}";}return concat$2(["{",n.body.length>0?indent$2(concat$2([hardline$2,path.call(function(bodyPath){return printStatementSequence(bodyPath,options,print);},"body")])):comments$3.printDanglingComments(path,options),hardline$2,"}"]);case"ClassProperty":case"TSAbstractClassProperty":{if(n.accessibility){parts.push(n.accessibility+" ");}if(n.static){parts.push("static ");}if(n.type==="TSAbstractClassProperty"){parts.push("abstract ");}if(n.readonly){parts.push("readonly ");}var variance=getFlowVariance(n);if(variance){parts.push(variance);}if(n.computed){parts.push("[",path.call(print,"key"),"]");}else{parts.push(printPropertyKey(path,options,print));}if(n.typeAnnotation){parts.push(": ",path.call(print,"typeAnnotation"));}if(n.value){parts.push(" =",printAssignmentRight(n.value,path.call(print,"value"),false,// canBreak
if(!n.name){return"this";}return""+n.name;case"JSXNamespacedName":return join$2(":",[path.call(print,"namespace"),path.call(print,"name")]);case"JSXMemberExpression":return join$2(".",[path.call(print,"object"),path.call(print,"property")]);case"TSQualifiedName":return join$2(".",[path.call(print,"left"),path.call(print,"right")]);case"JSXSpreadAttribute":return concat$2(["{...",path.call(print,"argument"),"}"]);case"JSXExpressionContainer":{var _parent9=path.getParentNode(0);var _shouldInline=n.expression.type==="ArrayExpression"||n.expression.type==="ObjectExpression"||n.expression.type==="ArrowFunctionExpression"||n.expression.type==="CallExpression"||n.expression.type==="FunctionExpression"||n.expression.type==="JSXEmptyExpression"||n.expression.type==="TemplateLiteral"||n.expression.type==="TaggedTemplateExpression"||_parent9.type==="JSXElement"&&(n.expression.type==="ConditionalExpression"||isBinaryish(n.expression));if(_shouldInline){return group$1(concat$2(["{",path.call(print,"expression"),lineSuffixBoundary$1,"}"]));}return group$1(concat$2(["{",indent$2(concat$2([softline$1,path.call(print,"expression")])),softline$1,lineSuffixBoundary$1,"}"]));}case"JSXElement":{var elem=comments$3.printComments(path,function(){return printJSXElement(path,options,print);},options);return maybeWrapJSXElementInParens(path,elem);}case"JSXOpeningElement":{var _n=path.getValue();// don't break up opening elements with a single long text attribute
if(_n.attributes.length===1&&_n.attributes[0].value&&isStringLiteral(_n.attributes[0].value)){return group$1(concat$2(["<",path.call(print,"name")," ",concat$2(path.map(print,"attributes")),_n.selfClosing?" />":">"]));}return group$1(concat$2(["<",path.call(print,"name"),concat$2([indent$2(concat$2(path.map(function(attr){return concat$2([line$1,print(attr)]);},"attributes"))),_n.selfClosing?line$1:options.jsxBracketSameLine?">":softline$1]),_n.selfClosing?"/>":options.jsxBracketSameLine?"":">"]));}case"JSXClosingElement":return concat$2(["</",path.call(print,"name"),">"]);case"JSXText":/* istanbul ignore next */throw new Error("JSXTest should be handled by JSXElement");case"JSXEmptyExpression":{var requiresHardline=n.comments&&!n.comments.every(util$5.isBlockComment);return concat$2([comments$3.printDanglingComments(path,options,/* sameIndent */!requiresHardline),requiresHardline?hardline$2:""]);}case"ClassBody":if(!n.comments&&n.body.length===0){return"{}";}return concat$2(["{",n.body.length>0?indent$2(concat$2([hardline$2,path.call(function(bodyPath){return printStatementSequence(bodyPath,options,print);},"body")])):comments$3.printDanglingComments(path,options),hardline$2,"}"]);case"ClassProperty":case"TSAbstractClassProperty":{if(n.accessibility){parts.push(n.accessibility+" ");}if(n.static){parts.push("static ");}if(n.type==="TSAbstractClassProperty"){parts.push("abstract ");}if(n.readonly){parts.push("readonly ");}var variance=getFlowVariance(n);if(variance){parts.push(variance);}if(n.computed){parts.push("[",path.call(print,"key"),"]");}else{parts.push(printPropertyKey(path,options,print));}if(n.typeAnnotation){parts.push(": ",path.call(print,"typeAnnotation"));}if(n.value){parts.push(" =",printAssignmentRight(n.value,path.call(print,"value"),false,// canBreak
options));}parts.push(semi);return concat$2(parts);}case"ClassDeclaration":case"ClassExpression":case"TSAbstractClassDeclaration":if(isNodeStartingWithDeclare(n,options)){parts.push("declare ");}parts.push(concat$2(printClass(path,options,print)));return concat$2(parts);case"TSInterfaceHeritage":parts.push(path.call(print,"id"));if(n.typeParameters){parts.push(path.call(print,"typeParameters"));}return concat$2(parts);case"TemplateElement":return join$2(literalline$1,n.value.raw.split(/\r?\n/g));case"TemplateLiteral":{var expressions=path.map(print,"expressions");parts.push("`");path.each(function(childPath){var i=childPath.getName();parts.push(print(childPath));if(i<expressions.length){// For a template literal of the following form:
// `someQuery {
// ${call({
@@ -551,9 +567,9 @@ var _parent10=path.getParentNode(0);var _parentParent2=path.getParentNode(1);var
// around :(
var needsParens=needsColon&&isArrowFunctionTypeAnnotation&&_parent10.type==="TypeAnnotation"&&_parentParent2.type==="ArrowFunctionExpression";if(isObjectTypePropertyAFunction(_parent10)){isArrowFunctionTypeAnnotation=true;needsColon=true;}if(needsParens){parts.push("(");}parts.push(printFunctionParams(path,print,options,/* expandArg */false,/* printTypeParams */true));// The returnType is not wrapped in a TypeAnnotation, so the colon
// needs to be added separately.
if(n.returnType||n.predicate||n.typeAnnotation){parts.push(isArrowFunctionTypeAnnotation?" => ":": ",path.call(print,"returnType"),path.call(print,"predicate"),path.call(print,"typeAnnotation"));}if(needsParens){parts.push(")");}return group$1(concat$2(parts));}case"FunctionTypeParam":return concat$2([path.call(print,"name"),printOptionalToken(path),n.name?": ":"",path.call(print,"typeAnnotation")]);case"GenericTypeAnnotation":return concat$2([path.call(print,"id"),path.call(print,"typeParameters")]);case"DeclareInterface":case"InterfaceDeclaration":{if(n.type==="DeclareInterface"||isNodeStartingWithDeclare(n,options)){parts.push("declare ");}parts.push("interface ",path.call(print,"id"),path.call(print,"typeParameters"));if(n["extends"].length>0){parts.push(group$1(indent$2(concat$2([line$1,"extends ",join$2(", ",path.map(print,"extends"))]))));}parts.push(" ");parts.push(path.call(print,"body"));return group$1(concat$2(parts));}case"ClassImplements":case"InterfaceExtends":return concat$2([path.call(print,"id"),path.call(print,"typeParameters")]);case"TSIntersectionType":case"IntersectionTypeAnnotation":{var types=path.map(print,"types");var result=[];for(var _i24=0;_i24<types.length;++_i24){if(_i24===0){result.push(types[_i24]);}else if(!isObjectType(n.types[_i24-1])&&!isObjectType(n.types[_i24])){// If no object is involved, go to the next line if it breaks
result.push(indent$2(concat$2([" &",line$1,types[_i24]])));}else{// If you go from object to non-object or vis-versa, then inline it
result.push(" & ",_i24>1?indent$2(types[_i24]):types[_i24]);}}return group$1(concat$2(result));}case"TSUnionType":case"UnionTypeAnnotation":{// single-line variation
if(n.returnType||n.predicate||n.typeAnnotation){parts.push(isArrowFunctionTypeAnnotation?" => ":": ",path.call(print,"returnType"),path.call(print,"predicate"),path.call(print,"typeAnnotation"));}if(needsParens){parts.push(")");}return group$1(concat$2(parts));}case"FunctionTypeParam":return concat$2([path.call(print,"name"),printOptionalToken(path),n.name?": ":"",path.call(print,"typeAnnotation")]);case"GenericTypeAnnotation":return concat$2([path.call(print,"id"),path.call(print,"typeParameters")]);case"DeclareInterface":case"InterfaceDeclaration":{if(n.type==="DeclareInterface"||isNodeStartingWithDeclare(n,options)){parts.push("declare ");}parts.push("interface ",path.call(print,"id"),path.call(print,"typeParameters"));if(n["extends"].length>0){parts.push(group$1(indent$2(concat$2([line$1,"extends ",join$2(", ",path.map(print,"extends"))]))));}parts.push(" ");parts.push(path.call(print,"body"));return group$1(concat$2(parts));}case"ClassImplements":case"InterfaceExtends":return concat$2([path.call(print,"id"),path.call(print,"typeParameters")]);case"TSIntersectionType":case"IntersectionTypeAnnotation":{var types=path.map(print,"types");var result=[];for(var _i23=0;_i23<types.length;++_i23){if(_i23===0){result.push(types[_i23]);}else if(!isObjectType(n.types[_i23-1])&&!isObjectType(n.types[_i23])){// If no object is involved, go to the next line if it breaks
result.push(indent$2(concat$2([" &",line$1,types[_i23]])));}else{// If you go from object to non-object or vis-versa, then inline it
result.push(" & ",_i23>1?indent$2(types[_i23]):types[_i23]);}}return group$1(concat$2(result));}case"TSUnionType":case"UnionTypeAnnotation":{// single-line variation
// A | B | C
// multi-line variation
// | A
@@ -572,7 +588,7 @@ var _printed2=path.map(function(typePath){var printedType=typePath.call(print);i
// be either left alone or desugared into AST types that are fully
// supported by the pretty-printer.
case"DeclaredPredicate":return concat$2(["%checks(",path.call(print,"value"),")"]);case"TSAbstractKeyword":return"abstract";case"TSAnyKeyword":return"any";case"TSAsyncKeyword":return"async";case"TSBooleanKeyword":return"boolean";case"TSConstKeyword":return"const";case"TSDeclareKeyword":return"declare";case"TSExportKeyword":return"export";case"TSNeverKeyword":return"never";case"TSNumberKeyword":return"number";case"TSObjectKeyword":return"object";case"TSProtectedKeyword":return"protected";case"TSPrivateKeyword":return"private";case"TSPublicKeyword":return"public";case"TSReadonlyKeyword":return"readonly";case"TSSymbolKeyword":return"symbol";case"TSStaticKeyword":return"static";case"TSStringKeyword":return"string";case"TSUndefinedKeyword":return"undefined";case"TSVoidKeyword":return"void";case"TSAsExpression":return concat$2([path.call(print,"expression")," as ",path.call(print,"typeAnnotation")]);case"TSArrayType":return concat$2([path.call(print,"elementType"),"[]"]);case"TSPropertySignature":{if(n.export){parts.push("export ");}if(n.accessibility){parts.push(n.accessibility+" ");}if(n.static){parts.push("static ");}if(n.readonly){parts.push("readonly ");}if(n.computed){parts.push("[");}parts.push(printPropertyKey(path,options,print));if(n.computed){parts.push("]");}parts.push(printOptionalToken(path));if(n.typeAnnotation){parts.push(": ");parts.push(path.call(print,"typeAnnotation"));}// This isn't valid semantically, but it's in the AST so we can print it.
if(n.initializer){parts.push(" = ",path.call(print,"initializer"));}return concat$2(parts);}case"TSParameterProperty":if(n.accessibility){parts.push(n.accessibility+" ");}if(n.export){parts.push("export ");}if(n.static){parts.push("static ");}if(n.readonly){parts.push("readonly ");}parts.push(path.call(print,"parameter"));return concat$2(parts);case"TSTypeReference":return concat$2([path.call(print,"typeName"),printTypeParameters(path,options,print,"typeParameters")]);case"TSTypeQuery":return concat$2(["typeof ",path.call(print,"exprName")]);case"TSParenthesizedType":{return path.call(print,"typeAnnotation");}case"TSIndexSignature":{var _parent12=path.getParentNode();return concat$2([n.export?"export ":"",n.accessibility?concat$2([n.accessibility," "]):"",n.static?"static ":"",n.readonly?"readonly ":"","[",path.call(print,"index"),"]: ",path.call(print,"typeAnnotation"),_parent12.type==="ClassBody"?semi:""]);}case"TSTypePredicate":return concat$2([path.call(print,"parameterName")," is ",path.call(print,"typeAnnotation")]);case"TSNonNullExpression":return concat$2([path.call(print,"expression"),"!"]);case"TSThisType":return"this";case"TSLastTypeNode":return path.call(print,"literal");case"TSIndexedAccessType":return concat$2([path.call(print,"objectType"),"[",path.call(print,"indexType"),"]"]);case"TSConstructSignature":case"TSConstructorType":case"TSCallSignature":{if(n.type!=="TSCallSignature"){parts.push("new ");}parts.push(group$1(printFunctionParams(path,print,options,/* expandArg */false,/* printTypeParams */true)));if(n.typeAnnotation){var isType=n.type==="TSConstructorType";parts.push(isType?" => ":": ",path.call(print,"typeAnnotation"));}return concat$2(parts);}case"TSTypeOperator":return concat$2(["keyof ",path.call(print,"typeAnnotation")]);case"TSMappedType":return group$1(concat$2(["{",indent$2(concat$2([options.bracketSpacing?line$1:softline$1,n.readonlyToken?concat$2([path.call(print,"readonlyToken")," "]):"",printTypeScriptModifiers(path,options,print),"[",path.call(print,"typeParameter"),"]",n.questionToken?"?":"",": ",path.call(print,"typeAnnotation")])),comments$3.printDanglingComments(path,options,/* sameIndent */true),options.bracketSpacing?line$1:softline$1,"}"]));case"TSTypeParameter":parts.push(path.call(print,"name"));if(n.constraint){parts.push(" in ",path.call(print,"constraint"));}return concat$2(parts);case"TSMethodSignature":parts.push(n.accessibility?concat$2([n.accessibility," "]):"",n.export?"export ":"",n.static?"static ":"",n.readonly?"readonly ":"",n.computed?"[":"",path.call(print,"key"),n.computed?"]":"",printOptionalToken(path),printFunctionParams(path,print,options,/* expandArg */false,/* printTypeParams */true));if(n.typeAnnotation){parts.push(": ",path.call(print,"typeAnnotation"));}return group$1(concat$2(parts));case"TSNamespaceExportDeclaration":parts.push("export as namespace ",path.call(print,"name"));if(options.semi){parts.push(";");}return group$1(concat$2(parts));case"TSEnumDeclaration":if(n.modifiers){parts.push(printTypeScriptModifiers(path,options,print));}if(n.const){parts.push("const ");}parts.push("enum ",path.call(print,"id")," ");if(n.members.length===0){parts.push(group$1(concat$2(["{",comments$3.printDanglingComments(path,options),softline$1,"}"])));}else{parts.push(group$1(concat$2(["{",indent$2(concat$2([hardline$2,printArrayItems(path,options,"members",print),shouldPrintComma(options,"es5")?",":""])),comments$3.printDanglingComments(path,options,/* sameIndent */true),hardline$2,"}"])));}return concat$2(parts);case"TSEnumMember":parts.push(path.call(print,"id"));if(n.initializer){parts.push(" = ",path.call(print,"initializer"));}return concat$2(parts);case"TSImportEqualsDeclaration":parts.push(printTypeScriptModifiers(path,options,print),"import ",path.call(print,"name")," = ",path.call(print,"moduleReference"));if(options.semi){parts.push(";");}return group$1(concat$2(parts));case"TSExternalModuleReference":return concat$2(["require(",path.call(print,"expression"),")"]);case"TSModuleDeclaration":{var _parent13=path.getParentNode();var isExternalModule=isLiteral(n.id);var parentIsDeclaration=_parent13.type==="TSModuleDeclaration";var bodyIsDeclaration=n.body&&n.body.type==="TSModuleDeclaration";if(parentIsDeclaration){parts.push(".");}else{if(n.declare===true){parts.push("declare ");}parts.push(printTypeScriptModifiers(path,options,print));// Global declaration looks like this:
if(n.initializer){parts.push(" = ",path.call(print,"initializer"));}return concat$2(parts);}case"TSParameterProperty":if(n.accessibility){parts.push(n.accessibility+" ");}if(n.export){parts.push("export ");}if(n.static){parts.push("static ");}if(n.readonly){parts.push("readonly ");}parts.push(path.call(print,"parameter"));return concat$2(parts);case"TSTypeReference":return concat$2([path.call(print,"typeName"),printTypeParameters(path,options,print,"typeParameters")]);case"TSTypeQuery":return concat$2(["typeof ",path.call(print,"exprName")]);case"TSParenthesizedType":{return path.call(print,"typeAnnotation");}case"TSIndexSignature":{var _parent12=path.getParentNode();return concat$2([n.export?"export ":"",n.accessibility?concat$2([n.accessibility," "]):"",n.static?"static ":"",n.readonly?"readonly ":"","[",path.call(print,"index"),"]: ",path.call(print,"typeAnnotation"),_parent12.type==="ClassBody"?semi:""]);}case"TSTypePredicate":return concat$2([path.call(print,"parameterName")," is ",path.call(print,"typeAnnotation")]);case"TSNonNullExpression":return concat$2([path.call(print,"expression"),"!"]);case"TSThisType":return"this";case"TSLastTypeNode":return path.call(print,"literal");case"TSIndexedAccessType":return concat$2([path.call(print,"objectType"),"[",path.call(print,"indexType"),"]"]);case"TSConstructSignature":case"TSConstructorType":case"TSCallSignature":{if(n.type!=="TSCallSignature"){parts.push("new ");}parts.push(group$1(printFunctionParams(path,print,options,/* expandArg */false,/* printTypeParams */true)));if(n.typeAnnotation){var isType=n.type==="TSConstructorType";parts.push(isType?" => ":": ",path.call(print,"typeAnnotation"));}return concat$2(parts);}case"TSTypeOperator":return concat$2(["keyof ",path.call(print,"typeAnnotation")]);case"TSMappedType":return group$1(concat$2(["{",indent$2(concat$2([options.bracketSpacing?line$1:softline$1,n.readonlyToken?concat$2([path.call(print,"readonlyToken")," "]):"",printTypeScriptModifiers(path,options,print),"[",path.call(print,"typeParameter"),"]",n.questionToken?"?":"",": ",path.call(print,"typeAnnotation")])),comments$3.printDanglingComments(path,options,/* sameIndent */true),options.bracketSpacing?line$1:softline$1,"}"]));case"TSTypeParameter":parts.push(path.call(print,"name"));if(n.constraint){parts.push(" in ",path.call(print,"constraint"));}return concat$2(parts);case"TSMethodSignature":parts.push(n.accessibility?concat$2([n.accessibility," "]):"",n.export?"export ":"",n.static?"static ":"",n.readonly?"readonly ":"",n.computed?"[":"",path.call(print,"key"),n.computed?"]":"",printOptionalToken(path),printFunctionParams(path,print,options,/* expandArg */false,/* printTypeParams */true));if(n.typeAnnotation){parts.push(": ",path.call(print,"typeAnnotation"));}return group$1(concat$2(parts));case"TSNamespaceExportDeclaration":parts.push("export as namespace ",path.call(print,"name"));if(options.semi){parts.push(";");}return group$1(concat$2(parts));case"TSEnumDeclaration":if(isNodeStartingWithDeclare(n,options)){parts.push("declare ");}if(n.modifiers){parts.push(printTypeScriptModifiers(path,options,print));}if(n.const){parts.push("const ");}parts.push("enum ",path.call(print,"id")," ");if(n.members.length===0){parts.push(group$1(concat$2(["{",comments$3.printDanglingComments(path,options),softline$1,"}"])));}else{parts.push(group$1(concat$2(["{",indent$2(concat$2([hardline$2,printArrayItems(path,options,"members",print),shouldPrintComma(options,"es5")?",":""])),comments$3.printDanglingComments(path,options,/* sameIndent */true),hardline$2,"}"])));}return concat$2(parts);case"TSEnumMember":parts.push(path.call(print,"id"));if(n.initializer){parts.push(" = ",path.call(print,"initializer"));}return concat$2(parts);case"TSImportEqualsDeclaration":parts.push(printTypeScriptModifiers(path,options,print),"import ",path.call(print,"name")," = ",path.call(print,"moduleReference"));if(options.semi){parts.push(";");}return group$1(concat$2(parts));case"TSExternalModuleReference":return concat$2(["require(",path.call(print,"expression"),")"]);case"TSModuleDeclaration":{var _parent13=path.getParentNode();var isExternalModule=isLiteral(n.id);var parentIsDeclaration=_parent13.type==="TSModuleDeclaration";var bodyIsDeclaration=n.body&&n.body.type==="TSModuleDeclaration";if(parentIsDeclaration){parts.push(".");}else{if(n.declare===true){parts.push("declare ");}parts.push(printTypeScriptModifiers(path,options,print));// Global declaration looks like this:
// (declare)? global { ... }
var isGlobalDeclaration=n.id.type==="Identifier"&&n.id.name==="global"&&!/namespace|module/.test(options.originalText.slice(util$5.locStart(n),util$5.locStart(n.id)));if(!isGlobalDeclaration){parts.push(isExternalModule?"module ":"namespace ");}}parts.push(path.call(print,"id"));if(bodyIsDeclaration){parts.push(path.call(print,"body"));}else if(n.body){parts.push(" {",indent$2(concat$2([line$1,path.call(function(bodyPath){return comments$3.printDanglingComments(bodyPath,options,true);},"body"),group$1(path.call(print,"body"))])),line$1,"}");}else{parts.push(semi);}return concat$2(parts);}case"TSModuleBlock":return path.call(function(bodyPath){return printStatementSequence(bodyPath,options,print);},"body");default:/* istanbul ignore next */throw new Error("unknown type: "+JSON.stringify(n.type));}}function printStatementSequence(path,options,print){var printed=[];var bodyNode=path.getNode();var isClass=bodyNode.type==="ClassBody";path.map(function(stmtPath,i){var stmt=stmtPath.getValue();// Just in case the AST has been modified to contain falsy
// "statements," it's safer simply to skip them.
@@ -582,13 +598,13 @@ if(stmt.type==="EmptyStatement"){return;}var stmtPrinted=print(stmtPath);var tex
if(!options.semi&&!isClass&&stmtNeedsASIProtection(stmtPath)){if(stmt.comments&&stmt.comments.some(function(comment){return comment.leading;})){// Note: stmtNeedsASIProtection requires stmtPath to already be printed
// as it reads needsParens which is mutated on the instance
parts.push(print(stmtPath,{needsSemi:true}));}else{parts.push(";",stmtPrinted);}}else{parts.push(stmtPrinted);}if(!options.semi&&isClass){if(classPropMayCauseASIProblems(stmtPath)){parts.push(";");}else if(stmt.type==="ClassProperty"){var nextChild=bodyNode.body[i+1];if(classChildNeedsASIProtection(nextChild)){parts.push(";");}}}if(util$5.isNextLineEmpty(text,stmt)&&!isLastStatement(stmtPath)){parts.push(hardline$2);}printed.push(concat$2(parts));});return join$2(hardline$2,printed);}function printPropertyKey(path,options,print){var node=path.getNode();var key=node.key;if(isStringLiteral(key)&&isIdentifierName(key.value)&&!node.computed&&options.parser!=="json"){// 'a' -> a
return path.call(function(keyPath){return comments$3.printComments(keyPath,function(){return key.value;},options);},"key");}return path.call(print,"key");}function printMethod(path,options,print){var node=path.getNode();var semi=options.semi?";":"";var kind=node.kind;var parts=[];if(node.type==="ObjectMethod"||node.type==="ClassMethod"){node.value=node;}if(node.value.async){parts.push("async ");}if(!kind||kind==="init"||kind==="method"||kind==="constructor"){if(node.value.generator){parts.push("*");}}else{assert$1.ok(kind==="get"||kind==="set");parts.push(kind," ");}var key=printPropertyKey(path,options,print);if(node.computed){key=concat$2(["[",key,"]"]);}parts.push(key,concat$2(path.call(function(valuePath){return[printFunctionTypeParameters(valuePath,options,print),group$1(concat$2([printFunctionParams(valuePath,print,options),printReturnType(valuePath,print)]))];},"value")));if(!node.value.body||node.value.body.length===0){parts.push(semi);}else{parts.push(" ",path.call(print,"value","body"));}return concat$2(parts);}function couldGroupArg(arg){return arg.type==="ObjectExpression"&&arg.properties.length>0||arg.type==="ArrayExpression"&&arg.elements.length>0||arg.type==="TSTypeAssertionExpression"||arg.type==="TSAsExpression"||arg.type==="FunctionExpression"||arg.type==="ArrowFunctionExpression"&&(arg.body.type==="BlockStatement"||arg.body.type==="ArrowFunctionExpression"||arg.body.type==="ObjectExpression"||arg.body.type==="ArrayExpression"||arg.body.type==="CallExpression"||arg.body.type==="JSXElement");}function shouldGroupLastArg(args){var lastArg=util$5.getLast(args);var penultimateArg=util$5.getPenultimate(args);return(!lastArg.comments||!lastArg.comments.length)&&couldGroupArg(lastArg)&&(// If the last two arguments are of the same type,
return path.call(function(keyPath){return comments$3.printComments(keyPath,function(){return key.value;},options);},"key");}return path.call(print,"key");}function printMethod(path,options,print){var node=path.getNode();var semi=options.semi?";":"";var kind=node.kind;var parts=[];if(node.type==="ObjectMethod"||node.type==="ClassMethod"){node.value=node;}if(node.value.async){parts.push("async ");}if(!kind||kind==="init"||kind==="method"||kind==="constructor"){if(node.value.generator){parts.push("*");}}else{assert$1.ok(kind==="get"||kind==="set");parts.push(kind," ");}var key=printPropertyKey(path,options,print);if(node.computed){key=concat$2(["[",key,"]"]);}parts.push(key,concat$2(path.call(function(valuePath){return[printFunctionTypeParameters(valuePath,options,print),group$1(concat$2([printFunctionParams(valuePath,print,options),printReturnType(valuePath,print)]))];},"value")));if(!node.value.body||node.value.body.length===0){parts.push(semi);}else{parts.push(" ",path.call(print,"value","body"));}return concat$2(parts);}function couldGroupArg(arg){return arg.type==="ObjectExpression"&&(arg.properties.length>0||arg.comments)||arg.type==="ArrayExpression"&&(arg.elements.length>0||arg.comments)||arg.type==="TSTypeAssertionExpression"||arg.type==="TSAsExpression"||arg.type==="FunctionExpression"||arg.type==="ArrowFunctionExpression"&&(arg.body.type==="BlockStatement"||arg.body.type==="ArrowFunctionExpression"||arg.body.type==="ObjectExpression"||arg.body.type==="ArrayExpression"||arg.body.type==="CallExpression"||arg.body.type==="JSXElement");}function shouldGroupLastArg(args){var lastArg=util$5.getLast(args);var penultimateArg=util$5.getPenultimate(args);return!hasLeadingComment(lastArg)&&!hasTrailingComment(lastArg)&&couldGroupArg(lastArg)&&(// If the last two arguments are of the same type,
// disable last element expansion.
!penultimateArg||penultimateArg.type!==lastArg.type);}function shouldGroupFirstArg(args){if(args.length!==2){return false;}var firstArg=args[0];var secondArg=args[1];return(!firstArg.comments||!firstArg.comments.length)&&(firstArg.type==="FunctionExpression"||firstArg.type==="ArrowFunctionExpression"&&firstArg.body.type==="BlockStatement")&&!couldGroupArg(secondArg);}function printArgumentsList(path,options,print){var printed=path.map(print,"arguments");if(printed.length===0){return concat$2(["(",comments$3.printDanglingComments(path,options,/* sameIndent */true),")"]);}var args=path.getValue().arguments;// This is just an optimization; I think we could return the
// conditional group for all function calls, but it's more expensive
// so only do it for specific forms.
var shouldGroupFirst=shouldGroupFirstArg(args);var shouldGroupLast=shouldGroupLastArg(args);if(shouldGroupFirst||shouldGroupLast){var shouldBreak=shouldGroupFirst?printed.slice(1).some(willBreak):printed.slice(0,-1).some(willBreak);// We want to print the last argument with a special flag
var printedExpanded=void 0;var _i25=0;path.each(function(argPath){if(shouldGroupFirst&&_i25===0){printedExpanded=[argPath.call(function(p){return print(p,{expandFirstArg:true});})].concat(printed.slice(1));}if(shouldGroupLast&&_i25===args.length-1){printedExpanded=printed.slice(0,-1).concat(argPath.call(function(p){return print(p,{expandLastArg:true});}));}_i25++;},"arguments");return concat$2([printed.some(willBreak)?breakParent$2:"",conditionalGroup$1([concat$2(["(",join$2(concat$2([", "]),printedExpanded),")"]),shouldGroupFirst?concat$2(["(",group$1(printedExpanded[0],{shouldBreak:true}),printed.length>1?", ":"",join$2(concat$2([",",line$1]),printed.slice(1)),")"]):concat$2(["(",join$2(concat$2([",",line$1]),printed.slice(0,-1)),printed.length>1?", ":"",group$1(util$5.getLast(printedExpanded),{shouldBreak:true}),")"]),group$1(concat$2(["(",indent$2(concat$2([line$1,join$2(concat$2([",",line$1]),printed)])),shouldPrintComma(options,"all")?",":"",line$1,")"]),{shouldBreak:true})],{shouldBreak:shouldBreak})]);}return group$1(concat$2(["(",indent$2(concat$2([softline$1,join$2(concat$2([",",line$1]),printed)])),ifBreak$1(shouldPrintComma(options,"all")?",":""),softline$1,")"]),{shouldBreak:printed.some(willBreak)});}function printFunctionTypeParameters(path,options,print){var fun=path.getValue();if(fun.typeParameters){return path.call(print,"typeParameters");}return"";}function printFunctionParams(path,print,options,expandArg,printTypeParams){var fun=path.getValue();var paramsField=fun.parameters?"parameters":"params";var typeParams=printTypeParams?printFunctionTypeParameters(path,options,print):"";var printed=[];if(fun[paramsField]){printed=path.map(print,paramsField);}if(fun.rest){printed.push(concat$2(["...",path.call(print,"rest")]));}if(printed.length===0){return concat$2([typeParams,"(",comments$3.printDanglingComments(path,options,/* sameIndent */true),")"]);}var lastParam=util$5.getLast(fun[paramsField]);// If the parent is a call with the first/last argument expansion and this is the
var printedExpanded=void 0;var _i24=0;path.each(function(argPath){if(shouldGroupFirst&&_i24===0){printedExpanded=[argPath.call(function(p){return print(p,{expandFirstArg:true});})].concat(printed.slice(1));}if(shouldGroupLast&&_i24===args.length-1){printedExpanded=printed.slice(0,-1).concat(argPath.call(function(p){return print(p,{expandLastArg:true});}));}_i24++;},"arguments");return concat$2([printed.some(willBreak)?breakParent$2:"",conditionalGroup$1([concat$2(["(",join$2(concat$2([", "]),printedExpanded),")"]),shouldGroupFirst?concat$2(["(",group$1(printedExpanded[0],{shouldBreak:true}),printed.length>1?", ":"",join$2(concat$2([",",line$1]),printed.slice(1)),")"]):concat$2(["(",join$2(concat$2([",",line$1]),printed.slice(0,-1)),printed.length>1?", ":"",group$1(util$5.getLast(printedExpanded),{shouldBreak:true}),")"]),group$1(concat$2(["(",indent$2(concat$2([line$1,join$2(concat$2([",",line$1]),printed)])),shouldPrintComma(options,"all")?",":"",line$1,")"]),{shouldBreak:true})],{shouldBreak:shouldBreak})]);}return group$1(concat$2(["(",indent$2(concat$2([softline$1,join$2(concat$2([",",line$1]),printed)])),ifBreak$1(shouldPrintComma(options,"all")?",":""),softline$1,")"]),{shouldBreak:printed.some(willBreak)});}function printFunctionTypeParameters(path,options,print){var fun=path.getValue();if(fun.typeParameters){return path.call(print,"typeParameters");}return"";}function printFunctionParams(path,print,options,expandArg,printTypeParams){var fun=path.getValue();var paramsField=fun.parameters?"parameters":"params";var typeParams=printTypeParams?printFunctionTypeParameters(path,options,print):"";var printed=[];if(fun[paramsField]){printed=path.map(print,paramsField);}if(fun.rest){printed.push(concat$2(["...",path.call(print,"rest")]));}if(printed.length===0){return concat$2([typeParams,"(",comments$3.printDanglingComments(path,options,/* sameIndent */true),")"]);}var lastParam=util$5.getLast(fun[paramsField]);// If the parent is a call with the first/last argument expansion and this is the
// params of the first/last argument, we dont want the arguments to break and instead
// want the whole expression to be on a new line.
//
@@ -677,8 +693,7 @@ if(printedNodes[i].node.computed&&isNumericLiteral(printedNodes[i].node.property
// likely to be factories.
var shouldMerge=groups.length>=2&&!groups[1][0].node.comments&&groups[0].length===1&&(groups[0][0].node.type==="ThisExpression"||groups[0][0].node.type==="Identifier"&&(groups[0][0].node.name.match(/(^[A-Z])|^[_$]+$/)||groups[1].length&&groups[1][0].node.computed));function printGroup(printedGroup){return concat$2(printedGroup.map(function(tuple){return tuple.printed;}));}function printIndentedGroup(groups){if(groups.length===0){return"";}return indent$2(group$1(concat$2([hardline$2,join$2(hardline$2,groups.map(printGroup))])));}var printedGroups=groups.map(printGroup);var oneLine=concat$2(printedGroups);var cutoff=shouldMerge?3:2;var flatGroups=groups.slice(0,cutoff).reduce(function(res,group){return res.concat(group);},[]);var hasComment=flatGroups.slice(1,-1).some(function(node){return hasLeadingComment(node.node);})||flatGroups.slice(0,-1).some(function(node){return hasTrailingComment(node.node);})||groups[cutoff]&&hasLeadingComment(groups[cutoff][0].node);// If we only have a single `.`, we shouldn't do anything fancy and just
// render everything concatenated together.
if(groups.length<=cutoff&&!hasComment&&// (a || b).map() should be break before .map() instead of ||
groups[0][0].node.type!=="LogicalExpression"){return group$1(oneLine);}var expanded=concat$2([printGroup(groups[0]),shouldMerge?concat$2(groups.slice(1,2).map(printGroup)):"",printIndentedGroup(groups.slice(shouldMerge?2:1))]);var callExpressionCount=printedNodes.filter(function(tuple){return tuple.node.type==="CallExpression";}).length;// We don't want to print in one line if there's:
if(groups.length<=cutoff&&!hasComment){return group$1(oneLine);}var expanded=concat$2([printGroup(groups[0]),shouldMerge?concat$2(groups.slice(1,2).map(printGroup)):"",printIndentedGroup(groups.slice(shouldMerge?2:1))]);var callExpressionCount=printedNodes.filter(function(tuple){return tuple.node.type==="CallExpression";}).length;// We don't want to print in one line if there's:
// * A comment.
// * 3 or more chained calls.
// * Any group but the last one has a hard line.
@@ -823,7 +838,7 @@ var forcedBreak=willBreak(openingLines)||containsTag||containsMultipleAttributes
// content between them.
// We need to remove empty whitespace and softlines before JSX whitespace
// to get the correct output.
for(var _i26=children.length-2;_i26>=0;_i26--){var isPairOfEmptyStrings=children[_i26]===""&&children[_i26+1]==="";var isPairOfHardlines=children[_i26]===hardline$2&&children[_i26+1]===""&&children[_i26+2]===hardline$2;var isLineFollowedByJSXWhitespace=(children[_i26]===softline$1||children[_i26]===hardline$2)&&children[_i26+1]===""&&children[_i26+2]===jsxWhitespace;var isJSXWhitespaceFollowedByLine=children[_i26]===jsxWhitespace&&children[_i26+1]===""&&(children[_i26+2]===softline$1||children[_i26+2]===hardline$2);if(isPairOfHardlines&&containsText||isPairOfEmptyStrings||isLineFollowedByJSXWhitespace){children.splice(_i26,2);}else if(isJSXWhitespaceFollowedByLine){children.splice(_i26+1,2);}}// Trim trailing lines (or empty strings)
for(var _i25=children.length-2;_i25>=0;_i25--){var isPairOfEmptyStrings=children[_i25]===""&&children[_i25+1]==="";var isPairOfHardlines=children[_i25]===hardline$2&&children[_i25+1]===""&&children[_i25+2]===hardline$2;var isLineFollowedByJSXWhitespace=(children[_i25]===softline$1||children[_i25]===hardline$2)&&children[_i25+1]===""&&children[_i25+2]===jsxWhitespace;var isJSXWhitespaceFollowedByLine=children[_i25]===jsxWhitespace&&children[_i25+1]===""&&(children[_i25+2]===softline$1||children[_i25+2]===hardline$2);if(isPairOfHardlines&&containsText||isPairOfEmptyStrings||isLineFollowedByJSXWhitespace){children.splice(_i25,2);}else if(isJSXWhitespaceFollowedByLine){children.splice(_i25+1,2);}}// Trim trailing lines (or empty strings)
while(children.length&&(isLineNext(util$5.getLast(children))||isEmpty(util$5.getLast(children)))){children.pop();}// Trim leading lines (or empty strings)
while(children.length&&(isLineNext(children[0])||isEmpty(children[0]))&&(isLineNext(children[1])||isEmpty(children[1]))){children.shift();children.shift();}// Tweak how we format children if outputting this element over multiple lines.
// Also detect whether we will force this element to output over multiple lines.
@@ -884,11 +899,11 @@ n.type==="GenericTypeAnnotation"||n.type==="TSTypeReference";}).length;if(node.t
// UnionTypeAnnotation has to align the child without the comments
var res=void 0;if((node&&node.type==="JSXElement"||parent&&(parent.type==="UnionTypeAnnotation"||parent.type==="TSUnionType"||(parent.type==="ClassDeclaration"||parent.type==="ClassExpression")&&parent.superClass===node))&&!hasIgnoreComment(path)){res=genericPrint(path,options,printGenerically,args);}else{res=comments$3.printComments(path,function(p){return genericPrint(p,options,printGenerically,args);},options,args&&args.needsSemi);}if(shouldCache){cache.set(node,res);}return res;}var doc=printGenerically(new FastPath(ast));if(addAlignmentSize>0){// Add a hardline to make the indents take effect
// It should be removed in index.js format()
doc=addAlignmentToDoc$1(docUtils.removeLines(concat$2([hardline$2,doc])),addAlignmentSize,options.tabWidth);}docUtils.propagateBreaks(doc);if(options.parser==="json"){doc=concat$2([doc,hardline$2]);}return doc;}var printer={printAstToDoc:printAstToDoc$1};var docBuilders$8=docBuilders$1;var concat$7=docBuilders$8.concat;var fill$3=docBuilders$8.fill;var cursor$2=docBuilders$8.cursor;var MODE_BREAK=1;var MODE_FLAT=2;function rootIndent(){return{indent:0,align:{spaces:0,tabs:0}};}function makeIndent(ind){return{indent:ind.indent+1,align:ind.align};}function makeAlign(ind,n){if(n===-Infinity){return{indent:0,align:{spaces:0,tabs:0}};}return{indent:ind.indent,align:{spaces:ind.align.spaces+n,tabs:ind.align.tabs+(n?1:0)}};}function fits(next,restCommands,width,mustBeFlat){var restIdx=restCommands.length;var cmds=[next];while(width>=0){if(cmds.length===0){if(restIdx===0){return true;}cmds.push(restCommands[restIdx-1]);restIdx--;continue;}var x=cmds.pop();var ind=x[0];var mode=x[1];var doc=x[2];if(typeof doc==="string"){width-=doc.length;}else{switch(doc.type){case"concat":for(var _i27=doc.parts.length-1;_i27>=0;_i27--){cmds.push([ind,mode,doc.parts[_i27]]);}break;case"indent":cmds.push([makeIndent(ind),mode,doc.contents]);break;case"align":cmds.push([makeAlign(ind,doc.n),mode,doc.contents]);break;case"group":if(mustBeFlat&&doc.break){return false;}cmds.push([ind,doc.break?MODE_BREAK:mode,doc.contents]);break;case"fill":for(var _i28=doc.parts.length-1;_i28>=0;_i28--){cmds.push([ind,mode,doc.parts[_i28]]);}break;case"if-break":if(mode===MODE_BREAK){if(doc.breakContents){cmds.push([ind,mode,doc.breakContents]);}}if(mode===MODE_FLAT){if(doc.flatContents){cmds.push([ind,mode,doc.flatContents]);}}break;case"line":switch(mode){// fallthrough
doc=addAlignmentToDoc$1(docUtils.removeLines(concat$2([hardline$2,doc])),addAlignmentSize,options.tabWidth);}docUtils.propagateBreaks(doc);if(options.parser==="json"){doc=concat$2([doc,hardline$2]);}return doc;}var printer={printAstToDoc:printAstToDoc$1};var docBuilders$8=docBuilders$1;var concat$7=docBuilders$8.concat;var fill$3=docBuilders$8.fill;var cursor$2=docBuilders$8.cursor;var MODE_BREAK=1;var MODE_FLAT=2;function rootIndent(){return{indent:0,align:{spaces:0,tabs:0}};}function makeIndent(ind){return{indent:ind.indent+1,align:ind.align};}function makeAlign(ind,n){if(n===-Infinity){return{indent:0,align:{spaces:0,tabs:0}};}return{indent:ind.indent,align:{spaces:ind.align.spaces+n,tabs:ind.align.tabs+(n?1:0)}};}function fits(next,restCommands,width,mustBeFlat){var restIdx=restCommands.length;var cmds=[next];while(width>=0){if(cmds.length===0){if(restIdx===0){return true;}cmds.push(restCommands[restIdx-1]);restIdx--;continue;}var x=cmds.pop();var ind=x[0];var mode=x[1];var doc=x[2];if(typeof doc==="string"){width-=doc.length;}else{switch(doc.type){case"concat":for(var _i26=doc.parts.length-1;_i26>=0;_i26--){cmds.push([ind,mode,doc.parts[_i26]]);}break;case"indent":cmds.push([makeIndent(ind),mode,doc.contents]);break;case"align":cmds.push([makeAlign(ind,doc.n),mode,doc.contents]);break;case"group":if(mustBeFlat&&doc.break){return false;}cmds.push([ind,doc.break?MODE_BREAK:mode,doc.contents]);break;case"fill":for(var _i27=doc.parts.length-1;_i27>=0;_i27--){cmds.push([ind,mode,doc.parts[_i27]]);}break;case"if-break":if(mode===MODE_BREAK){if(doc.breakContents){cmds.push([ind,mode,doc.breakContents]);}}if(mode===MODE_FLAT){if(doc.flatContents){cmds.push([ind,mode,doc.flatContents]);}}break;case"line":switch(mode){// fallthrough
case MODE_FLAT:if(!doc.hard){if(!doc.soft){width-=1;}break;}return true;case MODE_BREAK:return true;}break;}}}return false;}function printDocToString$1(doc,options){var width=options.printWidth;var newLine=options.newLine||"\n";var pos=0;// cmds is basically a stack. We've turned a recursive call into a
// while loop which is much faster. The while loop below adds new
// cmds to the array instead of recursively calling `print`.
var cmds=[[rootIndent(),MODE_BREAK,doc]];var out=[];var shouldRemeasure=false;var lineSuffix=[];while(cmds.length!==0){var x=cmds.pop();var ind=x[0];var mode=x[1];var _doc=x[2];if(typeof _doc==="string"){out.push(_doc);pos+=_doc.length;}else{switch(_doc.type){case"cursor":out.push(cursor$2.placeholder);break;case"concat":for(var _i29=_doc.parts.length-1;_i29>=0;_i29--){cmds.push([ind,mode,_doc.parts[_i29]]);}break;case"indent":cmds.push([makeIndent(ind),mode,_doc.contents]);break;case"align":cmds.push([makeAlign(ind,_doc.n),mode,_doc.contents]);break;case"group":switch(mode){case MODE_FLAT:if(!shouldRemeasure){cmds.push([ind,_doc.break?MODE_BREAK:MODE_FLAT,_doc.contents]);break;}// fallthrough
var cmds=[[rootIndent(),MODE_BREAK,doc]];var out=[];var shouldRemeasure=false;var lineSuffix=[];while(cmds.length!==0){var x=cmds.pop();var ind=x[0];var mode=x[1];var _doc=x[2];if(typeof _doc==="string"){out.push(_doc);pos+=_doc.length;}else{switch(_doc.type){case"cursor":out.push(cursor$2.placeholder);break;case"concat":for(var _i28=_doc.parts.length-1;_i28>=0;_i28--){cmds.push([ind,mode,_doc.parts[_i28]]);}break;case"indent":cmds.push([makeIndent(ind),mode,_doc.contents]);break;case"align":cmds.push([makeAlign(ind,_doc.n),mode,_doc.contents]);break;case"group":switch(mode){case MODE_FLAT:if(!shouldRemeasure){cmds.push([ind,_doc.break?MODE_BREAK:MODE_FLAT,_doc.contents]);break;}// fallthrough
case MODE_BREAK:{shouldRemeasure=false;var next=[ind,MODE_FLAT,_doc.contents];var rem=width-pos;if(!_doc.break&&fits(next,cmds,rem)){cmds.push(next);}else{// Expanded states are a rare case where a document
// can manually provide multiple representations of
// itself. It provides an array of documents
@@ -896,7 +911,7 @@ case MODE_BREAK:{shouldRemeasure=false;var next=[ind,MODE_FLAT,_doc.contents];va
// representation first to the most expanded. If a
// group has these, we need to manually go through
// these states and find the first one that fits.
if(_doc.expandedStates){var mostExpanded=_doc.expandedStates[_doc.expandedStates.length-1];if(_doc.break){cmds.push([ind,MODE_BREAK,mostExpanded]);break;}else{for(var _i30=1;_i30<_doc.expandedStates.length+1;_i30++){if(_i30>=_doc.expandedStates.length){cmds.push([ind,MODE_BREAK,mostExpanded]);break;}else{var state=_doc.expandedStates[_i30];var cmd=[ind,MODE_FLAT,state];if(fits(cmd,cmds,rem)){cmds.push(cmd);break;}}}}}else{cmds.push([ind,MODE_BREAK,_doc.contents]);}}break;}}break;// Fills each line with as much code as possible before moving to a new
if(_doc.expandedStates){var mostExpanded=_doc.expandedStates[_doc.expandedStates.length-1];if(_doc.break){cmds.push([ind,MODE_BREAK,mostExpanded]);break;}else{for(var _i29=1;_i29<_doc.expandedStates.length+1;_i29++){if(_i29>=_doc.expandedStates.length){cmds.push([ind,MODE_BREAK,mostExpanded]);break;}else{var state=_doc.expandedStates[_i29];var cmd=[ind,MODE_FLAT,state];if(fits(cmd,cmds,rem)){cmds.push(cmd);break;}}}}}else{cmds.push([ind,MODE_BREAK,_doc.contents]);}}break;}}break;// Fills each line with as much code as possible before moving to a new
// line with the same indentation.
//
// Expects doc.parts to be an array of alternating content and
@@ -924,37 +939,7 @@ case"fill":{var _rem=width-pos;var parts=_doc.parts;if(parts.length===0){break;}
// for nested groups)
shouldRemeasure=true;}// fallthrough
case MODE_BREAK:if(lineSuffix.length){cmds.push([ind,mode,_doc]);[].push.apply(cmds,lineSuffix.reverse());lineSuffix=[];break;}if(_doc.literal){out.push(newLine);pos=0;}else{if(out.length>0){// Trim whitespace at the end of line
while(out.length>0&&out[out.length-1].match(/^[^\S\n]*$/)){out.pop();}if(out.length){out[out.length-1]=out[out.length-1].replace(/[^\S\n]*$/,"");}}var length=ind.indent*options.tabWidth+ind.align.spaces;var _indentString=options.useTabs?"\t".repeat(ind.indent+ind.align.tabs):" ".repeat(length);out.push(newLine+_indentString);pos=length;}break;}break;default:}}}var cursorPlaceholderIndex=out.indexOf(cursor$2.placeholder);if(cursorPlaceholderIndex!==-1){var beforeCursor=out.slice(0,cursorPlaceholderIndex).join("");var afterCursor=out.slice(cursorPlaceholderIndex+1).join("");return{formatted:beforeCursor+afterCursor,cursor:beforeCursor.length};}return{formatted:out.join("")};}var docPrinter={printDocToString:printDocToString$1};var index$26=createCommonjsModule(function(module){'use strict';function assembleStyles(){var styles={modifiers:{reset:[0,0],bold:[1,22],// 21 isn't widely supported and 22 does the same thing
dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};// fix humans
styles.colors.grey=styles.colors.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]=group[styleName]={open:'\x1B['+style[0]+'m',close:'\x1B['+style[1]+'m'};});Object.defineProperty(styles,groupName,{value:group,enumerable:false});});return styles;}Object.defineProperty(module,'exports',{enumerable:true,get:assembleStyles});});var argv$1=process.argv;var terminator$1=argv$1.indexOf('--');var hasFlag$1=function hasFlag$1(flag){flag='--'+flag;var pos=argv$1.indexOf(flag);return pos!==-1&&(terminator$1!==-1?pos<terminator$1:true);};var index$28=function(){if('FORCE_COLOR'in process.env){return true;}if(hasFlag$1('no-color')||hasFlag$1('no-colors')||hasFlag$1('color=false')){return false;}if(hasFlag$1('color')||hasFlag$1('colors')||hasFlag$1('color=true')||hasFlag$1('color=always')){return true;}if(process.stdout&&!process.stdout.isTTY){return false;}if(process.platform==='win32'){return true;}if('COLORTERM'in process.env){return true;}if(process.env.TERM==='dumb'){return false;}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true;}return false;}();var escapeStringRegexp$1=index$10;var ansiStyles$1=index$26;var stripAnsi$1=index$14;var hasAnsi$1=index$18;var supportsColor$1=index$28;var defineProps$1=Object.defineProperties;var isSimpleWindowsTerm$1=process.platform==='win32'&&!/^xterm/i.test(process.env.TERM);function Chalk$1(options){// detect mode if not set manually
this.enabled=!options||options.enabled===undefined?supportsColor$1:options.enabled;}// use bright blue on Windows as the normal blue color is illegible
if(isSimpleWindowsTerm$1){ansiStyles$1.blue.open='\x1B[94m';}var styles$1=function(){var ret={};Object.keys(ansiStyles$1).forEach(function(key){ansiStyles$1[key].closeRe=new RegExp(escapeStringRegexp$1(ansiStyles$1[key].close),'g');ret[key]={get:function get(){return build$1.call(this,this._styles.concat(key));}};});return ret;}();var proto$1=defineProps$1(function chalk(){},styles$1);function build$1(_styles){var builder=function builder(){return applyStyle$1.apply(builder,arguments);};builder._styles=_styles;builder.enabled=this.enabled;// __proto__ is used because we must return a function, but there is
// no way to create a function with a different prototype.
/* eslint-disable no-proto */builder.__proto__=proto$1;return builder;}function applyStyle$1(){// support varags, but simply cast to string in case there's only one arg
var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){// don't slice `arguments`, it prevents v8 optimizations
for(var a=1;a<argsLen;a++){str+=' '+args[a];}}if(!this.enabled||!str){return str;}var nestedStyles=this._styles;var i=nestedStyles.length;// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
var originalDim=ansiStyles$1.dim.open;if(isSimpleWindowsTerm$1&&(nestedStyles.indexOf('gray')!==-1||nestedStyles.indexOf('grey')!==-1)){ansiStyles$1.dim.open='';}while(i--){var code=ansiStyles$1[nestedStyles[i]];// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str=code.open+str.replace(code.closeRe,code.open)+code.close;}// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
ansiStyles$1.dim.open=originalDim;return str;}function init$1(){var ret={};Object.keys(styles$1).forEach(function(name){ret[name]={get:function get(){return build$1.call(this,[name]);}};});return ret;}defineProps$1(Chalk$1.prototype,init$1());var index$24=new Chalk$1();var styles_1$1=ansiStyles$1;var hasColor$1=hasAnsi$1;var stripColor$1=stripAnsi$1;var supportsColor_1$1=supportsColor$1;index$24.styles=styles_1$1;index$24.hasColor=hasColor$1;index$24.stripColor=stripColor$1;index$24.supportsColor=supportsColor_1$1;var index$34=createCommonjsModule(function(module){'use strict';function assembleStyles(){var styles={modifiers:{reset:[0,0],bold:[1,22],// 21 isn't widely supported and 22 does the same thing
dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};// fix humans
styles.colors.grey=styles.colors.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]=group[styleName]={open:'\x1B['+style[0]+'m',close:'\x1B['+style[1]+'m'};});Object.defineProperty(styles,groupName,{value:group,enumerable:false});});return styles;}Object.defineProperty(module,'exports',{enumerable:true,get:assembleStyles});});var argv$2=process.argv;var terminator$2=argv$2.indexOf('--');var hasFlag$2=function hasFlag$2(flag){flag='--'+flag;var pos=argv$2.indexOf(flag);return pos!==-1&&(terminator$2!==-1?pos<terminator$2:true);};var index$36=function(){if('FORCE_COLOR'in process.env){return true;}if(hasFlag$2('no-color')||hasFlag$2('no-colors')||hasFlag$2('color=false')){return false;}if(hasFlag$2('color')||hasFlag$2('colors')||hasFlag$2('color=true')||hasFlag$2('color=always')){return true;}if(process.stdout&&!process.stdout.isTTY){return false;}if(process.platform==='win32'){return true;}if('COLORTERM'in process.env){return true;}if(process.env.TERM==='dumb'){return false;}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true;}return false;}();var escapeStringRegexp$2=index$10;var ansiStyles$2=index$34;var stripAnsi$2=index$14;var hasAnsi$2=index$18;var supportsColor$2=index$36;var defineProps$2=Object.defineProperties;var isSimpleWindowsTerm$2=process.platform==='win32'&&!/^xterm/i.test(process.env.TERM);function Chalk$2(options){// detect mode if not set manually
this.enabled=!options||options.enabled===undefined?supportsColor$2:options.enabled;}// use bright blue on Windows as the normal blue color is illegible
if(isSimpleWindowsTerm$2){ansiStyles$2.blue.open='\x1B[94m';}var styles$2=function(){var ret={};Object.keys(ansiStyles$2).forEach(function(key){ansiStyles$2[key].closeRe=new RegExp(escapeStringRegexp$2(ansiStyles$2[key].close),'g');ret[key]={get:function get(){return build$2.call(this,this._styles.concat(key));}};});return ret;}();var proto$2=defineProps$2(function chalk(){},styles$2);function build$2(_styles){var builder=function builder(){return applyStyle$2.apply(builder,arguments);};builder._styles=_styles;builder.enabled=this.enabled;// __proto__ is used because we must return a function, but there is
// no way to create a function with a different prototype.
/* eslint-disable no-proto */builder.__proto__=proto$2;return builder;}function applyStyle$2(){// support varags, but simply cast to string in case there's only one arg
var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){// don't slice `arguments`, it prevents v8 optimizations
for(var a=1;a<argsLen;a++){str+=' '+args[a];}}if(!this.enabled||!str){return str;}var nestedStyles=this._styles;var i=nestedStyles.length;// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
var originalDim=ansiStyles$2.dim.open;if(isSimpleWindowsTerm$2&&(nestedStyles.indexOf('gray')!==-1||nestedStyles.indexOf('grey')!==-1)){ansiStyles$2.dim.open='';}while(i--){var code=ansiStyles$2[nestedStyles[i]];// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str=code.open+str.replace(code.closeRe,code.open)+code.close;}// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
ansiStyles$2.dim.open=originalDim;return str;}function init$2(){var ret={};Object.keys(styles$2).forEach(function(name){ret[name]={get:function get(){return build$2.call(this,[name]);}};});return ret;}defineProps$2(Chalk$2.prototype,init$2());var index$32=new Chalk$2();var styles_1$2=ansiStyles$2;var hasColor$2=hasAnsi$2;var stripColor$2=stripAnsi$2;var supportsColor_1$2=supportsColor$2;index$32.styles=styles_1$2;index$32.hasColor=hasColor$2;index$32.stripColor=stripColor$2;index$32.supportsColor=supportsColor_1$2;var index$44={"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aqua":[0,255,255],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"black":[0,0,0],"blanchedalmond":[255,235,205],"blue":[0,0,255],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"fuchsia":[255,0,255],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"gray":[128,128,128],"green":[0,128,0],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"lime":[0,255,0],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"maroon":[128,0,0],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"navy":[0,0,128],"oldlace":[253,245,230],"olive":[128,128,0],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"purple":[128,0,128],"rebeccapurple":[102,51,153],"red":[255,0,0],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"silver":[192,192,192],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"teal":[0,128,128],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"white":[255,255,255],"whitesmoke":[245,245,245],"yellow":[255,255,0],"yellowgreen":[154,205,50]};var conversions$1=createCommonjsModule(function(module){/* MIT license */var cssKeywords=index$44;// NOTE: conversions should only return primitive values (i.e. arrays, or
while(out.length>0&&out[out.length-1].match(/^[^\S\n]*$/)){out.pop();}if(out.length){out[out.length-1]=out[out.length-1].replace(/[^\S\n]*$/,"");}}var length=ind.indent*options.tabWidth+ind.align.spaces;var _indentString=options.useTabs?"\t".repeat(ind.indent+ind.align.tabs):" ".repeat(length);out.push(newLine+_indentString);pos=length;}break;}break;default:}}}var cursorPlaceholderIndex=out.indexOf(cursor$2.placeholder);if(cursorPlaceholderIndex!==-1){var beforeCursor=out.slice(0,cursorPlaceholderIndex).join("");var afterCursor=out.slice(cursorPlaceholderIndex+1).join("");return{formatted:beforeCursor+afterCursor,cursor:beforeCursor.length};}return{formatted:out.join("")};}var docPrinter={printDocToString:printDocToString$1};var index$30={"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aqua":[0,255,255],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"black":[0,0,0],"blanchedalmond":[255,235,205],"blue":[0,0,255],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"fuchsia":[255,0,255],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"gray":[128,128,128],"green":[0,128,0],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"lime":[0,255,0],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"maroon":[128,0,0],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"navy":[0,0,128],"oldlace":[253,245,230],"olive":[128,128,0],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"purple":[128,0,128],"rebeccapurple":[102,51,153],"red":[255,0,0],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"silver":[192,192,192],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"teal":[0,128,128],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"white":[255,255,255],"whitesmoke":[245,245,245],"yellow":[255,255,0],"yellowgreen":[154,205,50]};var conversions$1=createCommonjsModule(function(module){/* MIT license */var cssKeywords=index$30;// NOTE: conversions should only return primitive values (i.e. arrays, or
// values that give correct `typeof` results).
// do not use box values types (i.e. Number(), String(), etc.)
var reverseKeywords={};for(var key in cssKeywords){if(cssKeywords.hasOwnProperty(key)){reverseKeywords[cssKeywords[key]]=key;}}var convert=module.exports={rgb:{channels:3,labels:'rgb'},hsl:{channels:3,labels:'hsl'},hsv:{channels:3,labels:'hsv'},hwb:{channels:3,labels:'hwb'},cmyk:{channels:4,labels:'cmyk'},xyz:{channels:3,labels:'xyz'},lab:{channels:3,labels:'lab'},lch:{channels:3,labels:'lch'},hex:{channels:1,labels:['hex']},keyword:{channels:1,labels:['keyword']},ansi16:{channels:1,labels:['ansi16']},ansi256:{channels:1,labels:['ansi256']},hcg:{channels:3,labels:['h','c','g']},apple:{channels:3,labels:['r16','g16','b16']},gray:{channels:1,labels:['gray']}};// hide .channels and .labels properties
@@ -994,122 +979,170 @@ if('conversion'in fn){wrappedFn.conversion=fn.conversion;}return wrappedFn;}func
// see notice in conversions.js; don't use box types
// in conversion functions.
if((typeof result==='undefined'?'undefined':_typeof(result))==='object'){for(var len=result.length,i=0;i<len;i++){result[i]=Math.round(result[i]);}}return result;};// preserve .conversion property if there is one
if('conversion'in fn){wrappedFn.conversion=fn.conversion;}return wrappedFn;}models.forEach(function(fromModel){convert[fromModel]={};Object.defineProperty(convert[fromModel],'channels',{value:conversions[fromModel].channels});Object.defineProperty(convert[fromModel],'labels',{value:conversions[fromModel].labels});var routes=route(fromModel);var routeModels=Object.keys(routes);routeModels.forEach(function(toModel){var fn=routes[toModel];convert[fromModel][toModel]=wrapRounded(fn);convert[fromModel][toModel].raw=wrapRaw(fn);});});var index$42=convert;var index$40=createCommonjsModule(function(module){'use strict';var colorConvert=index$42;var wrapAnsi16=function wrapAnsi16(fn,offset){return function(){var code=fn.apply(colorConvert,arguments);return'\x1B['+(code+offset)+'m';};};var wrapAnsi256=function wrapAnsi256(fn,offset){return function(){var code=fn.apply(colorConvert,arguments);return'\x1B['+(38+offset)+';5;'+code+'m';};};var wrapAnsi16m=function wrapAnsi16m(fn,offset){return function(){var rgb=fn.apply(colorConvert,arguments);return'\x1B['+(38+offset)+';2;'+rgb[0]+';'+rgb[1]+';'+rgb[2]+'m';};};function assembleStyles(){var styles={modifier:{reset:[0,0],// 21 isn't widely supported and 22 does the same thing
if('conversion'in fn){wrappedFn.conversion=fn.conversion;}return wrappedFn;}models.forEach(function(fromModel){convert[fromModel]={};Object.defineProperty(convert[fromModel],'channels',{value:conversions[fromModel].channels});Object.defineProperty(convert[fromModel],'labels',{value:conversions[fromModel].labels});var routes=route(fromModel);var routeModels=Object.keys(routes);routeModels.forEach(function(toModel){var fn=routes[toModel];convert[fromModel][toModel]=wrapRounded(fn);convert[fromModel][toModel].raw=wrapRaw(fn);});});var index$28=convert;var index$26=createCommonjsModule(function(module){'use strict';var colorConvert=index$28;var wrapAnsi16=function wrapAnsi16(fn,offset){return function(){var code=fn.apply(colorConvert,arguments);return'\x1B['+(code+offset)+'m';};};var wrapAnsi256=function wrapAnsi256(fn,offset){return function(){var code=fn.apply(colorConvert,arguments);return'\x1B['+(38+offset)+';5;'+code+'m';};};var wrapAnsi16m=function wrapAnsi16m(fn,offset){return function(){var rgb=fn.apply(colorConvert,arguments);return'\x1B['+(38+offset)+';2;'+rgb[0]+';'+rgb[1]+';'+rgb[2]+'m';};};function assembleStyles(){var styles={modifier:{reset:[0,0],// 21 isn't widely supported and 22 does the same thing
bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{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],// Bright color
redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],// Bright color
bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};// Fix humans
styles.color.grey=styles.color.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]={open:'\x1B['+style[0]+'m',close:'\x1B['+style[1]+'m'};group[styleName]=styles[styleName];});Object.defineProperty(styles,groupName,{value:group,enumerable:false});});var rgb2rgb=function rgb2rgb(r,g,b){return[r,g,b];};styles.color.close='\x1B[39m';styles.bgColor.close='\x1B[49m';styles.color.ansi={};styles.color.ansi256={};styles.color.ansi16m={rgb:wrapAnsi16m(rgb2rgb,0)};styles.bgColor.ansi={};styles.bgColor.ansi256={};styles.bgColor.ansi16m={rgb:wrapAnsi16m(rgb2rgb,10)};var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=Object.keys(colorConvert)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var key=_step.value;if(_typeof(colorConvert[key])!=='object'){continue;}var suite=colorConvert[key];if('ansi16'in suite){styles.color.ansi[key]=wrapAnsi16(suite.ansi16,0);styles.bgColor.ansi[key]=wrapAnsi16(suite.ansi16,10);}if('ansi256'in suite){styles.color.ansi256[key]=wrapAnsi256(suite.ansi256,0);styles.bgColor.ansi256[key]=wrapAnsi256(suite.ansi256,10);}if('rgb'in suite){styles.color.ansi16m[key]=wrapAnsi16m(suite.rgb,0);styles.bgColor.ansi16m[key]=wrapAnsi16m(suite.rgb,10);}}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}return styles;}Object.defineProperty(module,'exports',{enumerable:true,get:assembleStyles});});var asymmetricMatcher=Symbol.for('jest.asymmetricMatcher');/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var SPACE=' ';var ArrayContaining=function(_Array){_inherits(ArrayContaining,_Array);function ArrayContaining(){_classCallCheck(this,ArrayContaining);return _possibleConstructorReturn(this,(ArrayContaining.__proto__||Object.getPrototypeOf(ArrayContaining)).apply(this,arguments));}return ArrayContaining;}(Array);var ObjectContaining=function(_Object){_inherits(ObjectContaining,_Object);function ObjectContaining(){_classCallCheck(this,ObjectContaining);return _possibleConstructorReturn(this,(ObjectContaining.__proto__||Object.getPrototypeOf(ObjectContaining)).apply(this,arguments));}return ObjectContaining;}(Object);var print$1=function print$1(val,print,indent,opts,colors){var stringedValue=val.toString();if(stringedValue==='ArrayContaining'){var array=ArrayContaining.from(val.sample);return opts.spacing===SPACE?stringedValue+SPACE+print(array):print(array);}if(stringedValue==='ObjectContaining'){var object=Object.assign(new ObjectContaining(),val.sample);return opts.spacing===SPACE?stringedValue+SPACE+print(object):print(object);}if(stringedValue==='StringMatching'){return stringedValue+SPACE+print(val.sample);}if(stringedValue==='StringContaining'){return stringedValue+SPACE+print(val.sample);}return val.toAsymmetricMatcher();};var test=function test(object){return object&&object.$$typeof===asymmetricMatcher;};var AsymmetricMatcher$1={print:print$1,test:test};var ansiRegex$2=index$16;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var toHumanReadableAnsi=function toHumanReadableAnsi(text){var style=index$40;return text.replace(ansiRegex$2(),function(match,offset,string){switch(match){case style.red.close:case style.green.close:case style.reset.open:case style.reset.close:return'</>';case style.red.open:return'<red>';case style.green.open:return'<green>';case style.dim.open:return'<dim>';case style.bold.open:return'<bold>';default:return'';}});};var test$1=function test$1(value){return typeof value==='string'&&value.match(ansiRegex$2());};var print$2=function print$2(val,print,indent,opts,colors){return print(toHumanReadableAnsi(val));};var ConvertAnsi={print:print$2,test:test$1};function escapeHTML$1(str){return str.replace(/</g,'&lt;').replace(/>/g,'&gt;');}var escapeHTML_1=escapeHTML$1;var escapeHTML=escapeHTML_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var HTML_ELEMENT_REGEXP=/(HTML\w*?Element)|Text|Comment/;var test$2=isHTMLElement;function isHTMLElement(value){return value!==undefined&&value!==null&&(value.nodeType===1||value.nodeType===3||value.nodeType===8)&&value.constructor!==undefined&&value.constructor.name!==undefined&&HTML_ELEMENT_REGEXP.test(value.constructor.name);}function printChildren$1(flatChildren,print,indent,colors,opts){return flatChildren.map(function(node){if((typeof node==='undefined'?'undefined':_typeof(node))==='object'){return print(node,print,indent,colors,opts);}else if(typeof node==='string'){return colors.content.open+escapeHTML(node)+colors.content.close;}else{return print(node);}}).filter(function(value){return value.trim().length;}).join(opts.edgeSpacing);}function printAttributes$1(attributes,indent,colors,opts){return attributes.sort().map(function(attribute){return opts.spacing+indent(colors.prop.open+attribute.name+colors.prop.close+'=')+colors.value.open+('"'+attribute.value+'"')+colors.value.close;}).join('');}var print$3=function print$3(element,print,indent,opts,colors){if(element.nodeType===3){return element.data.split('\n').map(function(text){return text.trimLeft();}).filter(function(text){return text.length;}).join(' ');}else if(element.nodeType===8){return colors.comment.open+'<!-- '+element.data.trim()+' -->'+colors.comment.close;}var result=colors.tag.open+'<';var elementName=element.tagName.toLowerCase();result+=elementName+colors.tag.close;var hasAttributes=element.attributes&&element.attributes.length;if(hasAttributes){var attributes=Array.prototype.slice.call(element.attributes);result+=printAttributes$1(attributes,indent,colors,opts);}var flatChildren=Array.prototype.slice.call(element.childNodes);if(!flatChildren.length&&element.textContent){flatChildren.push(element.textContent);}var closeInNewLine=hasAttributes&&!opts.min;if(flatChildren.length){var children=printChildren$1(flatChildren,print,indent,colors,opts);result+=colors.tag.open+(closeInNewLine?'\n':'')+'>'+colors.tag.close+opts.edgeSpacing+indent(children)+opts.edgeSpacing+colors.tag.open+'</'+elementName+'>'+colors.tag.close;}else{result+=colors.tag.open+(closeInNewLine?'\n':' ')+'/>'+colors.tag.close;}return result;};var HTMLElement$1={print:print$3,test:test$2};var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"])_i["return"]();}finally{if(_d)throw _e;}}return _arr;}return function(arr,i){if(Array.isArray(arr)){return arr;}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i);}else{throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var IMMUTABLE_NAMESPACE='Immutable.';/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var SPACE$1=' ';var addKey=function addKey(isMap,key){return isMap?key+': ':'';};var addFinalEdgeSpacing=function addFinalEdgeSpacing(length,edgeSpacing){return length>0?edgeSpacing:'';};var printImmutable$1=function printImmutable$1(val,print,indent,opts,colors,immutableDataStructureName,isMap){var _ref=isMap?['{','}']:['[',']'],_ref2=_slicedToArray(_ref,2);var openTag=_ref2[0],closeTag=_ref2[1];var result=IMMUTABLE_NAMESPACE+immutableDataStructureName+SPACE$1+openTag+opts.edgeSpacing;var immutableArray=[];val.forEach(function(item,key){return immutableArray.push(indent(addKey(isMap,key)+print(item,print,indent,opts,colors)));});result+=immutableArray.join(','+opts.spacing);if(!opts.min&&immutableArray.length>0){result+=',';}return result+addFinalEdgeSpacing(immutableArray.length,opts.edgeSpacing)+closeTag;};var printImmutable_1=printImmutable$1;var printImmutable=printImmutable_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var IS_LIST='@@__IMMUTABLE_LIST__@@';var test$3=function test$3(maybeList){return!!(maybeList&&maybeList[IS_LIST]);};var print$4=function print$4(val,print,indent,opts,colors){return printImmutable(val,print,indent,opts,colors,'List',false);};var ImmutableList={print:print$4,test:test$3};var printImmutable$2=printImmutable_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var IS_SET='@@__IMMUTABLE_SET__@@';var IS_ORDERED='@@__IMMUTABLE_ORDERED__@@';var test$4=function test$4(maybeSet){return!!(maybeSet&&maybeSet[IS_SET]&&!maybeSet[IS_ORDERED]);};var print$5=function print$5(val,print,indent,opts,colors){return printImmutable$2(val,print,indent,opts,colors,'Set',false);};var ImmutableSet={print:print$5,test:test$4};var printImmutable$3=printImmutable_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var IS_MAP='@@__IMMUTABLE_MAP__@@';var IS_ORDERED$1='@@__IMMUTABLE_ORDERED__@@';var test$5=function test$5(maybeMap){return!!(maybeMap&&maybeMap[IS_MAP]&&!maybeMap[IS_ORDERED$1]);};var print$6=function print$6(val,print,indent,opts,colors){return printImmutable$3(val,print,indent,opts,colors,'Map',true);};var ImmutableMap={print:print$6,test:test$5};var printImmutable$4=printImmutable_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var IS_STACK='@@__IMMUTABLE_STACK__@@';var test$6=function test$6(maybeStack){return!!(maybeStack&&maybeStack[IS_STACK]);};var print$7=function print$7(val,print,indent,opts,colors){return printImmutable$4(val,print,indent,opts,colors,'Stack',false);};var ImmutableStack={print:print$7,test:test$6};var printImmutable$5=printImmutable_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var IS_SET$1='@@__IMMUTABLE_SET__@@';var IS_ORDERED$2='@@__IMMUTABLE_ORDERED__@@';var test$7=function test$7(maybeOrderedSet){return maybeOrderedSet&&maybeOrderedSet[IS_SET$1]&&maybeOrderedSet[IS_ORDERED$2];};var print$8=function print$8(val,print,indent,opts,colors){return printImmutable$5(val,print,indent,opts,colors,'OrderedSet',false);};var ImmutableOrderedSet={print:print$8,test:test$7};var printImmutable$6=printImmutable_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var IS_MAP$1='@@__IMMUTABLE_MAP__@@';var IS_ORDERED$3='@@__IMMUTABLE_ORDERED__@@';var test$8=function test$8(maybeOrderedMap){return maybeOrderedMap&&maybeOrderedMap[IS_MAP$1]&&maybeOrderedMap[IS_ORDERED$3];};var print$9=function print$9(val,print,indent,opts,colors){return printImmutable$6(val,print,indent,opts,colors,'OrderedMap',true);};var ImmutableOrderedMap={print:print$9,test:test$8};var ImmutablePlugins=[ImmutableList,ImmutableSet,ImmutableMap,ImmutableStack,ImmutableOrderedSet,ImmutableOrderedMap];var escapeHTML$2=escapeHTML_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var reactElement=Symbol.for('react.element');function traverseChildren(opaqueChildren,cb){if(Array.isArray(opaqueChildren)){opaqueChildren.forEach(function(child){return traverseChildren(child,cb);});}else if(opaqueChildren!=null&&opaqueChildren!==false){cb(opaqueChildren);}}function printChildren$2(flatChildren,print,indent,colors,opts){return flatChildren.map(function(node){if((typeof node==='undefined'?'undefined':_typeof(node))==='object'){return print(node,print,indent,colors,opts);}else if(typeof node==='string'){return colors.content.open+escapeHTML$2(node)+colors.content.close;}else{return print(node);}}).join(opts.edgeSpacing);}function printProps(props,print,indent,colors,opts){return Object.keys(props).sort().map(function(name){if(name==='children'){return'';}var prop=props[name];var printed=print(prop);if(typeof prop!=='string'){if(printed.indexOf('\n')!==-1){printed='{'+opts.edgeSpacing+indent(indent(printed)+opts.edgeSpacing+'}');}else{printed='{'+printed+'}';}}return opts.spacing+indent(colors.prop.open+name+colors.prop.close+'=')+colors.value.open+printed+colors.value.close;}).join('');}var print$10=function print$10(element,print,indent,opts,colors){var result=colors.tag.open+'<';var elementName=void 0;if(typeof element.type==='string'){elementName=element.type;}else if(typeof element.type==='function'){elementName=element.type.displayName||element.type.name||'Unknown';}else{elementName='Unknown';}result+=elementName+colors.tag.close;result+=printProps(element.props,print,indent,colors,opts);var opaqueChildren=element.props.children;var hasProps=!!Object.keys(element.props).filter(function(propName){return propName!=='children';}).length;var closeInNewLine=hasProps&&!opts.min;if(opaqueChildren){var flatChildren=[];traverseChildren(opaqueChildren,function(child){flatChildren.push(child);});var children=printChildren$2(flatChildren,print,indent,colors,opts);result+=colors.tag.open+(closeInNewLine?'\n':'')+'>'+colors.tag.close+opts.edgeSpacing+indent(children)+opts.edgeSpacing+colors.tag.open+'</'+elementName+'>'+colors.tag.close;}else{result+=colors.tag.open+(closeInNewLine?'\n':' ')+'/>'+colors.tag.close;}return result;};var test$9=function test$9(object){return object&&object.$$typeof===reactElement;};var ReactElement$1={print:print$10,test:test$9};var escapeHTML$3=escapeHTML_1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var reactTestInstance=Symbol.for('react.test.json');function printChildren$3(children,print,indent,colors,opts){return children.map(function(child){return printInstance(child,print,indent,colors,opts);}).join(opts.edgeSpacing);}function printProps$1(props,print,indent,colors,opts){return Object.keys(props).sort().map(function(name){var prop=props[name];var printed=print(prop);if(typeof prop!=='string'){if(printed.indexOf('\n')!==-1){printed='{'+opts.edgeSpacing+indent(indent(printed)+opts.edgeSpacing+'}');}else{printed='{'+printed+'}';}}return opts.spacing+indent(colors.prop.open+name+colors.prop.close+'=')+colors.value.open+printed+colors.value.close;}).join('');}function printInstance(instance,print,indent,colors,opts){if(typeof instance=='number'){return print(instance);}else if(typeof instance==='string'){return colors.content.open+escapeHTML$3(instance)+colors.content.close;}var closeInNewLine=false;var result=colors.tag.open+'<'+instance.type+colors.tag.close;if(instance.props){closeInNewLine=!!Object.keys(instance.props).length&&!opts.min;result+=printProps$1(instance.props,print,indent,colors,opts);}if(instance.children){var children=printChildren$3(instance.children,print,indent,colors,opts);result+=colors.tag.open+(closeInNewLine?'\n':'')+'>'+colors.tag.close+opts.edgeSpacing+indent(children)+opts.edgeSpacing+colors.tag.open+'</'+instance.type+'>'+colors.tag.close;}else{result+=colors.tag.open+(closeInNewLine?'\n':' ')+'/>'+colors.tag.close;}return result;}var print$11=function print$11(val,print,indent,opts,colors){return printInstance(val,print,indent,colors,opts);};var test$10=function test$10(object){return object&&object.$$typeof===reactTestInstance;};var ReactTestComponent={print:print$11,test:test$10};var style=index$40;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var toString=Object.prototype.toString;var toISOString=Date.prototype.toISOString;var errorToString=Error.prototype.toString;var regExpToString=RegExp.prototype.toString;var symbolToString=Symbol.prototype.toString;var SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;var NEWLINE_REGEXP=/\n/gi;var getSymbols=Object.getOwnPropertySymbols||function(obj){return[];};function isToStringedArrayType(toStringed){return toStringed==='[object Array]'||toStringed==='[object ArrayBuffer]'||toStringed==='[object DataView]'||toStringed==='[object Float32Array]'||toStringed==='[object Float64Array]'||toStringed==='[object Int8Array]'||toStringed==='[object Int16Array]'||toStringed==='[object Int32Array]'||toStringed==='[object Uint8Array]'||toStringed==='[object Uint8ClampedArray]'||toStringed==='[object Uint16Array]'||toStringed==='[object Uint32Array]';}function printNumber$2(val){if(val!=+val){return'NaN';}var isNegativeZero=val===0&&1/val<0;return isNegativeZero?'-0':''+val;}function printFunction(val,printFunctionName){if(!printFunctionName){return'[Function]';}else if(val.name===''){return'[Function anonymous]';}else{return'[Function '+val.name+']';}}function printSymbol(val){return symbolToString.call(val).replace(SYMBOL_REGEXP,'Symbol($1)');}function printError(val){return'['+errorToString.call(val)+']';}function printBasicValue(val,printFunctionName,escapeRegex){if(val===true||val===false){return''+val;}if(val===undefined){return'undefined';}if(val===null){return'null';}var typeOf=typeof val==='undefined'?'undefined':_typeof(val);if(typeOf==='number'){return printNumber$2(val);}if(typeOf==='string'){return'"'+val.replace(/"|\\/g,'\\$&')+'"';}if(typeOf==='function'){return printFunction(val,printFunctionName);}if(typeOf==='symbol'){return printSymbol(val);}var toStringed=toString.call(val);if(toStringed==='[object WeakMap]'){return'WeakMap {}';}if(toStringed==='[object WeakSet]'){return'WeakSet {}';}if(toStringed==='[object Function]'||toStringed==='[object GeneratorFunction]'){return printFunction(val,printFunctionName);}if(toStringed==='[object Symbol]'){return printSymbol(val);}if(toStringed==='[object Date]'){return toISOString.call(val);}if(toStringed==='[object Error]'){return printError(val);}if(toStringed==='[object RegExp]'){if(escapeRegex){// https://github.com/benjamingr/RegExp.escape/blob/master/polyfill.js
return regExpToString.call(val).replace(/[\\^$*+?.()|[\]{}]/g,'\\$&');}return regExpToString.call(val);}if(toStringed==='[object Arguments]'&&val.length===0){return'Arguments []';}if(isToStringedArrayType(toStringed)&&val.length===0){return val.constructor.name+' []';}if(val instanceof Error){return printError(val);}return null;}function printList(list,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){var body='';if(list.length){body+=edgeSpacing;var innerIndent=prevIndent+indent;for(var _i31=0;_i31<list.length;_i31++){body+=innerIndent+print(list[_i31],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);if(_i31<list.length-1){body+=','+spacing;}}body+=(min?'':',')+edgeSpacing+prevIndent;}return'['+body+']';}function printArguments(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){return(min?'':'Arguments ')+printList(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}function printArray(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){return(min?'':val.constructor.name+' ')+printList(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}function printMap(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){var result='Map {';var iterator=val.entries();var current=iterator.next();if(!current.done){result+=edgeSpacing;var innerIndent=prevIndent+indent;while(!current.done){var key=print(current.value[0],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);var value=print(current.value[1],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);result+=innerIndent+key+' => '+value;current=iterator.next();if(!current.done){result+=','+spacing;}}result+=(min?'':',')+edgeSpacing+prevIndent;}return result+'}';}function printObject(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){var constructor=min?'':val.constructor?val.constructor.name+' ':'Object ';var result=constructor+'{';var keys=Object.keys(val).sort();var symbols=getSymbols(val);if(symbols.length){keys=keys.filter(function(key){return(// $FlowFixMe string literal `symbol`. This value is not a valid `typeof` return value
!((typeof key==='undefined'?'undefined':_typeof(key))==='symbol'||toString.call(key)==='[object Symbol]'));}).concat(symbols);}if(keys.length){result+=edgeSpacing;var innerIndent=prevIndent+indent;for(var _i32=0;_i32<keys.length;_i32++){var key=keys[_i32];var _name5=print(key,indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);var value=print(val[key],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);result+=innerIndent+_name5+': '+value;if(_i32<keys.length-1){result+=','+spacing;}}result+=(min?'':',')+edgeSpacing+prevIndent;}return result+'}';}function printSet(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){var result='Set {';var iterator=val.entries();var current=iterator.next();if(!current.done){result+=edgeSpacing;var innerIndent=prevIndent+indent;while(!current.done){result+=innerIndent+print(current.value[1],indent,innerIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);current=iterator.next();if(!current.done){result+=','+spacing;}}result+=(min?'':',')+edgeSpacing+prevIndent;}return result+'}';}function printComplexValue(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){refs=refs.slice();if(refs.indexOf(val)>-1){return'[Circular]';}else{refs.push(val);}currentDepth++;var hitMaxDepth=currentDepth>maxDepth;if(callToJSON&&!hitMaxDepth&&val.toJSON&&typeof val.toJSON==='function'){return print(val.toJSON(),indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}var toStringed=toString.call(val);if(toStringed==='[object Arguments]'){return hitMaxDepth?'[Arguments]':printArguments(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}else if(isToStringedArrayType(toStringed)){return hitMaxDepth?'[Array]':printArray(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}else if(toStringed==='[object Map]'){return hitMaxDepth?'[Map]':printMap(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}else if(toStringed==='[object Set]'){return hitMaxDepth?'[Set]':printSet(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}return hitMaxDepth?'[Object]':printObject(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}function printPlugin(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){var plugin=void 0;for(var p=0;p<plugins.length;p++){if(plugins[p].test(val)){plugin=plugins[p];break;}}if(!plugin){return null;}function boundPrint(val){return print(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}function boundIndent(str){var indentation=prevIndent+indent;return indentation+str.replace(NEWLINE_REGEXP,'\n'+indentation);}var opts={edgeSpacing:edgeSpacing,min:min,spacing:spacing};return plugin.print(val,boundPrint,boundIndent,opts,colors);}function print(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors){var pluginsResult=printPlugin(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);if(typeof pluginsResult==='string'){return pluginsResult;}var basicResult=printBasicValue(val,printFunctionName,escapeRegex);if(basicResult!==null){return basicResult;}return printComplexValue(val,indent,prevIndent,spacing,edgeSpacing,refs,maxDepth,currentDepth,plugins,min,callToJSON,printFunctionName,escapeRegex,colors);}var DEFAULTS={callToJSON:true,edgeSpacing:'\n',escapeRegex:false,highlight:false,indent:2,maxDepth:Infinity,min:false,plugins:[],printFunctionName:true,spacing:'\n',theme:{comment:'gray',content:'reset',prop:'yellow',tag:'cyan',value:'green'}};function validateOptions(opts){Object.keys(opts).forEach(function(key){if(!DEFAULTS.hasOwnProperty(key)){throw new Error('pretty-format: Unknown option "'+key+'".');}});if(opts.min&&opts.indent!==undefined&&opts.indent!==0){throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');}}function normalizeOptions$1(opts){var result={};Object.keys(DEFAULTS).forEach(function(key){return result[key]=opts.hasOwnProperty(key)?key==='theme'?normalizeTheme(opts.theme):opts[key]:DEFAULTS[key];});if(result.min){result.indent=0;}// Line truncated
return result;}function normalizeTheme(themeOption){if(!themeOption){throw new Error('pretty-format: Option "theme" must not be null.');}if((typeof themeOption==='undefined'?'undefined':_typeof(themeOption))!=='object'){throw new Error('pretty-format: Option "theme" must be of type "object" but instead received "'+(typeof themeOption==='undefined'?'undefined':_typeof(themeOption))+'".');}// Silently ignore any keys in `theme` that are not in defaults.
var themeRefined=themeOption;var themeDefaults=DEFAULTS.theme;return Object.keys(themeDefaults).reduce(function(theme,key){theme[key]=Object.prototype.hasOwnProperty.call(themeOption,key)?themeRefined[key]:themeDefaults[key];return theme;},{});}function createIndent(indent){return new Array(indent+1).join(' ');}function prettyFormat$1(val,initialOptions){var opts=void 0;if(!initialOptions){opts=DEFAULTS;}else{validateOptions(initialOptions);opts=normalizeOptions$1(initialOptions);}var colors={comment:{close:'',open:''},content:{close:'',open:''},prop:{close:'',open:''},tag:{close:'',open:''},value:{close:'',open:''}};Object.keys(opts.theme).forEach(function(key){if(opts.highlight){var color=colors[key]=style[opts.theme[key]];if(!color||typeof color.close!=='string'||typeof color.open!=='string'){throw new Error('pretty-format: Option "theme" has a key "'+key+'" whose value "'+opts.theme[key]+'" is undefined in ansi-styles.');}}});var indent=void 0;var refs=void 0;var prevIndent='';var currentDepth=0;var spacing=opts.min?' ':'\n';var edgeSpacing=opts.min?'':'\n';if(opts&&opts.plugins.length){indent=createIndent(opts.indent);refs=[];var pluginsResult=printPlugin(val,indent,prevIndent,spacing,edgeSpacing,refs,opts.maxDepth,currentDepth,opts.plugins,opts.min,opts.callToJSON,opts.printFunctionName,opts.escapeRegex,colors);if(typeof pluginsResult==='string'){return pluginsResult;}}var basicResult=printBasicValue(val,opts.printFunctionName,opts.escapeRegex);if(basicResult!==null){return basicResult;}if(!indent){indent=createIndent(opts.indent);}if(!refs){refs=[];}return printComplexValue(val,indent,prevIndent,spacing,edgeSpacing,refs,opts.maxDepth,currentDepth,opts.plugins,opts.min,opts.callToJSON,opts.printFunctionName,opts.escapeRegex,colors);}prettyFormat$1.plugins={AsymmetricMatcher:AsymmetricMatcher$1,ConvertAnsi:ConvertAnsi,HTMLElement:HTMLElement$1,Immutable:ImmutablePlugins,ReactElement:ReactElement$1,ReactTestComponent:ReactTestComponent};var index$38=prettyFormat$1;var chalk$1=index$32;var prettyFormat=index$38;var _require$plugins=index$38.plugins;var AsymmetricMatcher=_require$plugins.AsymmetricMatcher;var ReactElement=_require$plugins.ReactElement;var HTMLElement=_require$plugins.HTMLElement;var Immutable=_require$plugins.Immutable;var PLUGINS=[AsymmetricMatcher,ReactElement,HTMLElement].concat(Immutable);var EXPECTED_COLOR=chalk$1.green;var EXPECTED_BG=chalk$1.bgGreen;var RECEIVED_COLOR=chalk$1.red;var RECEIVED_BG=chalk$1.bgRed;var NUMBERS=['zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve','thirteen'];// get the type of a value with handling the edge cases like `typeof []`
// and `typeof null`
var getType$1=function getType$1(value){if(typeof value==='undefined'){return'undefined';}else if(value===null){return'null';}else if(Array.isArray(value)){return'array';}else if(typeof value==='boolean'){return'boolean';}else if(typeof value==='function'){return'function';}else if(typeof value==='number'){return'number';}else if(typeof value==='string'){return'string';}else if((typeof value==='undefined'?'undefined':_typeof(value))==='object'){if(value.constructor===RegExp){return'regexp';}else if(value.constructor===Map){return'map';}else if(value.constructor===Set){return'set';}return'object';// $FlowFixMe https://github.com/facebook/flow/issues/1015
}else if((typeof value==='undefined'?'undefined':_typeof(value))==='symbol'){return'symbol';}throw new Error('value of unknown type: '+value);};var stringify=function stringify(object){var maxDepth=arguments.length>1&&arguments[1]!==undefined?arguments[1]:10;var MAX_LENGTH=10000;var result=void 0;try{result=prettyFormat(object,{maxDepth:maxDepth,min:true,plugins:PLUGINS});}catch(e){result=prettyFormat(object,{callToJSON:false,maxDepth:maxDepth,min:true,plugins:PLUGINS});}return result.length>=MAX_LENGTH&&maxDepth>1?stringify(object,Math.floor(maxDepth/2)):result;};var highlightTrailingWhitespace=function highlightTrailingWhitespace(text,bgColor){return text.replace(/\s+$/gm,bgColor('$&'));};var printReceived=function printReceived(object){return highlightTrailingWhitespace(RECEIVED_COLOR(stringify(object)),RECEIVED_BG);};var printExpected=function printExpected(value){return highlightTrailingWhitespace(EXPECTED_COLOR(stringify(value)),EXPECTED_BG);};var printWithType=function printWithType(name,received,print){var type=getType$1(received);return name+':'+(type!=='null'&&type!=='undefined'?'\n '+type+': ':' ')+print(received);};var ensureNoExpected=function ensureNoExpected(expected,matcherName){matcherName||(matcherName='This');if(typeof expected!=='undefined'){throw new Error(matcherHint('[.not]'+matcherName,undefined,'')+'\n\n'+'Matcher does not accept any arguments.\n'+printWithType('Got',expected,printExpected));}};var ensureActualIsNumber=function ensureActualIsNumber(actual,matcherName){matcherName||(matcherName='This matcher');if(typeof actual!=='number'){throw new Error(matcherHint('[.not]'+matcherName)+'\n\n'+'Received value must be a number.\n'+printWithType('Received',actual,printReceived));}};var ensureExpectedIsNumber=function ensureExpectedIsNumber(expected,matcherName){matcherName||(matcherName='This matcher');if(typeof expected!=='number'){throw new Error(matcherHint('[.not]'+matcherName)+'\n\n'+'Expected value must be a number.\n'+printWithType('Got',expected,printExpected));}};var ensureNumbers=function ensureNumbers(actual,expected,matcherName){ensureActualIsNumber(actual,matcherName);ensureExpectedIsNumber(expected,matcherName);};var pluralize=function pluralize(word,count){return(NUMBERS[count]||count)+' '+word+(count===1?'':'s');};var matcherHint=function matcherHint(matcherName){var received=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'received';var expected=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'expected';var options=arguments[3];var secondArgument=options&&options.secondArgument;var isDirectExpectCall=options&&options.isDirectExpectCall;return chalk$1.dim('expect'+(isDirectExpectCall?'':'('))+RECEIVED_COLOR(received)+chalk$1.dim((isDirectExpectCall?'':')')+matcherName+'(')+EXPECTED_COLOR(expected)+(secondArgument?', '+EXPECTED_COLOR(secondArgument):'')+chalk$1.dim(')');};var index$30={EXPECTED_BG:EXPECTED_BG,EXPECTED_COLOR:EXPECTED_COLOR,RECEIVED_BG:RECEIVED_BG,RECEIVED_COLOR:RECEIVED_COLOR,ensureActualIsNumber:ensureActualIsNumber,ensureExpectedIsNumber:ensureExpectedIsNumber,ensureNoExpected:ensureNoExpected,ensureNumbers:ensureNumbers,getType:getType$1,highlightTrailingWhitespace:highlightTrailingWhitespace,matcherHint:matcherHint,pluralize:pluralize,printExpected:printExpected,printReceived:printReceived,printWithType:printWithType,stringify:stringify};/* eslint-disable no-nested-ternary */var arr=[];var charCodeCache=[];var index$46=function index$46(a,b){if(a===b){return 0;}var swap=a;// Swapping the strings if `a` is longer than `b` so we know which one is the
styles.color.grey=styles.color.gray;Object.keys(styles).forEach(function(groupName){var group=styles[groupName];Object.keys(group).forEach(function(styleName){var style=group[styleName];styles[styleName]={open:'\x1B['+style[0]+'m',close:'\x1B['+style[1]+'m'};group[styleName]=styles[styleName];});Object.defineProperty(styles,groupName,{value:group,enumerable:false});});var rgb2rgb=function rgb2rgb(r,g,b){return[r,g,b];};styles.color.close='\x1B[39m';styles.bgColor.close='\x1B[49m';styles.color.ansi={};styles.color.ansi256={};styles.color.ansi16m={rgb:wrapAnsi16m(rgb2rgb,0)};styles.bgColor.ansi={};styles.bgColor.ansi256={};styles.bgColor.ansi16m={rgb:wrapAnsi16m(rgb2rgb,10)};var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=Object.keys(colorConvert)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var key=_step.value;if(_typeof(colorConvert[key])!=='object'){continue;}var suite=colorConvert[key];if('ansi16'in suite){styles.color.ansi[key]=wrapAnsi16(suite.ansi16,0);styles.bgColor.ansi[key]=wrapAnsi16(suite.ansi16,10);}if('ansi256'in suite){styles.color.ansi256[key]=wrapAnsi256(suite.ansi256,0);styles.bgColor.ansi256[key]=wrapAnsi256(suite.ansi256,10);}if('rgb'in suite){styles.color.ansi16m[key]=wrapAnsi16m(suite.rgb,0);styles.bgColor.ansi16m[key]=wrapAnsi16m(suite.rgb,10);}}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}return styles;}Object.defineProperty(module,'exports',{enumerable:true,get:assembleStyles});});var index$34=function index$34(flag,argv){argv=argv||process.argv;var terminatorPos=argv.indexOf('--');var prefix=/^-{1,2}/.test(flag)?'':'--';var pos=argv.indexOf(prefix+flag);return pos!==-1&&(terminatorPos===-1?true:pos<terminatorPos);};var os$1=os;var hasFlag$1=index$34;var env=process.env;var support=function support(level){if(level===0){return false;}return{level:level,hasBasic:true,has256:level>=2,has16m:level>=3};};var supportLevel=function(){if(hasFlag$1('no-color')||hasFlag$1('no-colors')||hasFlag$1('color=false')){return 0;}if(hasFlag$1('color=16m')||hasFlag$1('color=full')||hasFlag$1('color=truecolor')){return 3;}if(hasFlag$1('color=256')){return 2;}if(hasFlag$1('color')||hasFlag$1('colors')||hasFlag$1('color=true')||hasFlag$1('color=always')){return 1;}if(process.stdout&&!process.stdout.isTTY){return 0;}if(process.platform==='win32'){// Node.js 7.5.0 is the first version of Node.js to include a patch to
// libuv that enables 256 color output on Windows. Anything earlier and it
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
// release that supports 256 colors.
var osRelease=os$1.release().split('.');if(Number(process.version.split('.')[0])>=8&&Number(osRelease[0])>=10&&Number(osRelease[2])>=10586){return 2;}return 1;}if('CI'in env){if('TRAVIS'in env||env.CI==='Travis'||'CIRCLECI'in env){return 1;}return 0;}if('TEAMCITY_VERSION'in env){return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0;}if('TERM_PROGRAM'in env){var _version=parseInt((env.TERM_PROGRAM_VERSION||'').split('.')[0],10);switch(env.TERM_PROGRAM){case'iTerm.app':return _version>=3?3:2;case'Hyper':return 3;case'Apple_Terminal':return 2;// No default
}}if(/^(screen|xterm)-256(?:color)?/.test(env.TERM)){return 2;}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(env.TERM)){return 1;}if('COLORTERM'in env){return 1;}if(env.TERM==='dumb'){return 0;}return 0;}();if('FORCE_COLOR'in env){supportLevel=parseInt(env.FORCE_COLOR,10)===0?0:supportLevel||1;}var index$32=process&&support(supportLevel);var TEMPLATE_REGEX=/(?:\\(u[a-f0-9]{4}|x[a-f0-9]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;var STYLE_REGEX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;var STRING_REGEX$1=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;var ESCAPE_REGEX=/\\(u[0-9a-f]{4}|x[0-9a-f]{2}|.)|([^\\])/gi;var ESCAPES={n:'\n',r:'\r',t:'\t',b:'\b',f:'\f',v:'\v',0:'\0','\\':'\\',e:'\x1B',a:'\x07'};function unescape(c){if(c[0]==='u'&&c.length===5||c[0]==='x'&&c.length===3){return String.fromCharCode(parseInt(c.slice(1),16));}return ESCAPES[c]||c;}function parseArguments(name,args){var results=[];var chunks=args.trim().split(/\s*,\s*/g);var matches=void 0;var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=chunks[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var chunk=_step2.value;if(!isNaN(chunk)){results.push(Number(chunk));}else if(matches=chunk.match(STRING_REGEX$1)){results.push(matches[2].replace(ESCAPE_REGEX,function(m,escape,chr){return escape?unescape(escape):chr;}));}else{throw new Error('Invalid Chalk template style argument: '+chunk+' (in style \''+name+'\')');}}}catch(err){_didIteratorError2=true;_iteratorError2=err;}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return){_iterator2.return();}}finally{if(_didIteratorError2){throw _iteratorError2;}}}return results;}function parseStyle(style){STYLE_REGEX.lastIndex=0;var results=[];var matches=void 0;while((matches=STYLE_REGEX.exec(style))!==null){var _name5=matches[1];if(matches[2]){var args=parseArguments(_name5,matches[2]);results.push([_name5].concat(args));}else{results.push([_name5]);}}return results;}function buildStyle(chalk,styles){var enabled={};var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=styles[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var layer=_step3.value;var _iteratorNormalCompletion5=true;var _didIteratorError5=false;var _iteratorError5=undefined;try{for(var _iterator5=layer.styles[Symbol.iterator](),_step5;!(_iteratorNormalCompletion5=(_step5=_iterator5.next()).done);_iteratorNormalCompletion5=true){var style=_step5.value;enabled[style[0]]=layer.inverse?null:style.slice(1);}}catch(err){_didIteratorError5=true;_iteratorError5=err;}finally{try{if(!_iteratorNormalCompletion5&&_iterator5.return){_iterator5.return();}}finally{if(_didIteratorError5){throw _iteratorError5;}}}}}catch(err){_didIteratorError3=true;_iteratorError3=err;}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return();}}finally{if(_didIteratorError3){throw _iteratorError3;}}}var current=chalk;var _iteratorNormalCompletion4=true;var _didIteratorError4=false;var _iteratorError4=undefined;try{for(var _iterator4=Object.keys(enabled)[Symbol.iterator](),_step4;!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=true){var styleName=_step4.value;if(Array.isArray(enabled[styleName])){if(!(styleName in current)){throw new Error('Unknown Chalk style: '+styleName);}if(enabled[styleName].length>0){current=current[styleName].apply(current,enabled[styleName]);}else{current=current[styleName];}}}}catch(err){_didIteratorError4=true;_iteratorError4=err;}finally{try{if(!_iteratorNormalCompletion4&&_iterator4.return){_iterator4.return();}}finally{if(_didIteratorError4){throw _iteratorError4;}}}return current;}var templates=function templates(chalk,tmp){var styles=[];var chunks=[];var chunk=[];// eslint-disable-next-line max-params
tmp.replace(TEMPLATE_REGEX,function(m,escapeChar,inverse,style,close,chr){if(escapeChar){chunk.push(unescape(escapeChar));}else if(style){var _str=chunk.join('');chunk=[];chunks.push(styles.length===0?_str:buildStyle(chalk,styles)(_str));styles.push({inverse:inverse,styles:parseStyle(style)});}else if(close){if(styles.length===0){throw new Error('Found extraneous } in Chalk template literal');}chunks.push(buildStyle(chalk,styles)(chunk.join('')));chunk=[];styles.pop();}else{chunk.push(chr);}});chunks.push(chunk.join(''));if(styles.length>0){var errMsg='Chalk template literal is missing '+styles.length+' closing bracket'+(styles.length===1?'':'s')+' (`}`)';throw new Error(errMsg);}return chunks.join('');};var escapeStringRegexp$1=index$10;var ansiStyles$1=index$26;var supportsColor$1=index$32;var template=templates;var isSimpleWindowsTerm$1=process.platform==='win32'&&!(process.env.TERM||'').toLowerCase().startsWith('xterm');// `supportsColor.level` → `ansiStyles.color[name]` mapping
var levelMapping=['ansi','ansi','ansi256','ansi16m'];// `color-convert` models to exclude from the Chalk API due to conflicts and such
var skipModels=new Set(['gray']);var styles$1=Object.create(null);function applyOptions(obj,options){options=options||{};// Detect level if not set manually
var scLevel=supportsColor$1?supportsColor$1.level:0;obj.level=options.level===undefined?scLevel:options.level;obj.enabled='enabled'in options?options.enabled:obj.level>0;}function Chalk$1(options){// We check for this.template here since calling `chalk.constructor()`
// by itself will have a `this` of a previously constructed chalk object
if(!this||!(this instanceof Chalk$1)||this.template){var chalk={};applyOptions(chalk,options);chalk.template=function(){var args=[].slice.call(arguments);return chalkTag.apply(null,[chalk.template].concat(args));};Object.setPrototypeOf(chalk,Chalk$1.prototype);Object.setPrototypeOf(chalk.template,chalk);chalk.template.constructor=Chalk$1;return chalk.template;}applyOptions(this,options);}// Use bright blue on Windows as the normal blue color is illegible
if(isSimpleWindowsTerm$1){ansiStyles$1.blue.open='\x1B[94m';}var _iteratorNormalCompletion6=true;var _didIteratorError6=false;var _iteratorError6=undefined;try{var _loop=function _loop(){var key=_step6.value;ansiStyles$1[key].closeRe=new RegExp(escapeStringRegexp$1(ansiStyles$1[key].close),'g');styles$1[key]={get:function get(){var codes=ansiStyles$1[key];return build$1.call(this,this._styles?this._styles.concat(codes):[codes],key);}};};for(var _iterator6=Object.keys(ansiStyles$1)[Symbol.iterator](),_step6;!(_iteratorNormalCompletion6=(_step6=_iterator6.next()).done);_iteratorNormalCompletion6=true){_loop();}}catch(err){_didIteratorError6=true;_iteratorError6=err;}finally{try{if(!_iteratorNormalCompletion6&&_iterator6.return){_iterator6.return();}}finally{if(_didIteratorError6){throw _iteratorError6;}}}ansiStyles$1.color.closeRe=new RegExp(escapeStringRegexp$1(ansiStyles$1.color.close),'g');var _iteratorNormalCompletion7=true;var _didIteratorError7=false;var _iteratorError7=undefined;try{var _loop2=function _loop2(){var model=_step7.value;if(skipModels.has(model)){return'continue';}styles$1[model]={get:function get(){var level=this.level;return function(){var open=ansiStyles$1.color[levelMapping[level]][model].apply(null,arguments);var codes={open:open,close:ansiStyles$1.color.close,closeRe:ansiStyles$1.color.closeRe};return build$1.call(this,this._styles?this._styles.concat(codes):[codes],model);};}};};for(var _iterator7=Object.keys(ansiStyles$1.color.ansi)[Symbol.iterator](),_step7;!(_iteratorNormalCompletion7=(_step7=_iterator7.next()).done);_iteratorNormalCompletion7=true){var _ret2=_loop2();if(_ret2==='continue')continue;}}catch(err){_didIteratorError7=true;_iteratorError7=err;}finally{try{if(!_iteratorNormalCompletion7&&_iterator7.return){_iterator7.return();}}finally{if(_didIteratorError7){throw _iteratorError7;}}}ansiStyles$1.bgColor.closeRe=new RegExp(escapeStringRegexp$1(ansiStyles$1.bgColor.close),'g');var _iteratorNormalCompletion8=true;var _didIteratorError8=false;var _iteratorError8=undefined;try{var _loop3=function _loop3(){var model=_step8.value;if(skipModels.has(model)){return'continue';}var bgModel='bg'+model[0].toUpperCase()+model.slice(1);styles$1[bgModel]={get:function get(){var level=this.level;return function(){var open=ansiStyles$1.bgColor[levelMapping[level]][model].apply(null,arguments);var codes={open:open,close:ansiStyles$1.bgColor.close,closeRe:ansiStyles$1.bgColor.closeRe};return build$1.call(this,this._styles?this._styles.concat(codes):[codes],model);};}};};for(var _iterator8=Object.keys(ansiStyles$1.bgColor.ansi)[Symbol.iterator](),_step8;!(_iteratorNormalCompletion8=(_step8=_iterator8.next()).done);_iteratorNormalCompletion8=true){var _ret3=_loop3();if(_ret3==='continue')continue;}}catch(err){_didIteratorError8=true;_iteratorError8=err;}finally{try{if(!_iteratorNormalCompletion8&&_iterator8.return){_iterator8.return();}}finally{if(_didIteratorError8){throw _iteratorError8;}}}var proto$1=Object.defineProperties(function(){},styles$1);function build$1(_styles,key){var builder=function builder(){return applyStyle$1.apply(builder,arguments);};builder._styles=_styles;var self=this;Object.defineProperty(builder,'level',{enumerable:true,get:function get(){return self.level;},set:function set(level){self.level=level;}});Object.defineProperty(builder,'enabled',{enumerable:true,get:function get(){return self.enabled;},set:function set(enabled){self.enabled=enabled;}});// See below for fix regarding invisible grey/dim combination on Windows
builder.hasGrey=this.hasGrey||key==='gray'||key==='grey';// `__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$1;// eslint-disable-line no-proto
return builder;}function applyStyle$1(){// Support varags, but simply cast to string in case there's only one arg
var args=arguments;var argsLen=args.length;var str=String(arguments[0]);if(argsLen===0){return'';}if(argsLen>1){// Don't slice `arguments`, it prevents V8 optimizations
for(var a=1;a<argsLen;a++){str+=' '+args[a];}}if(!this.enabled||this.level<=0||!str){return str;}// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
var originalDim=ansiStyles$1.dim.open;if(isSimpleWindowsTerm$1&&this.hasGrey){ansiStyles$1.dim.open='';}var _iteratorNormalCompletion9=true;var _didIteratorError9=false;var _iteratorError9=undefined;try{for(var _iterator9=this._styles.slice().reverse()[Symbol.iterator](),_step9;!(_iteratorNormalCompletion9=(_step9=_iterator9.next()).done);_iteratorNormalCompletion9=true){var _code2=_step9.value;// 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=_code2.open+str.replace(_code2.closeRe,_code2.open)+_code2.close;// Close the styling before a linebreak and reopen
// after next line to fix a bleed issue on macOS
// https://github.com/chalk/chalk/pull/92
str=str.replace(/\r?\n/g,_code2.close+'$&'+_code2.open);}// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
}catch(err){_didIteratorError9=true;_iteratorError9=err;}finally{try{if(!_iteratorNormalCompletion9&&_iterator9.return){_iterator9.return();}}finally{if(_didIteratorError9){throw _iteratorError9;}}}ansiStyles$1.dim.open=originalDim;return str;}function chalkTag(chalk,strings){if(!Array.isArray(strings)){// If chalk() was called by itself or with a string,
// return the string itself as a string.
return[].slice.call(arguments,1).join(' ');}var args=[].slice.call(arguments,2);var parts=[strings.raw[0]];for(var _i30=1;_i30<strings.length;_i30++){parts.push(String(args[_i30-1]).replace(/[{}\\]/g,'\\$&'));parts.push(String(strings.raw[_i30]));}return template(chalk,parts.join(''));}Object.defineProperties(Chalk$1.prototype,styles$1);var index$24=Chalk$1();// eslint-disable-line new-cap
var supportsColor_1$1=supportsColor$1;index$24.supportsColor=supportsColor_1$1;var index$38=createCommonjsModule(function(module){'use strict';var colorConvert=index$28;var wrapAnsi16=function wrapAnsi16(fn,offset){return function(){var code=fn.apply(colorConvert,arguments);return'\x1B['+(code+offset)+'m';};};var wrapAnsi256=function wrapAnsi256(fn,offset){return function(){var code=fn.apply(colorConvert,arguments);return'\x1B['+(38+offset)+';5;'+code+'m';};};var wrapAnsi16m=function wrapAnsi16m(fn,offset){return function(){var rgb=fn.apply(colorConvert,arguments);return'\x1B['+(38+offset)+';2;'+rgb[0]+';'+rgb[1]+';'+rgb[2]+'m';};};function assembleStyles(){var codes=new Map();var styles={modifier:{reset:[0,0],// 21 isn't widely supported and 22 does the same thing
bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{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],// Bright color
redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],// Bright color
bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};// Fix humans
styles.color.grey=styles.color.gray;var _iteratorNormalCompletion10=true;var _didIteratorError10=false;var _iteratorError10=undefined;try{for(var _iterator10=Object.keys(styles)[Symbol.iterator](),_step10;!(_iteratorNormalCompletion10=(_step10=_iterator10.next()).done);_iteratorNormalCompletion10=true){var groupName=_step10.value;var _group2=styles[groupName];var _iteratorNormalCompletion12=true;var _didIteratorError12=false;var _iteratorError12=undefined;try{for(var _iterator12=Object.keys(_group2)[Symbol.iterator](),_step12;!(_iteratorNormalCompletion12=(_step12=_iterator12.next()).done);_iteratorNormalCompletion12=true){var styleName=_step12.value;var style=_group2[styleName];styles[styleName]={open:'\x1B['+style[0]+'m',close:'\x1B['+style[1]+'m'};_group2[styleName]=styles[styleName];codes.set(style[0],style[1]);}}catch(err){_didIteratorError12=true;_iteratorError12=err;}finally{try{if(!_iteratorNormalCompletion12&&_iterator12.return){_iterator12.return();}}finally{if(_didIteratorError12){throw _iteratorError12;}}}Object.defineProperty(styles,groupName,{value:_group2,enumerable:false});Object.defineProperty(styles,'codes',{value:codes,enumerable:false});}}catch(err){_didIteratorError10=true;_iteratorError10=err;}finally{try{if(!_iteratorNormalCompletion10&&_iterator10.return){_iterator10.return();}}finally{if(_didIteratorError10){throw _iteratorError10;}}}var rgb2rgb=function rgb2rgb(r,g,b){return[r,g,b];};styles.color.close='\x1B[39m';styles.bgColor.close='\x1B[49m';styles.color.ansi={};styles.color.ansi256={};styles.color.ansi16m={rgb:wrapAnsi16m(rgb2rgb,0)};styles.bgColor.ansi={};styles.bgColor.ansi256={};styles.bgColor.ansi16m={rgb:wrapAnsi16m(rgb2rgb,10)};var _iteratorNormalCompletion11=true;var _didIteratorError11=false;var _iteratorError11=undefined;try{for(var _iterator11=Object.keys(colorConvert)[Symbol.iterator](),_step11;!(_iteratorNormalCompletion11=(_step11=_iterator11.next()).done);_iteratorNormalCompletion11=true){var key=_step11.value;if(_typeof(colorConvert[key])!=='object'){continue;}var suite=colorConvert[key];if('ansi16'in suite){styles.color.ansi[key]=wrapAnsi16(suite.ansi16,0);styles.bgColor.ansi[key]=wrapAnsi16(suite.ansi16,10);}if('ansi256'in suite){styles.color.ansi256[key]=wrapAnsi256(suite.ansi256,0);styles.bgColor.ansi256[key]=wrapAnsi256(suite.ansi256,10);}if('rgb'in suite){styles.color.ansi16m[key]=wrapAnsi16m(suite.rgb,0);styles.bgColor.ansi16m[key]=wrapAnsi16m(suite.rgb,10);}}}catch(err){_didIteratorError11=true;_iteratorError11=err;}finally{try{if(!_iteratorNormalCompletion11&&_iterator11.return){_iterator11.return();}}finally{if(_didIteratorError11){throw _iteratorError11;}}}return styles;}// Make the export immutable
Object.defineProperty(module,'exports',{enumerable:true,get:assembleStyles});});var collections=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.printIteratorEntries=printIteratorEntries;exports.printIteratorValues=printIteratorValues;exports.printListItems=printListItems;exports.printObjectProperties=printObjectProperties;var getSymbols=Object.getOwnPropertySymbols||function(obj){return[];};/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var isSymbol=function isSymbol(key){return(// $FlowFixMe string literal `symbol`. This value is not a valid `typeof` return value
(typeof key==='undefined'?'undefined':_typeof(key))==='symbol'||toString.call(key)==='[object Symbol]');};// Return entries (for example, of a map)
// with spacing, indentation, and comma
// without surrounding punctuation (for example, braces)
function printIteratorEntries(// Flow 0.51.0: property `@@iterator` of $Iterator not found in Object
// To allow simplistic getRecordIterator in immutable.js
iterator,config,indentation,depth,refs,printer){var separator=arguments.length>6&&arguments[6]!==undefined?arguments[6]:': ';var result='';var current=iterator.next();if(!current.done){result+=config.spacingOuter;var indentationNext=indentation+config.indent;while(!current.done){var _name6=printer(current.value[0],config,indentationNext,depth,refs);var value=printer(current.value[1],config,indentationNext,depth,refs);result+=indentationNext+_name6+separator+value;current=iterator.next();if(!current.done){result+=','+config.spacingInner;}else if(!config.min){result+=',';}}result+=config.spacingOuter+indentation;}return result;}// Return values (for example, of a set)
// with spacing, indentation, and comma
// without surrounding punctuation (braces or brackets)
function printIteratorValues(iterator,config,indentation,depth,refs,printer){var result='';var current=iterator.next();if(!current.done){result+=config.spacingOuter;var indentationNext=indentation+config.indent;while(!current.done){result+=indentationNext+printer(current.value,config,indentationNext,depth,refs);current=iterator.next();if(!current.done){result+=','+config.spacingInner;}else if(!config.min){result+=',';}}result+=config.spacingOuter+indentation;}return result;}// Return items (for example, of an array)
// with spacing, indentation, and comma
// without surrounding punctuation (for example, brackets)
function printListItems(list,config,indentation,depth,refs,printer){var result='';if(list.length){result+=config.spacingOuter;var indentationNext=indentation+config.indent;for(var _i31=0;_i31<list.length;_i31++){result+=indentationNext+printer(list[_i31],config,indentationNext,depth,refs);if(_i31<list.length-1){result+=','+config.spacingInner;}else if(!config.min){result+=',';}}result+=config.spacingOuter+indentation;}return result;}// Return properties of an object
// with spacing, indentation, and comma
// without surrounding punctuation (for example, braces)
function printObjectProperties(val,config,indentation,depth,refs,printer){var result='';var keys=Object.keys(val).sort();var symbols=getSymbols(val);if(symbols.length){keys=keys.filter(function(key){return!isSymbol(key);}).concat(symbols);}if(keys.length){result+=config.spacingOuter;var indentationNext=indentation+config.indent;for(var _i32=0;_i32<keys.length;_i32++){var key=keys[_i32];var _name7=printer(key,config,indentationNext,depth,refs);var value=printer(val[key],config,indentationNext,depth,refs);result+=indentationNext+_name7+': '+value;if(_i32<keys.length-1){result+=','+config.spacingInner;}else if(!config.min){result+=',';}}result+=config.spacingOuter+indentation;}return result;}});var asymmetric_matcher=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.test=exports.serialize=undefined;var _collections=collections;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var asymmetricMatcher=Symbol.for('jest.asymmetricMatcher');var SPACE=' ';var serialize=exports.serialize=function(val,config,indentation,depth,refs,printer){var stringedValue=val.toString();if(stringedValue==='ArrayContaining'){if(++depth>config.maxDepth){return'['+stringedValue+']';}return stringedValue+SPACE+'['+(0,_collections.printListItems)(val.sample,config,indentation,depth,refs,printer)+']';}if(stringedValue==='ObjectContaining'){if(++depth>config.maxDepth){return'['+stringedValue+']';}return stringedValue+SPACE+'{'+(0,_collections.printObjectProperties)(val.sample,config,indentation,depth,refs,printer)+'}';}if(stringedValue==='StringMatching'){return stringedValue+SPACE+printer(val.sample,config,indentation,depth,refs);}if(stringedValue==='StringContaining'){return stringedValue+SPACE+printer(val.sample,config,indentation,depth,refs);}return val.toAsymmetricMatcher();};var test=exports.test=function(val){return val&&val.$$typeof===asymmetricMatcher;};exports.default={serialize:serialize,test:test};});var index$40=function index$40(){var pattern=['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)','(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'].join('|');return new RegExp(pattern,'g');};var convert_ansi=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.serialize=exports.test=undefined;var _ansiRegex=index$40;var _ansiRegex2=_interopRequireDefault(_ansiRegex);var _ansiStyles=index$38;var _ansiStyles2=_interopRequireDefault(_ansiStyles);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var toHumanReadableAnsi=function toHumanReadableAnsi(text){return text.replace((0,_ansiRegex2.default)(),function(match,offset,string){switch(match){case _ansiStyles2.default.red.close:case _ansiStyles2.default.green.close:case _ansiStyles2.default.cyan.close:case _ansiStyles2.default.bgRed.close:case _ansiStyles2.default.bgGreen.close:case _ansiStyles2.default.bgCyan.close:case _ansiStyles2.default.reset.open:case _ansiStyles2.default.reset.close:return'</>';case _ansiStyles2.default.red.open:return'<red>';case _ansiStyles2.default.green.open:return'<green>';case _ansiStyles2.default.cyan.open:return'<cyan>';case _ansiStyles2.default.bgRed.open:return'<bgRed>';case _ansiStyles2.default.bgGreen.open:return'<bgGreen>';case _ansiStyles2.default.bgCyan.open:return'<bgCyan>';case _ansiStyles2.default.dim.open:return'<dim>';case _ansiStyles2.default.bold.open:return'<bold>';default:return'';}});};/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var test=exports.test=function(val){return typeof val==='string'&&val.match((0,_ansiRegex2.default)());};var serialize=exports.serialize=function(val,config,indentation,depth,refs,printer){return printer(toHumanReadableAnsi(val),config,indentation,depth,refs);};exports.default={serialize:serialize,test:test};});var escape_html=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.default=escapeHTML;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/function escapeHTML(str){return str.replace(/</g,'&lt;').replace(/>/g,'&gt;');}});var markup=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.printElementAsLeaf=exports.printElement=exports.printComment=exports.printText=exports.printChildren=exports.printProps=undefined;var _escape_html=escape_html;var _escape_html2=_interopRequireDefault(_escape_html);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}// Return empty string if keys is empty.
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var printProps=exports.printProps=function(keys,props,config,indentation,depth,refs,printer){var indentationNext=indentation+config.indent;var colors=config.colors;return keys.map(function(key){var value=props[key];var printed=printer(value,config,indentationNext,depth,refs);if(typeof value!=='string'){if(printed.indexOf('\n')!==-1){printed=config.spacingOuter+indentationNext+printed+config.spacingOuter+indentation;}printed='{'+printed+'}';}return config.spacingInner+indentation+colors.prop.open+key+colors.prop.close+'='+colors.value.open+printed+colors.value.close;}).join('');};// Return empty string if children is empty.
var printChildren=exports.printChildren=function(children,config,indentation,depth,refs,printer){return children.map(function(child){return config.spacingOuter+indentation+(typeof child==='string'?printText(child,config):printer(child,config,indentation,depth,refs));}).join('');};var printText=exports.printText=function(text,config){var contentColor=config.colors.content;return contentColor.open+(0,_escape_html2.default)(text)+contentColor.close;};var printComment=exports.printComment=function(comment,config){var commentColor=config.colors.comment;return commentColor.open+'<!--'+(0,_escape_html2.default)(comment)+'-->'+commentColor.close;};// Separate the functions to format props, children, and element,
// so a plugin could override a particular function, if needed.
// Too bad, so sad: the traditional (but unnecessary) space
// in a self-closing tagColor requires a second test of printedProps.
var printElement=exports.printElement=function(type,printedProps,printedChildren,config,indentation){var tagColor=config.colors.tag;return tagColor.open+'<'+type+(printedProps&&tagColor.close+printedProps+config.spacingOuter+indentation+tagColor.open)+(printedChildren?'>'+tagColor.close+printedChildren+config.spacingOuter+indentation+tagColor.open+'</'+type:(printedProps&&!config.min?'':' ')+'/')+'>'+tagColor.close;};var printElementAsLeaf=exports.printElementAsLeaf=function(type,config){var tagColor=config.colors.tag;return tagColor.open+'<'+type+tagColor.close+' …'+tagColor.open+' />'+tagColor.close;};});var dom_element=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.serialize=exports.test=undefined;var _markup=markup;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var ELEMENT_NODE=1;var TEXT_NODE=3;var COMMENT_NODE=8;var ELEMENT_REGEXP=/^(HTML|SVG)\w*?Element$/;var testNode=function testNode(nodeType,name){return nodeType===ELEMENT_NODE&&ELEMENT_REGEXP.test(name)||nodeType===TEXT_NODE&&name==='Text'||nodeType===COMMENT_NODE&&name==='Comment';};var test=exports.test=function(val){return val&&val.constructor&&val.constructor.name&&testNode(val.nodeType,val.constructor.name);};// Convert array of attribute objects to keys array and props object.
var keysMapper=function keysMapper(attribute){return attribute.name;};var propsReducer=function propsReducer(props,attribute){props[attribute.name]=attribute.value;return props;};var serialize=exports.serialize=function(node,config,indentation,depth,refs,printer){if(node.nodeType===TEXT_NODE){return(0,_markup.printText)(node.data,config);}if(node.nodeType===COMMENT_NODE){return(0,_markup.printComment)(node.data,config);}var type=node.tagName.toLowerCase();if(++depth>config.maxDepth){return(0,_markup.printElementAsLeaf)(type,config);}return(0,_markup.printElement)(type,(0,_markup.printProps)(Array.prototype.map.call(node.attributes,keysMapper).sort(),Array.prototype.reduce.call(node.attributes,propsReducer,{}),config,indentation+config.indent,depth,refs,printer),(0,_markup.printChildren)(Array.prototype.slice.call(node.childNodes),config,indentation+config.indent,depth,refs,printer),config,indentation);};exports.default={serialize:serialize,test:test};});var immutable=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.test=exports.serialize=undefined;var _collections=collections;// SENTINEL constants are from https://github.com/facebook/immutable-js
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var IS_ITERABLE_SENTINEL='@@__IMMUTABLE_ITERABLE__@@';var IS_LIST_SENTINEL='@@__IMMUTABLE_LIST__@@';var IS_KEYED_SENTINEL='@@__IMMUTABLE_KEYED__@@';var IS_MAP_SENTINEL='@@__IMMUTABLE_MAP__@@';var IS_ORDERED_SENTINEL='@@__IMMUTABLE_ORDERED__@@';var IS_RECORD_SENTINEL='@@__IMMUTABLE_RECORD__@@';// immutable v4
var IS_SEQ_SENTINEL='@@__IMMUTABLE_SEQ__@@';var IS_SET_SENTINEL='@@__IMMUTABLE_SET__@@';var IS_STACK_SENTINEL='@@__IMMUTABLE_STACK__@@';var getImmutableName=function getImmutableName(name){return'Immutable.'+name;};var printAsLeaf=function printAsLeaf(name){return'['+name+']';};var SPACE=' ';var LAZY='…';// Seq is lazy if it calls a method like filter
var printImmutableEntries=function printImmutableEntries(val,config,indentation,depth,refs,printer,type){return++depth>config.maxDepth?printAsLeaf(getImmutableName(type)):getImmutableName(type)+SPACE+'{'+(0,_collections.printIteratorEntries)(val.entries(),config,indentation,depth,refs,printer)+'}';};// Return an iterator for Immutable Record in v4 or later.
var getRecordEntries=function getRecordEntries(val){var i=0;return{next:function next(){if(i<val._keys.length){var key=val._keys[i++];return{done:false,value:[key,val.get(key)]};}return{done:true};}};};var printImmutableRecord=function printImmutableRecord(val,config,indentation,depth,refs,printer){// _name property is defined only for an Immutable Record instance
// which was constructed with a second optional descriptive name arg
var name=getImmutableName(val._name||'Record');var entries=_typeof(Array.isArray(val._keys))?getRecordEntries(val// immutable v4
):val.entries();// Record is a collection in immutable v3
return++depth>config.maxDepth?printAsLeaf(name):name+SPACE+'{'+(0,_collections.printIteratorEntries)(entries,config,indentation,depth,refs,printer)+'}';};var printImmutableSeq=function printImmutableSeq(val,config,indentation,depth,refs,printer){var name=getImmutableName('Seq');if(++depth>config.maxDepth){return printAsLeaf(name);}if(val[IS_KEYED_SENTINEL]){return name+SPACE+'{'+(// from Immutable collection of entries or from ECMAScript object
val._iter||val._object?(0,_collections.printIteratorEntries)(val.entries(),config,indentation,depth,refs,printer):LAZY)+'}';}return name+SPACE+'['+(val._iter||// from Immutable collection of values
val._array||// from ECMAScript array
val._collection||// from ECMAScript collection in immutable v4
val._iterable// from ECMAScript collection in immutable v3
?(0,_collections.printIteratorValues)(val.values(),config,indentation,depth,refs,printer):LAZY)+']';};var printImmutableValues=function printImmutableValues(val,config,indentation,depth,refs,printer,type){return++depth>config.maxDepth?printAsLeaf(getImmutableName(type)):getImmutableName(type)+SPACE+'['+(0,_collections.printIteratorValues)(val.values(),config,indentation,depth,refs,printer)+']';};var serialize=exports.serialize=function(val,config,indentation,depth,refs,printer){if(val[IS_MAP_SENTINEL]){return printImmutableEntries(val,config,indentation,depth,refs,printer,val[IS_ORDERED_SENTINEL]?'OrderedMap':'Map');}if(val[IS_LIST_SENTINEL]){return printImmutableValues(val,config,indentation,depth,refs,printer,'List');}if(val[IS_SET_SENTINEL]){return printImmutableValues(val,config,indentation,depth,refs,printer,val[IS_ORDERED_SENTINEL]?'OrderedSet':'Set');}if(val[IS_STACK_SENTINEL]){return printImmutableValues(val,config,indentation,depth,refs,printer,'Stack');}if(val[IS_SEQ_SENTINEL]){return printImmutableSeq(val,config,indentation,depth,refs,printer);}// For compatibility with immutable v3 and v4, let record be the default.
return printImmutableRecord(val,config,indentation,depth,refs,printer);};var test=exports.test=function(val){return val&&(val[IS_ITERABLE_SENTINEL]||val[IS_RECORD_SENTINEL]);};exports.default={serialize:serialize,test:test};});var react_element=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.test=exports.serialize=undefined;var _markup=markup;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var elementSymbol=Symbol.for('react.element');// Given element.props.children, or subtree during recursive traversal,
// return flattened array of children.
var getChildren=function getChildren(arg){var children=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];if(Array.isArray(arg)){arg.forEach(function(item){getChildren(item,children);});}else if(arg!=null&&arg!==false){children.push(arg);}return children;};var getType=function getType(element){if(typeof element.type==='string'){return element.type;}if(typeof element.type==='function'){return element.type.displayName||element.type.name||'Unknown';}return'UNDEFINED';};var serialize=exports.serialize=function(element,config,indentation,depth,refs,printer){return++depth>config.maxDepth?(0,_markup.printElementAsLeaf)(getType(element),config):(0,_markup.printElement)(getType(element),(0,_markup.printProps)(Object.keys(element.props).filter(function(key){return key!=='children';}).sort(),element.props,config,indentation+config.indent,depth,refs,printer),(0,_markup.printChildren)(getChildren(element.props.children),config,indentation+config.indent,depth,refs,printer),config,indentation);};var test=exports.test=function(val){return val&&val.$$typeof===elementSymbol;};exports.default={serialize:serialize,test:test};});var react_test_component=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.test=exports.serialize=undefined;var _markup=markup;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var testSymbol=Symbol.for('react.test.json');var serialize=exports.serialize=function(object,config,indentation,depth,refs,printer){return++depth>config.maxDepth?(0,_markup.printElementAsLeaf)(object.type,config):(0,_markup.printElement)(object.type,object.props?(0,_markup.printProps)(Object.keys(object.props).sort(),// Despite ternary expression, Flow 0.51.0 found incorrect error:
// undefined is incompatible with the expected param type of Object
// $FlowFixMe
object.props,config,indentation+config.indent,depth,refs,printer):'',object.children?(0,_markup.printChildren)(object.children,config,indentation+config.indent,depth,refs,printer):'',config,indentation);};var test=exports.test=function(val){return val&&val.$$typeof===testSymbol;};exports.default={serialize:serialize,test:test};});var index$36=createCommonjsModule(function(module){'use strict';var _ansiStyles=index$38;var _ansiStyles2=_interopRequireDefault(_ansiStyles);var _collections=collections;var _asymmetric_matcher=asymmetric_matcher;var _asymmetric_matcher2=_interopRequireDefault(_asymmetric_matcher);var _convert_ansi=convert_ansi;var _convert_ansi2=_interopRequireDefault(_convert_ansi);var _dom_element=dom_element;var _dom_element2=_interopRequireDefault(_dom_element);var _immutable=immutable;var _immutable2=_interopRequireDefault(_immutable);var _react_element=react_element;var _react_element2=_interopRequireDefault(_react_element);var _react_test_component=react_test_component;var _react_test_component2=_interopRequireDefault(_react_test_component);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var toString=Object.prototype.toString;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var toISOString=Date.prototype.toISOString;var errorToString=Error.prototype.toString;var regExpToString=RegExp.prototype.toString;var symbolToString=Symbol.prototype.toString;var SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;var NEWLINE_REGEXP=/\n/gi;function isToStringedArrayType(toStringed){return toStringed==='[object Array]'||toStringed==='[object ArrayBuffer]'||toStringed==='[object DataView]'||toStringed==='[object Float32Array]'||toStringed==='[object Float64Array]'||toStringed==='[object Int8Array]'||toStringed==='[object Int16Array]'||toStringed==='[object Int32Array]'||toStringed==='[object Uint8Array]'||toStringed==='[object Uint8ClampedArray]'||toStringed==='[object Uint16Array]'||toStringed==='[object Uint32Array]';}function printNumber(val){if(val!=+val){return'NaN';}var isNegativeZero=val===0&&1/val<0;return isNegativeZero?'-0':''+val;}function printFunction(val,printFunctionName){if(!printFunctionName){return'[Function]';}return'[Function '+(val.name||'anonymous')+']';}function printSymbol(val){return symbolToString.call(val).replace(SYMBOL_REGEXP,'Symbol($1)');}function printError(val){return'['+errorToString.call(val)+']';}function printBasicValue(val,printFunctionName,escapeRegex){if(val===true||val===false){return''+val;}if(val===undefined){return'undefined';}if(val===null){return'null';}var typeOf=typeof val==='undefined'?'undefined':_typeof(val);if(typeOf==='number'){return printNumber(val);}if(typeOf==='string'){return'"'+val.replace(/"|\\/g,'\\$&')+'"';}if(typeOf==='function'){return printFunction(val,printFunctionName);}if(typeOf==='symbol'){return printSymbol(val);}var toStringed=toString.call(val);if(toStringed==='[object WeakMap]'){return'WeakMap {}';}if(toStringed==='[object WeakSet]'){return'WeakSet {}';}if(toStringed==='[object Function]'||toStringed==='[object GeneratorFunction]'){return printFunction(val,printFunctionName);}if(toStringed==='[object Symbol]'){return printSymbol(val);}if(toStringed==='[object Date]'){return toISOString.call(val);}if(toStringed==='[object Error]'){return printError(val);}if(toStringed==='[object RegExp]'){if(escapeRegex){// https://github.com/benjamingr/RegExp.escape/blob/master/polyfill.js
return regExpToString.call(val).replace(/[\\^$*+?.()|[\]{}]/g,'\\$&');}return regExpToString.call(val);}if(val instanceof Error){return printError(val);}return null;}function printComplexValue(val,config,indentation,depth,refs){if(refs.indexOf(val)!==-1){return'[Circular]';}refs=refs.slice();refs.push(val);var hitMaxDepth=++depth>config.maxDepth;var min=config.min;if(config.callToJSON&&!hitMaxDepth&&val.toJSON&&typeof val.toJSON==='function'){return printer(val.toJSON(),config,indentation,depth,refs);}var toStringed=toString.call(val);if(toStringed==='[object Arguments]'){return hitMaxDepth?'[Arguments]':(min?'':'Arguments ')+'['+(0,_collections.printListItems)(val,config,indentation,depth,refs,printer)+']';}if(isToStringedArrayType(toStringed)){return hitMaxDepth?'['+val.constructor.name+']':(min?'':val.constructor.name+' ')+'['+(0,_collections.printListItems)(val,config,indentation,depth,refs,printer)+']';}if(toStringed==='[object Map]'){return hitMaxDepth?'[Map]':'Map {'+(0,_collections.printIteratorEntries)(val.entries(),config,indentation,depth,refs,printer,' => ')+'}';}if(toStringed==='[object Set]'){return hitMaxDepth?'[Set]':'Set {'+(0,_collections.printIteratorValues)(val.values(),config,indentation,depth,refs,printer)+'}';}return hitMaxDepth?'['+(val.constructor?val.constructor.name:'Object')+']':(min?'':(val.constructor?val.constructor.name:'Object')+' ')+'{'+(0,_collections.printObjectProperties)(val,config,indentation,depth,refs,printer)+'}';}function printPlugin(plugin,val,config,indentation,depth,refs){var printed=plugin.serialize?plugin.serialize(val,config,indentation,depth,refs,printer):plugin.print(val,function(valChild){return printer(valChild,config,indentation,depth,refs);},function(str){var indentationNext=indentation+config.indent;return indentationNext+str.replace(NEWLINE_REGEXP,'\n'+indentationNext);},{edgeSpacing:config.spacingOuter,min:config.min,spacing:config.spacingInner},config.colors);if(typeof printed!=='string'){throw new Error('pretty-format: Plugin must return type "string" but instead returned "'+(typeof printed==='undefined'?'undefined':_typeof(printed))+'".');}return printed;}function findPlugin(plugins,val){for(var p=0;p<plugins.length;p++){if(plugins[p].test(val)){return plugins[p];}}return null;}function printer(val,config,indentation,depth,refs){var plugin=findPlugin(config.plugins,val);if(plugin!==null){return printPlugin(plugin,val,config,indentation,depth,refs);}var basicResult=printBasicValue(val,config.printFunctionName,config.escapeRegex);if(basicResult!==null){return basicResult;}return printComplexValue(val,config,indentation,depth,refs);}var DEFAULT_THEME={comment:'gray',content:'reset',prop:'yellow',tag:'cyan',value:'green'};var DEFAULT_THEME_KEYS=Object.keys(DEFAULT_THEME);var DEFAULT_OPTIONS={callToJSON:true,escapeRegex:false,highlight:false,indent:2,maxDepth:Infinity,min:false,plugins:[],printFunctionName:true,theme:DEFAULT_THEME};function validateOptions(options){Object.keys(options).forEach(function(key){if(!DEFAULT_OPTIONS.hasOwnProperty(key)){throw new Error('pretty-format: Unknown option "'+key+'".');}});if(options.min&&options.indent!==undefined&&options.indent!==0){throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');}if(options.theme!==undefined){if(options.theme===null){throw new Error('pretty-format: Option "theme" must not be null.');}if(_typeof(options.theme)!=='object'){throw new Error('pretty-format: Option "theme" must be of type "object" but instead received "'+_typeof(options.theme)+'".');}}}var getColorsHighlight=function getColorsHighlight(options){return DEFAULT_THEME_KEYS.reduce(function(colors,key){var value=options.theme&&options.theme[key]!==undefined?options.theme[key]:DEFAULT_THEME[key];var color=_ansiStyles2.default[value];if(color&&typeof color.close==='string'&&typeof color.open==='string'){colors[key]=color;}else{throw new Error('pretty-format: Option "theme" has a key "'+key+'" whose value "'+value+'" is undefined in ansi-styles.');}return colors;},{});};var getColorsEmpty=function getColorsEmpty(){return DEFAULT_THEME_KEYS.reduce(function(colors,key){colors[key]={close:'',open:''};return colors;},{});};var getPrintFunctionName=function getPrintFunctionName(options){return options&&options.printFunctionName!==undefined?options.printFunctionName:DEFAULT_OPTIONS.printFunctionName;};var getEscapeRegex=function getEscapeRegex(options){return options&&options.escapeRegex!==undefined?options.escapeRegex:DEFAULT_OPTIONS.escapeRegex;};var getConfig=function getConfig(options){return{callToJSON:options&&options.callToJSON!==undefined?options.callToJSON:DEFAULT_OPTIONS.callToJSON,colors:options&&options.highlight?getColorsHighlight(options):getColorsEmpty(),escapeRegex:getEscapeRegex(options),indent:options&&options.min?'':createIndent(options&&options.indent!==undefined?options.indent:DEFAULT_OPTIONS.indent),maxDepth:options&&options.maxDepth!==undefined?options.maxDepth:DEFAULT_OPTIONS.maxDepth,Line truncated
// shortest & which one is the longest
if(a.length>b.length){a=b;b=swap;}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen;}if(bLen===0){return aLen;}// Performing suffix trimming:
// We can linearly drop suffix common to both strings since they
@@ -1118,31 +1151,50 @@ if(a.length>b.length){a=b;b=swap;}var aLen=a.length;var bLen=b.length;if(aLen===
while(aLen>0&&a.charCodeAt(~-aLen)===b.charCodeAt(~-bLen)){aLen--;bLen--;}if(aLen===0){return bLen;}// Performing prefix trimming
// We can linearly drop prefix common to both strings since they
// don't increase distance at all
var start=0;while(start<aLen&&a.charCodeAt(start)===b.charCodeAt(start)){start++;}aLen-=start;bLen-=start;if(aLen===0){return bLen;}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(i<aLen){charCodeCache[start+i]=a.charCodeAt(start+i);arr[i]=++i;}while(j<bLen){bCharCode=b.charCodeAt(start+j);tmp=j++;ret=j;for(i=0;i<aLen;i++){tmp2=bCharCode===charCodeCache[start+i]?tmp:tmp+1;tmp=arr[i];ret=arr[i]=tmp>ret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2;}}return ret;};var chalk$2=index$24;var BULLET=chalk$2.bold('\u25CF');var DEPRECATION=BULLET+' Deprecation Warning';var ERROR$1=BULLET+' Validation Error';var WARNING=BULLET+' Validation Warning';var format$2=function format$2(value){return typeof value==='function'?value.toString():index$38(value,{min:true});};var ValidationError$1=function(_Error){_inherits(ValidationError$1,_Error);function ValidationError$1(name,message,comment){_classCallCheck(this,ValidationError$1);var _this4=_possibleConstructorReturn(this,(ValidationError$1.__proto__||Object.getPrototypeOf(ValidationError$1)).call(this));comment=comment?'\n\n'+comment:'\n';_this4.name='';_this4.stack='';_this4.message=chalk$2.red(chalk$2.bold(name)+':\n\n'+message+comment);Error.captureStackTrace(_this4,function(){});return _this4;}return ValidationError$1;}(Error);var logValidationWarning=function logValidationWarning(name,message,comment){comment=comment?'\n\n'+comment:'\n';console.warn(chalk$2.yellow(chalk$2.bold(name)+':\n\n'+message+comment));};var createDidYouMeanMessage=function createDidYouMeanMessage(unrecognized,allowedOptions){var leven=index$46;var suggestion=allowedOptions.find(function(option){var steps=leven(option,unrecognized);return steps<3;});return suggestion?'Did you mean '+chalk$2.bold(format$2(suggestion))+'?':'';};var utils$2={DEPRECATION:DEPRECATION,ERROR:ERROR$1,ValidationError:ValidationError$1,WARNING:WARNING,createDidYouMeanMessage:createDidYouMeanMessage,format:format$2,logValidationWarning:logValidationWarning};var chalk=index$24;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var _require=index$30;var getType=_require.getType;var _require2=utils$2;var format$1=_require2.format;var ValidationError=_require2.ValidationError;var ERROR=_require2.ERROR;var errorMessage=function errorMessage(option,received,defaultValue,options){var message=' Option '+chalk.bold('"'+option+'"')+' must be of type:\n '+chalk.bold.green(getType(defaultValue))+'\n but instead received:\n '+chalk.bold.red(getType(received))+'\n\n Example:\n {\n '+chalk.bold('"'+option+'"')+': '+chalk.bold(format$1(defaultValue))+'\n }';var comment=options.comment;var name=options.title&&options.title.error||ERROR;throw new ValidationError(name,message,comment);};var errors={ValidationError:ValidationError,errorMessage:errorMessage};var _require$2=utils$2;var logValidationWarning$1=_require$2.logValidationWarning;var DEPRECATION$2=_require$2.DEPRECATION;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var deprecationMessage=function deprecationMessage(message,options){var comment=options.comment;var name=options.title&&options.title.deprecation||DEPRECATION$2;logValidationWarning$1(name,message,comment);};var deprecationWarning$1=function deprecationWarning$1(config,option,deprecatedOptions,options){if(option in deprecatedOptions){deprecationMessage(deprecatedOptions[option](config),options);return true;}return false;};var deprecated={deprecationWarning:deprecationWarning$1};var chalk$3=index$24;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var _require$3=utils$2;var format$3=_require$3.format;var logValidationWarning$2=_require$3.logValidationWarning;var createDidYouMeanMessage$1=_require$3.createDidYouMeanMessage;var WARNING$2=_require$3.WARNING;var unknownOptionWarning$1=function unknownOptionWarning$1(config,exampleConfig,option,options){var didYouMean=createDidYouMeanMessage$1(option,Object.keys(exampleConfig));var message=' Unknown option '+chalk$3.bold('"'+option+'"')+' with value '+chalk$3.bold(format$3(config[option]))+' was found.'+(didYouMean&&' '+didYouMean)+'\n This is probably a typing mistake. Fixing it will remove this message.';var comment=options.comment;var name=options.title&&options.title.warning||WARNING$2;logValidationWarning$2(name,message,comment);};var warnings={unknownOptionWarning:unknownOptionWarning$1};var config$1={comment:' A comment',condition:function condition(option,validOption){return true;},deprecate:function deprecate(config,option,deprecatedOptions,options){return false;},deprecatedConfig:{key:function key(config){}},error:function error(option,received,defaultValue,options){},exampleConfig:{key:'value',test:'case'},title:{deprecation:'Deprecation Warning',error:'Validation Error',warning:'Validation Warning'},unknown:function unknown(config,option,options){}};/**
var start=0;while(start<aLen&&a.charCodeAt(start)===b.charCodeAt(start)){start++;}aLen-=start;bLen-=start;if(aLen===0){return bLen;}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(i<aLen){charCodeCache[start+i]=a.charCodeAt(start+i);arr[i]=++i;}while(j<bLen){bCharCode=b.charCodeAt(start+j);tmp=j++;ret=j;for(i=0;i<aLen;i++){tmp2=bCharCode===charCodeCache[start+i]?tmp:tmp+1;tmp=arr[i];ret=arr[i]=tmp>ret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2;}}return ret;};var utils$2=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.createDidYouMeanMessage=exports.logValidationWarning=exports.ValidationError=exports.format=exports.WARNING=exports.ERROR=exports.DEPRECATION=undefined;var _chalk;function _load_chalk(){return _chalk=_interopRequireDefault(index$24);}var _prettyFormat;function _load_prettyFormat(){return _prettyFormat=_interopRequireDefault(index$36);}var _leven;function _load_leven(){return _leven=_interopRequireDefault(index$42);}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var BULLET=(_chalk||_load_chalk()).default.bold('\u25CF');/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var DEPRECATION=exports.DEPRECATION=BULLET+' Deprecation Warning';var ERROR=exports.ERROR=BULLET+' Validation Error';var WARNING=exports.WARNING=BULLET+' Validation Warning';var format=exports.format=function(value){return typeof value==='function'?value.toString():(0,(_prettyFormat||_load_prettyFormat()).default)(value,{min:true});};var ValidationError=function(_Error){_inherits(ValidationError,_Error);function ValidationError(name,message,comment){_classCallCheck(this,ValidationError);var _this2=_possibleConstructorReturn(this,(ValidationError.__proto__||Object.getPrototypeOf(ValidationError)).call(this));comment=comment?'\n\n'+comment:'\n';_this2.name='';_this2.message=(_chalk||_load_chalk()).default.red((_chalk||_load_chalk()).default.bold(name)+':\n\n'+message+comment);Error.captureStackTrace(_this2,function(){});return _this2;}return ValidationError;}(Error);exports.ValidationError=ValidationError;var logValidationWarning=exports.logValidationWarning=function(name,message,comment){comment=comment?'\n\n'+comment:'\n';console.warn((_chalk||_load_chalk()).default.yellow((_chalk||_load_chalk()).default.bold(name)+':\n\n'+message+comment));};var createDidYouMeanMessage=exports.createDidYouMeanMessage=function(unrecognized,allowedOptions){var suggestion=allowedOptions.find(function(option){var steps=(0,(_leven||_load_leven()).default)(option,unrecognized);return steps<3;});return suggestion?'Did you mean '+(_chalk||_load_chalk()).default.bold(format(suggestion))+'?':'';};});var deprecated=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.deprecationWarning=undefined;var _utils;function _load_utils(){return _utils=utils$2;}/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var deprecationMessage=function deprecationMessage(message,options){var comment=options.comment;var name=options.title&&options.title.deprecation||(_utils||_load_utils()).DEPRECATION;(0,(_utils||_load_utils()).logValidationWarning)(name,message,comment);};var deprecationWarning=exports.deprecationWarning=function(config,option,deprecatedOptions,options){if(option in deprecatedOptions){deprecationMessage(deprecatedOptions[option](config),options);return true;}return false;};});var warnings=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.unknownOptionWarning=undefined;var _chalk;function _load_chalk(){return _chalk=_interopRequireDefault(index$24);}var _utils;function _load_utils(){return _utils=utils$2;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var unknownOptionWarning=exports.unknownOptionWarning=function(config,exampleConfig,option,options){var didYouMean=(0,(_utils||_load_utils()).createDidYouMeanMessage)(option,Object.keys(exampleConfig));var message=' Unknown option '+(_chalk||_load_chalk()).default.bold('"'+option+'"')+' with value '+(_chalk||_load_chalk()).default.bold((0,(_utils||_load_utils()).format)(config[option]))+' was found.'+(didYouMean&&' '+didYouMean)+'\n This is probably a typing mistake. Fixing it will remove this message.';var comment=options.comment;var name=options.title&&options.title.warning||(_utils||_load_utils()).WARNING;(0,(_utils||_load_utils()).logValidationWarning)(name,message,comment);};/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/});/**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/// get the type of a value with handling the edge cases like `typeof []`
// and `typeof null`
var getType=function getType(value){if(typeof value==='undefined'){return'undefined';}else if(value===null){return'null';}else if(Array.isArray(value)){return'array';}else if(typeof value==='boolean'){return'boolean';}else if(typeof value==='function'){return'function';}else if(typeof value==='number'){return'number';}else if(typeof value==='string'){return'string';}else if((typeof value==='undefined'?'undefined':_typeof(value))==='object'){if(value.constructor===RegExp){return'regexp';}else if(value.constructor===Map){return'map';}else if(value.constructor===Set){return'set';}return'object';// $FlowFixMe https://github.com/facebook/flow/issues/1015
}else if((typeof value==='undefined'?'undefined':_typeof(value))==='symbol'){return'symbol';}throw new Error('value of unknown type: '+value);};var index$44=getType;var errors=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.errorMessage=undefined;var _chalk;function _load_chalk(){return _chalk=_interopRequireDefault(index$24);}var _jestGetType;function _load_jestGetType(){return _jestGetType=_interopRequireDefault(index$44);}var _utils;function _load_utils(){return _utils=utils$2;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var errorMessage=exports.errorMessage=function(option,received,defaultValue,options){var message=' Option '+(_chalk||_load_chalk()).default.bold('"'+option+'"')+' must be of type:\n '+(_chalk||_load_chalk()).default.bold.green((0,(_jestGetType||_load_jestGetType()).default)(defaultValue))+'\n but instead received:\n '+(_chalk||_load_chalk()).default.bold.red((0,(_jestGetType||_load_jestGetType()).default)(received))+'\n\n Example:\n {\n '+(_chalk||_load_chalk()).default.bold('"'+option+'"')+': '+(_chalk||_load_chalk()).default.bold((0,(_utils||_load_utils()).format)(defaultValue))+'\n }';var comment=options.comment;var name=options.title&&options.title.error||(_utils||_load_utils()).ERROR;throw new(_utils||_load_utils()).ValidationError(name,message,comment);};});var example_config=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var config={comment:' A comment',condition:function condition(option,validOption){return true;},deprecate:function deprecate(config,option,deprecatedOptions,options){return false;},deprecatedConfig:{key:function key(config){}},error:function error(option,received,defaultValue,options){},exampleConfig:{key:'value',test:'case'},title:{deprecation:'Deprecation Warning',error:'Validation Error',warning:'Validation Warning'},unknown:function unknown(config,option,options){}};/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
@@ -1150,51 +1202,57 @@ var start=0;while(start<aLen&&a.charCodeAt(start)===b.charCodeAt(start)){start++
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var exampleConfig$2=config$1;var toString$1=Object.prototype.toString;var validationCondition$1=function validationCondition$1(option,validOption){return option===null||option===undefined||toString$1.call(option)===toString$1.call(validOption);};var condition=validationCondition$1;var _require$1=deprecated;var deprecationWarning=_require$1.deprecationWarning;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var _require2$1=warnings;var unknownOptionWarning=_require2$1.unknownOptionWarning;var _require3=errors;var errorMessage$1=_require3.errorMessage;var exampleConfig$1=exampleConfig$2;var validationCondition=condition;var _require4=utils$2;var ERROR$2=_require4.ERROR;var DEPRECATION$1=_require4.DEPRECATION;var WARNING$1=_require4.WARNING;var defaultConfig$1={comment:'',condition:validationCondition,deprecate:deprecationWarning,deprecatedConfig:{},error:errorMessage$1,exampleConfig:exampleConfig$1,title:{deprecation:DEPRECATION$1,error:ERROR$2,warning:WARNING$1},unknown:unknownOptionWarning};var defaultConfig=defaultConfig$1;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var _validate=function _validate(config,options){var hasDeprecationWarnings=false;for(var key in config){if(options.deprecatedConfig&&key in options.deprecatedConfig&&typeof options.deprecate==='function'){var isDeprecatedKey=options.deprecate(config,key,options.deprecatedConfig,options);hasDeprecationWarnings=hasDeprecationWarnings||isDeprecatedKey;}else if(hasOwnProperty.call(options.exampleConfig,key)){if(typeof options.condition==='function'&&typeof options.error==='function'&&!options.condition(config[key],options.exampleConfig[key])){options.error(key,config[key],options.exampleConfig[key],options);}}else{options.unknown&&options.unknown(config,options.exampleConfig,key,options);}}return{hasDeprecationWarnings:hasDeprecationWarnings};};var validate$1=function validate$1(config,options){_validate(options,defaultConfig);// validate against jest-validate config
var defaultedOptions=Object.assign({},defaultConfig,options,{title:Object.assign({},defaultConfig.title,options.title)});var _validate2=_validate(config,defaultedOptions);var hasDeprecationWarnings=_validate2.hasDeprecationWarnings;return{hasDeprecationWarnings:hasDeprecationWarnings,isValid:true};};var validate_1=validate$1;var index$22={ValidationError:errors.ValidationError,createDidYouMeanMessage:utils$2.createDidYouMeanMessage,format:utils$2.format,logValidationWarning:utils$2.logValidationWarning,validate:validate_1};var deprecated$2={useFlowParser:function useFlowParser(config){return' The '+'"useFlowParser"'+' option is deprecated. Use '+'"parser"'+' instead.\n\n Prettier now treats your configuration as:\n {\n '+'"parser"'+': '+(config.useFlowParser?'"flow"':'"babylon"')+'\n }';}};var deprecated_1=deprecated$2;var validate=index$22.validate;var deprecatedConfig=deprecated_1;var defaults={cursorOffset:-1,rangeStart:0,rangeEnd:Infinity,useTabs:false,tabWidth:2,printWidth:80,singleQuote:false,trailingComma:"none",bracketSpacing:true,jsxBracketSameLine:false,parser:"babylon",semi:true};var exampleConfig=Object.assign({},defaults,{filepath:"path/to/Filename",printWidth:80,originalText:"text"});// Copy options and fill in default values.
function normalize(options){var normalized=Object.assign({},options||{});var filepath=normalized.filepath;if(/\.(css|less|scss)$/.test(filepath)){normalized.parser="postcss";}else if(/\.html$/.test(filepath)){normalized.parser="parse5";}else if(/\.(ts|tsx)$/.test(filepath)){normalized.parser="typescript";}else if(/\.(graphql|gql)$/.test(filepath)){normalized.parser="graphql";}else if(/\.json$/.test(filepath)){normalized.parser="json";}if(normalized.parser==="json"){normalized.trailingComma="none";}if(typeof normalized.trailingComma==="boolean"){// Support a deprecated boolean type for the trailing comma config
*/exports.default=config;});var condition=createCommonjsModule(function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=validationCondition;/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var toString=Object.prototype.toString;function validationCondition(option,validOption){return option===null||option===undefined||toString.call(option)===toString.call(validOption);}});var default_config=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _deprecated;function _load_deprecated(){return _deprecated=deprecated;}var _warnings;function _load_warnings(){return _warnings=warnings;}var _errors;function _load_errors(){return _errors=errors;}var _example_config;function _load_example_config(){return _example_config=_interopRequireDefault(example_config);}var _condition;function _load_condition(){return _condition=_interopRequireDefault(condition);}var _utils;function _load_utils(){return _utils=utils$2;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}exports.default={comment:'',condition:(_condition||_load_condition()).default,deprecate:(_deprecated||_load_deprecated()).deprecationWarning,deprecatedConfig:{},error:(_errors||_load_errors()).errorMessage,exampleConfig:(_example_config||_load_example_config()).default,title:{deprecation:(_utils||_load_utils()).DEPRECATION,error:(_utils||_load_utils()).ERROR,warning:(_utils||_load_utils()).WARNING},unknown:(_warnings||_load_warnings()).unknownOptionWarning};/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/});var validate_1=createCommonjsModule(function(module,exports){'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _default_config;function _load_default_config(){return _default_config=_interopRequireDefault(default_config);}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var _validate=function _validate(config,options){var hasDeprecationWarnings=false;for(var key in config){if(options.deprecatedConfig&&key in options.deprecatedConfig&&typeof options.deprecate==='function'){var isDeprecatedKey=options.deprecate(config,key,options.deprecatedConfig,options);hasDeprecationWarnings=hasDeprecationWarnings||isDeprecatedKey;}else if(hasOwnProperty.call(options.exampleConfig,key)){if(typeof options.condition==='function'&&typeof options.error==='function'&&!options.condition(config[key],options.exampleConfig[key])){options.error(key,config[key],options.exampleConfig[key],options);}}else{options.unknown&&options.unknown(config,options.exampleConfig,key,options);}}return{hasDeprecationWarnings:hasDeprecationWarnings};};var validate=function validate(config,options){_validate(options,(_default_config||_load_default_config()).default);// validate against jest-validate config
var defaultedOptions=Object.assign({},(_default_config||_load_default_config()).default,options,{title:Object.assign({},(_default_config||_load_default_config()).default.title,options.title)});var _validate2=_validate(config,defaultedOptions);var hasDeprecationWarnings=_validate2.hasDeprecationWarnings;return{hasDeprecationWarnings:hasDeprecationWarnings,isValid:true};};exports.default=validate;});var index$22=createCommonjsModule(function(module){'use strict';var _utils;function _load_utils(){return _utils=utils$2;}var _validate;function _load_validate(){return _validate=_interopRequireDefault(validate_1);}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/module.exports={ValidationError:(_utils||_load_utils()).ValidationError,createDidYouMeanMessage:(_utils||_load_utils()).createDidYouMeanMessage,format:(_utils||_load_utils()).format,logValidationWarning:(_utils||_load_utils()).logValidationWarning,validate:(_validate||_load_validate()).default};});var deprecated$2={useFlowParser:function useFlowParser(config){return' The '+'"useFlowParser"'+' option is deprecated. Use '+'"parser"'+' instead.\n\n Prettier now treats your configuration as:\n {\n '+'"parser"'+': '+(config.useFlowParser?'"flow"':'"babylon"')+'\n }';}};var deprecated_1$1=deprecated$2;var validate=index$22.validate;var deprecatedConfig=deprecated_1$1;var defaults={cursorOffset:-1,rangeStart:0,rangeEnd:Infinity,useTabs:false,tabWidth:2,printWidth:80,singleQuote:false,trailingComma:"none",bracketSpacing:true,jsxBracketSameLine:false,parser:"babylon",requirePragma:false,semi:true};var exampleConfig=Object.assign({},defaults,{filepath:"path/to/Filename",printWidth:80,originalText:"text"});// Copy options and fill in default values.
function normalize(options){var normalized=Object.assign({},options||{});var filepath=normalized.filepath;if(/\.(css|less|scss)$/.test(filepath)){normalized.parser="postcss";}else if(/\.html$/.test(filepath)){normalized.parser="parse5";}else if(/\.(ts|tsx)$/.test(filepath)){normalized.parser="typescript";}else if(/\.(graphql|gql)$/.test(filepath)){normalized.parser="graphql";}else if(/\.json$/.test(filepath)){normalized.parser="json";}if(normalized.parser==="json"){normalized.trailingComma="none";}/* istanbul ignore if */if(typeof normalized.trailingComma==="boolean"){// Support a deprecated boolean type for the trailing comma config
// for a few versions. This code can be removed later.
normalized.trailingComma="es5";console.warn("Warning: `trailingComma` without any argument is deprecated. "+'Specify "none", "es5", or "all".');}var parserBackup=normalized.parser;if(typeof normalized.parser==="function"){// Delete the function from the object to pass validation.
delete normalized.parser;}validate(normalized,{exampleConfig:exampleConfig,deprecatedConfig:deprecatedConfig});// Restore the option back to a function;
normalized.parser=parserBackup;// For backward compatibility. Deprecated in 0.0.10
if("useFlowParser"in normalized){normalized.parser=normalized.useFlowParser?"flow":"babylon";delete normalized.useFlowParser;}Object.keys(defaults).forEach(function(k){if(normalized[k]==null){normalized[k]=defaults[k];}});return normalized;}var options={normalize:normalize};function flattenDoc(doc){if(doc.type==="concat"){var res=[];for(var _i33=0;_i33<doc.parts.length;++_i33){var doc2=doc.parts[_i33];if(typeof doc2!=="string"&&doc2.type==="concat"){[].push.apply(res,flattenDoc(doc2).parts);}else{var flattened=flattenDoc(doc2);if(flattened!==""){res.push(flattened);}}}return Object.assign({},doc,{parts:res});}else if(doc.type==="if-break"){return Object.assign({},doc,{breakContents:doc.breakContents!=null?flattenDoc(doc.breakContents):null,flatContents:doc.flatContents!=null?flattenDoc(doc.flatContents):null});}else if(doc.type==="group"){return Object.assign({},doc,{contents:flattenDoc(doc.contents),expandedStates:doc.expandedStates?doc.expandedStates.map(flattenDoc):doc.expandedStates});}else if(doc.contents){return Object.assign({},doc,{contents:flattenDoc(doc.contents)});}return doc;}function printDoc(doc){if(typeof doc==="string"){return JSON.stringify(doc);}if(doc.type==="line"){if(doc.literalline){return"literalline";}if(doc.hard){return"hardline";}if(doc.soft){return"softline";}return"line";}if(doc.type==="break-parent"){return"breakParent";}if(doc.type==="concat"){return"["+doc.parts.map(printDoc).join(", ")+"]";}if(doc.type==="indent"){return"indent("+printDoc(doc.contents)+")";}if(doc.type==="align"){return"align("+doc.n+", "+printDoc(doc.contents)+")";}if(doc.type==="if-break"){return"ifBreak("+printDoc(doc.breakContents)+(doc.flatContents?", "+printDoc(doc.flatContents):"")+")";}if(doc.type==="group"){if(doc.expandedStates){return"conditionalGroup("+"["+doc.expandedStates.map(printDoc).join(",")+"])";}return(doc.break?"wrappedGroup":"group")+"("+printDoc(doc.contents)+")";}if(doc.type==="fill"){return"fill"+"("+doc.parts.map(printDoc).join(", ")+")";}if(doc.type==="line-suffix"){return"lineSuffix("+printDoc(doc.contents)+")";}if(doc.type==="line-suffix-boundary"){return"lineSuffixBoundary";}throw new Error("Unknown doc type "+doc.type);}var docDebug={printDocToDebug:function printDocToDebug(doc){return printDoc(flattenDoc(doc));}};var os$1=os;function homedir(){var env=process.env;var home=env.HOME;var user=env.LOGNAME||env.USER||env.LNAME||env.USERNAME;if(process.platform==='win32'){return env.USERPROFILE||env.HOMEDRIVE+env.HOMEPATH||home||null;}if(process.platform==='darwin'){return home||(user?'/Users/'+user:null);}if(process.platform==='linux'){return home||(process.getuid()===0?'/root':user?'/home/'+user:null);}return home||null;}var index$50=typeof os$1.homedir==='function'?os$1.homedir:homedir;var index$52=function index$52(args,opts){if(!opts)opts={};var flags={bools:{},strings:{},unknownFn:null};if(typeof opts['unknown']==='function'){flags.unknownFn=opts['unknown'];}if(typeof opts['boolean']==='boolean'&&opts['boolean']){flags.allBools=true;}else{[].concat(opts['boolean']).filter(Boolean).forEach(function(key){flags.bools[key]=true;});}var aliases={};Object.keys(opts.alias||{}).forEach(function(key){aliases[key]=[].concat(opts.alias[key]);aliases[key].forEach(function(x){aliases[x]=[key].concat(aliases[key].filter(function(y){return x!==y;}));});});[].concat(opts.string).filter(Boolean).forEach(function(key){flags.strings[key]=true;if(aliases[key]){flags.strings[aliases[key]]=true;}});var defaults=opts['default']||{};var argv={_:[]};Object.keys(flags.bools).forEach(function(key){setArg(key,defaults[key]===undefined?false:defaults[key]);});var notFlags=[];if(args.indexOf('--')!==-1){notFlags=args.slice(args.indexOf('--')+1);args=args.slice(0,args.indexOf('--'));}function argDefined(key,arg){return flags.allBools&&/^--[^=]+$/.test(arg)||flags.strings[key]||flags.bools[key]||aliases[key];}function setArg(key,val,arg){if(arg&&flags.unknownFn&&!argDefined(key,arg)){if(flags.unknownFn(arg)===false)return;}var value=!flags.strings[key]&&isNumber(val)?Number(val):val;setKey(argv,key.split('.'),value);(aliases[key]||[]).forEach(function(x){setKey(argv,x.split('.'),value);});}function setKey(obj,keys,value){var o=obj;keys.slice(0,-1).forEach(function(key){if(o[key]===undefined)o[key]={};o=o[key];});var key=keys[keys.length-1];if(o[key]===undefined||flags.bools[key]||typeof o[key]==='boolean'){o[key]=value;}else if(Array.isArray(o[key])){o[key].push(value);}else{o[key]=[o[key],value];}}function aliasIsBoolean(key){return aliases[key].some(function(x){return flags.bools[x];});}for(var i=0;i<args.length;i++){var arg=args[i];if(/^--.+=/.test(arg)){// Using [\s\S] instead of . because js doesn't support the
/* istanbul ignore if */if("useFlowParser"in normalized){normalized.parser=normalized.useFlowParser?"flow":"babylon";delete normalized.useFlowParser;}Object.keys(defaults).forEach(function(k){if(normalized[k]==null){normalized[k]=defaults[k];}});return normalized;}var options={normalize:normalize,defaults:defaults};function flattenDoc(doc){if(doc.type==="concat"){var res=[];for(var _i33=0;_i33<doc.parts.length;++_i33){var doc2=doc.parts[_i33];if(typeof doc2!=="string"&&doc2.type==="concat"){[].push.apply(res,flattenDoc(doc2).parts);}else{var flattened=flattenDoc(doc2);if(flattened!==""){res.push(flattened);}}}return Object.assign({},doc,{parts:res});}else if(doc.type==="if-break"){return Object.assign({},doc,{breakContents:doc.breakContents!=null?flattenDoc(doc.breakContents):null,flatContents:doc.flatContents!=null?flattenDoc(doc.flatContents):null});}else if(doc.type==="group"){return Object.assign({},doc,{contents:flattenDoc(doc.contents),expandedStates:doc.expandedStates?doc.expandedStates.map(flattenDoc):doc.expandedStates});}else if(doc.contents){return Object.assign({},doc,{contents:flattenDoc(doc.contents)});}return doc;}function printDoc(doc){if(typeof doc==="string"){return JSON.stringify(doc);}if(doc.type==="line"){if(doc.literalline){return"literalline";}if(doc.hard){return"hardline";}if(doc.soft){return"softline";}return"line";}if(doc.type==="break-parent"){return"breakParent";}if(doc.type==="concat"){return"["+doc.parts.map(printDoc).join(", ")+"]";}if(doc.type==="indent"){return"indent("+printDoc(doc.contents)+")";}if(doc.type==="align"){return"align("+doc.n+", "+printDoc(doc.contents)+")";}if(doc.type==="if-break"){return"ifBreak("+printDoc(doc.breakContents)+(doc.flatContents?", "+printDoc(doc.flatContents):"")+")";}if(doc.type==="group"){if(doc.expandedStates){return"conditionalGroup("+"["+doc.expandedStates.map(printDoc).join(",")+"])";}return(doc.break?"wrappedGroup":"group")+"("+printDoc(doc.contents)+")";}if(doc.type==="fill"){return"fill"+"("+doc.parts.map(printDoc).join(", ")+")";}if(doc.type==="line-suffix"){return"lineSuffix("+printDoc(doc.contents)+")";}if(doc.type==="line-suffix-boundary"){return"lineSuffixBoundary";}throw new Error("Unknown doc type "+doc.type);}var docDebug={printDocToDebug:function printDocToDebug(doc){return printDoc(flattenDoc(doc));}};var index$48=function index$48(pkg){var requiredVersion=pkg.engines.node.replace(">=","");var currentVersion=process.version.replace("v","");if(currentVersion<requiredVersion){console.error("%s requires at least version %s of Node, please upgrade",pkg.name,requiredVersion);process.exit(1);}};var name$1="cosmiconfig";var version$2="2.2.2";var description$1="Find and load configuration from a package.json property, rc file, or CommonJS module";var main$1="index.js";var files=["index.js","lib"];var scripts$1={"precommit":"lint-staged && jest","lint":"eslint .","lint:fix":"eslint . --fix","test":"jest","test:watch":"jest --watch","coverage":"jest --coverage --coverageReporters=html --coverageReporters=text","check":"npm run test && npm run lint"};var repository$1={"type":"git","url":"git+https://github.com/davidtheclark/cosmiconfig.git"};var keywords=["load","configuration","config"];var author$1="David Clark <david.dave.clark@gmail.com>";var contributors=["Bogdan Chadkin <trysound@yandex.ru>","Suhas Karanth <sudo.suhas@gmail.com>"];var license$1="MIT";var bugs={"url":"https://github.com/davidtheclark/cosmiconfig/issues"};var homepage$1="https://github.com/davidtheclark/cosmiconfig#readme";var prettier={"trailingComma":"es5","singleQuote":true,"printWidth":80,"tabWidth":2};var jest={"testEnvironment":"node"};var dependencies$1={"is-directory":"^0.3.1","is-promise":"^2.1.0","js-yaml":"^3.9.0","minimist":"^1.2.0","os-homedir":"^1.0.1","parse-json":"^2.2.0","please-upgrade-node":"^3.0.1","require-from-string":"^1.1.0"};var devDependencies$1={"eslint":"^4.5.0","eslint-config-davidtheclark-node":"^0.2.0","eslint-config-prettier":"^2.3.0","eslint-plugin-node":"^3.0.5","husky":"^0.14.3","jest":"^20.0.4","lint-staged":"^4.0.4","prettier":"^1.6.1"};var engines={"node":">=4"};var _package$2={name:name$1,version:version$2,description:description$1,main:main$1,files:files,scripts:scripts$1,repository:repository$1,keywords:keywords,author:author$1,contributors:contributors,license:license$1,bugs:bugs,homepage:homepage$1,prettier:prettier,jest:jest,dependencies:dependencies$1,devDependencies:devDependencies$1,engines:engines,"lint-staged":{"*.js":["eslint --fix","prettier --write","git add"]}};var _package$3=Object.freeze({name:name$1,version:version$2,description:description$1,main:main$1,files:files,scripts:scripts$1,repository:repository$1,keywords:keywords,author:author$1,contributors:contributors,license:license$1,bugs:bugs,homepage:homepage$1,prettier:prettier,jest:jest,dependencies:dependencies$1,devDependencies:devDependencies$1,engines:engines,default:_package$2});var os$2=os;function homedir(){var env=process.env;var home=env.HOME;vaLine truncated
// 'dotall' regex modifier. See:
// http://stackoverflow.com/a/1068308/13216
var m=arg.match(/^--([^=]+)=([\s\S]*)$/);var key=m[1];var value=m[2];if(flags.bools[key]){value=value!=='false';}setArg(key,value,arg);}else if(/^--no-.+/.test(arg)){var key=arg.match(/^--no-(.+)/)[1];setArg(key,false,arg);}else if(/^--.+/.test(arg)){var key=arg.match(/^--(.+)/)[1];var next=args[i+1];if(next!==undefined&&!/^-/.test(next)&&!flags.bools[key]&&!flags.allBools&&(aliases[key]?!aliasIsBoolean(key):true)){setArg(key,next,arg);i++;}else if(/^(true|false)$/.test(next)){setArg(key,next==='true',arg);i++;}else{setArg(key,flags.strings[key]?'':true,arg);}}else if(/^-[^-]+/.test(arg)){var letters=arg.slice(1,-1).split('');var broken=false;for(var j=0;j<letters.length;j++){var next=arg.slice(j+2);if(next==='-'){setArg(letters[j],next,arg);continue;}if(/[A-Za-z]/.test(letters[j])&&/=/.test(next)){setArg(letters[j],next.split('=')[1],arg);broken=true;break;}if(/[A-Za-z]/.test(letters[j])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(next)){setArg(letters[j],next,arg);broken=true;break;}if(letters[j+1]&&letters[j+1].match(/\W/)){setArg(letters[j],arg.slice(j+2),arg);broken=true;break;}else{setArg(letters[j],flags.strings[letters[j]]?'':true,arg);}}var key=arg.slice(-1)[0];if(!broken&&key!=='-'){if(args[i+1]&&!/^(-|--)[^-]/.test(args[i+1])&&!flags.bools[key]&&(aliases[key]?!aliasIsBoolean(key):true)){setArg(key,args[i+1],arg);i++;}else if(args[i+1]&&/true|false/.test(args[i+1])){setArg(key,args[i+1]==='true',arg);i++;}else{setArg(key,flags.strings[key]?'':true,arg);}}}else{if(!flags.unknownFn||flags.unknownFn(arg)!==false){argv._.push(flags.strings['_']||!isNumber(arg)?arg:Number(arg));}if(opts.stopEarly){argv._.push.apply(argv._,args.slice(i+1));break;}}}Object.keys(defaults).forEach(function(key){if(!hasKey(argv,key.split('.'))){setKey(argv,key.split('.'),defaults[key]);(aliases[key]||[]).forEach(function(x){setKey(argv,x.split('.'),defaults[key]);});}});if(opts['--']){argv['--']=new Array();notFlags.forEach(function(key){argv['--'].push(key);});}else{notFlags.forEach(function(key){argv._.push(key);});}return argv;};function hasKey(obj,keys){var o=obj;keys.slice(0,-1).forEach(function(key){o=o[key]||{};});var key=keys[keys.length-1];return key in o;}function isNumber(x){if(typeof x==='number')return true;if(/^0x[0-9a-f]+$/i.test(x))return true;return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);}/*
object-assign
(c) Sindre Sorhus
@license MIT
*//* eslint-disable no-unused-vars */var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty$1=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError('Object.assign cannot be called with null or undefined');}return Object(val);}function shouldUseNative(){try{if(!Object.assign){return false;}// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1=new String('abc');// eslint-disable-line no-new-wrappers
test1[5]='de';if(Object.getOwnPropertyNames(test1)[0]==='5'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2={};for(var i=0;i<10;i++){test2['_'+String.fromCharCode(i)]=i;}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n];});if(order2.join('')!=='0123456789'){return false;}// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3={};'abcdefghijklmnopqrst'.split('').forEach(function(letter){test3[letter]=letter;});if(Object.keys(Object.assign({},test3)).join('')!=='abcdefghijklmnopqrst'){return false;}return true;}catch(err){// We don't expect any of the above to throw, but better to be safe.
return false;}}var index$54=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s<arguments.length;s++){from=Object(arguments[s]);for(var key in from){if(hasOwnProperty$1.call(from,key)){to[key]=from[key];}}if(getOwnPropertySymbols){symbols=getOwnPropertySymbols(from);for(var i=0;i<symbols.length;i++){if(propIsEnumerable.call(from,symbols[i])){to[symbols[i]]=from[symbols[i]];}}}}return to;};var fs$1=fs;/**
var m=arg.match(/^--([^=]+)=([\s\S]*)$/);var key=m[1];var value=m[2];if(flags.bools[key]){value=value!=='false';}setArg(key,value,arg);}else if(/^--no-.+/.test(arg)){var key=arg.match(/^--no-(.+)/)[1];setArg(key,false,arg);}else if(/^--.+/.test(arg)){var key=arg.match(/^--(.+)/)[1];var next=args[i+1];if(next!==undefined&&!/^-/.test(next)&&!flags.bools[key]&&!flags.allBools&&(aliases[key]?!aliasIsBoolean(key):true)){setArg(key,next,arg);i++;}else if(/^(true|false)$/.test(next)){setArg(key,next==='true',arg);i++;}else{setArg(key,flags.strings[key]?'':true,arg);}}else if(/^-[^-]+/.test(arg)){var letters=arg.slice(1,-1).split('');var broken=false;for(var j=0;j<letters.length;j++){var next=arg.slice(j+2);if(next==='-'){setArg(letters[j],next,arg);continue;}if(/[A-Za-z]/.test(letters[j])&&/=/.test(next)){setArg(letters[j],next.split('=')[1],arg);broken=true;break;}if(/[A-Za-z]/.test(letters[j])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(next)){setArg(letters[j],next,arg);broken=true;break;}if(letters[j+1]&&letters[j+1].match(/\W/)){setArg(letters[j],arg.slice(j+2),arg);broken=true;break;}else{setArg(letters[j],flags.strings[letters[j]]?'':true,arg);}}var key=arg.slice(-1)[0];if(!broken&&key!=='-'){if(args[i+1]&&!/^(-|--)[^-]/.test(args[i+1])&&!flags.bools[key]&&(aliases[key]?!aliasIsBoolean(key):true)){setArg(key,args[i+1],arg);i++;}else if(args[i+1]&&/true|false/.test(args[i+1])){setArg(key,args[i+1]==='true',arg);i++;}else{setArg(key,flags.strings[key]?'':true,arg);}}}else{if(!flags.unknownFn||flags.unknownFn(arg)!==false){argv._.push(flags.strings['_']||!isNumber(arg)?arg:Number(arg));}if(opts.stopEarly){argv._.push.apply(argv._,args.slice(i+1));break;}}}Object.keys(defaults).forEach(function(key){if(!hasKey(argv,key.split('.'))){setKey(argv,key.split('.'),defaults[key]);(aliases[key]||[]).forEach(function(x){setKey(argv,x.split('.'),defaults[key]);});}});if(opts['--']){argv['--']=new Array();notFlags.forEach(function(key){argv['--'].push(key);});}else{notFlags.forEach(function(key){argv._.push(key);});}return argv;};function hasKey(obj,keys){var o=obj;keys.slice(0,-1).forEach(function(key){o=o[key]||{};});var key=keys[keys.length-1];return key in o;}function isNumber(x){if(typeof x==='number')return true;if(/^0x[0-9a-f]+$/i.test(x))return true;return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);}var fs$1=fs;/**
* async
*/function isDirectory$1(filepath,cb){if(typeof cb!=='function'){throw new Error('expected a callback function');}if(typeof filepath!=='string'){cb(new Error('expected filepath to be a string'));return;}fs$1.stat(filepath,function(err,stats){if(err){if(err.code==='ENOENT'){cb(null,false);return;}cb(err);return;}cb(null,stats.isDirectory());});}/**
*/function isDirectory(filepath,cb){if(typeof cb!=='function'){throw new Error('expected a callback function');}if(typeof filepath!=='string'){cb(new Error('expected filepath to be a string'));return;}fs$1.stat(filepath,function(err,stats){if(err){if(err.code==='ENOENT'){cb(null,false);return;}cb(err);return;}cb(null,stats.isDirectory());});}/**
* sync
*/isDirectory$1.sync=function isDirectorySync(filepath){if(typeof filepath!=='string'){throw new Error('expected filepath to be a string');}try{var stat=fs$1.statSync(filepath);return stat.isDirectory();}catch(err){if(err.code==='ENOENT'){return false;}else{throw err;}}return false;};/**
*/isDirectory.sync=function isDirectorySync(filepath){if(typeof filepath!=='string'){throw new Error('expected filepath to be a string');}try{var stat=fs$1.statSync(filepath);return stat.isDirectory();}catch(err){if(err.code==='ENOENT'){return false;}else{throw err;}}return false;};/**
* Expose `isDirectory`
*/var index$56=isDirectory$1;var fs$2=fs;var readFile$1=function readFile$1(filepath,options){options=options||{};options.throwNotFound=options.throwNotFound||false;return new Promise(function(resolve,reject){fs$2.readFile(filepath,'utf8',function(err,content){if(err&&err.code==='ENOENT'&&!options.throwNotFound){return resolve(null);}if(err)return reject(err);resolve(content);});});};var index$62=function isArrayish(obj){if(!obj){return false;}return obj instanceof Array||Array.isArray(obj)||obj.length>=0&&obj.splice instanceof Function;};var util$10=util;var isArrayish=index$62;var errorEx$1=function errorEx(name,properties){if(!name||name.constructor!==String){properties=name||{};name=Error.name;}var errorExError=function ErrorEXError(message){if(!this){return new ErrorEXError(message);}message=message instanceof Error?message.message:message||this.message;Error.call(this,message);Error.captureStackTrace(this,errorExError);this.name=name;Object.defineProperty(this,'message',{configurable:true,enumerable:false,get:function get(){var newMessage=message.split(/\r?\n/g);for(var key in properties){if(!properties.hasOwnProperty(key)){continue;}var modifier=properties[key];if('message'in modifier){newMessage=modifier.message(this[key],newMessage)||newMessage;if(!isArrayish(newMessage)){newMessage=[newMessage];}}}return newMessage.join('\n');},set:function set(v){message=v;}});var stackDescriptor=Object.getOwnPropertyDescriptor(this,'stack');var stackGetter=stackDescriptor.get;var stackValue=stackDescriptor.value;delete stackDescriptor.value;delete stackDescriptor.writable;stackDescriptor.get=function(){var stack=stackGetter?stackGetter.call(this).split(/\r?\n+/g):stackValue.split(/\r?\n+/g);// starting in Node 7, the stack builder caches the message.
*/var index$54=isDirectory;var fs$2=fs;function readFile$1(filepath,options){options=options||{};options.throwNotFound=options.throwNotFound||false;return new Promise(function(resolve,reject){fs$2.readFile(filepath,'utf8',function(err,content){if(err&&err.code==='ENOENT'&&!options.throwNotFound){return resolve(null);}if(err)return reject(err);resolve(content);});});}readFile$1.sync=function readFileSync(filepath,options){options=options||{};options.throwNotFound=options.throwNotFound||false;try{return fs$2.readFileSync(filepath,'utf8');}catch(err){if(err.code==='ENOENT'&&!options.throwNotFound){return null;}throw err;}};var readFile_1=readFile$1;var index$60=function isArrayish(obj){if(!obj){return false;}return obj instanceof Array||Array.isArray(obj)||obj.length>=0&&obj.splice instanceof Function;};var util$10=util;var isArrayish=index$60;var errorEx$1=function errorEx(name,properties){if(!name||name.constructor!==String){properties=name||{};name=Error.name;}var errorExError=function ErrorEXError(message){if(!this){return new ErrorEXError(message);}message=message instanceof Error?message.message:message||this.message;Error.call(this,message);Error.captureStackTrace(this,errorExError);this.name=name;Object.defineProperty(this,'message',{configurable:true,enumerable:false,get:function get(){var newMessage=message.split(/\r?\n/g);for(var key in properties){if(!properties.hasOwnProperty(key)){continue;}var modifier=properties[key];if('message'in modifier){newMessage=modifier.message(this[key],newMessage)||newMessage;if(!isArrayish(newMessage)){newMessage=[newMessage];}}}return newMessage.join('\n');},set:function set(v){message=v;}});var stackDescriptor=Object.getOwnPropertyDescriptor(this,'stack');var stackGetter=stackDescriptor.get;var stackValue=stackDescriptor.value;delete stackDescriptor.value;delete stackDescriptor.writable;stackDescriptor.get=function(){var stack=stackGetter?stackGetter.call(this).split(/\r?\n+/g):stackValue.split(/\r?\n+/g);// starting in Node 7, the stack builder caches the message.
// just replace it.
stack[0]=this.name+': '+this.message;var lineCount=1;for(var key in properties){if(!properties.hasOwnProperty(key)){continue;}var modifier=properties[key];if('line'in modifier){var line=modifier.line(this[key]);if(line){stack.splice(lineCount++,0,' '+line);}}if('stack'in modifier){modifier.stack(this[key],stack);}}return stack.join('\n');};Object.defineProperty(this,'stack',stackDescriptor);};if(Object.setPrototypeOf){Object.setPrototypeOf(errorExError.prototype,Error.prototype);Object.setPrototypeOf(errorExError,Error);}else{util$10.inherits(errorExError,Error);}return errorExError;};errorEx$1.append=function(str,def){return{message:function message(v,_message){v=v||def;if(v){_message[0]+=' '+str.replace('%s',v.toString());}return _message;}};};errorEx$1.line=function(str,def){return{line:function line(v){v=v||def;if(v){return str.replace('%s',v.toString());}return null;}};};var index$60=errorEx$1;var unicode=createCommonjsModule(function(module){// This is autogenerated with esprima tools, see:
stack[0]=this.name+': '+this.message;var lineCount=1;for(var key in properties){if(!properties.hasOwnProperty(key)){continue;}var modifier=properties[key];if('line'in modifier){var line=modifier.line(this[key]);if(line){stack.splice(lineCount++,0,' '+line);}}if('stack'in modifier){modifier.stack(this[key],stack);}}return stack.join('\n');};Object.defineProperty(this,'stack',stackDescriptor);};if(Object.setPrototypeOf){Object.setPrototypeOf(errorExError.prototype,Error.prototype);Object.setPrototypeOf(errorExError,Error);}else{util$10.inherits(errorExError,Error);}return errorExError;};errorEx$1.append=function(str,def){return{message:function message(v,_message){v=v||def;if(v){_message[0]+=' '+str.replace('%s',v.toString());}return _message;}};};errorEx$1.line=function(str,def){return{line:function line(v){v=v||def;if(v){return str.replace('%s',v.toString());}return null;}};};var index$58=errorEx$1;var unicode=createCommonjsModule(function(module){// This is autogenerated with esprima tools, see:
// https://github.com/ariya/esprima/blob/master/esprima.js
//
// PS: oh God, I hate Unicode
@@ -1281,13 +1339,13 @@ return undefined;}// JSON.parse compat
if(typeof input!=='string')input=String(input);if(options==null)options={};if(options.reserved_keys==null)options.reserved_keys='ignore';if(options.reserved_keys==='throw'||options.reserved_keys==='ignore'){if(options.null_prototype==null){options.null_prototype=true;}}try{return parse(input,options);}catch(err){// jju is a recursive parser, so JSON.parse("{{{{{{{") could blow up the stack
//
// this catch is used to skip all those internal calls
if(err instanceof SyntaxError&&err.row!=null&&err.column!=null){var old_err=err;err=SyntaxError(old_err.message);err.column=old_err.column;err.row=old_err.row;}throw err;}};module.exports.tokenize=function tokenizeJSON(input,options){if(options==null)options={};options._tokenize=function(smth){if(options._addstack)smth.stack.unshift.apply(smth.stack,options._addstack);tokens.push(smth);};var tokens=[];tokens.data=module.exports.parse(input,options);return tokens;};});var errorEx=index$60;var fallback=parse_1;var JSONError=errorEx('JSONError',{fileName:errorEx.append('in %s')});var index$58=function index$58(x,reviver,filename){if(typeof reviver==='string'){filename=reviver;reviver=null;}try{try{return JSON.parse(x,reviver);}catch(err){fallback.parse(x,{mode:'json',reviver:reviver});throw err;}}catch(err){var jsonErr=new JSONError(err);if(filename){jsonErr.fileName=filename;}throw jsonErr;}};var parseJson$1=index$58;var parseJson_1=function parseJson_1(json,filepath){try{return parseJson$1(json);}catch(err){err.message='JSON Error in '+filepath+':\n'+err.message;throw err;}};var path$3=require$$0$1;var readFile=readFile$1;var parseJson=parseJson_1;var loadPackageProp$1=function loadPackageProp$1(packageDir,options){var packagePath=path$3.join(packageDir,'package.json');return readFile(packagePath).then(function(content){if(!content)return null;var parsedContent=parseJson(content,packagePath);var packagePropValue=parsedContent[options.packageProp];if(!packagePropValue)return null;return{config:packagePropValue,filepath:packagePath};});};function isNothing(subject){return typeof subject==='undefined'||subject===null;}function isObject(subject){return(typeof subject==='undefined'?'undefined':_typeof(subject))==='object'&&subject!==null;}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence];}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key];}}return target;}function repeat(string,count){var result='',cycle;for(cycle=0;cycle<count;cycle+=1){result+=string;}return result;}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number;}var isNothing_1=isNothing;var isObject_1=isObject;var toArray_1=toArray;var repeat_1=repeat;var isNegativeZero_1=isNegativeZero;var extend_1=extend;var common$1={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};// YAML error class. http://stackoverflow.com/questions/8458984
if(err instanceof SyntaxError&&err.row!=null&&err.column!=null){var old_err=err;err=SyntaxError(old_err.message);err.column=old_err.column;err.row=old_err.row;}throw err;}};module.exports.tokenize=function tokenizeJSON(input,options){if(options==null)options={};options._tokenize=function(smth){if(options._addstack)smth.stack.unshift.apply(smth.stack,options._addstack);tokens.push(smth);};var tokens=[];tokens.data=module.exports.parse(input,options);return tokens;};});var errorEx=index$58;var fallback=parse_1;var JSONError=errorEx('JSONError',{fileName:errorEx.append('in %s')});var index$56=function index$56(x,reviver,filename){if(typeof reviver==='string'){filename=reviver;reviver=null;}try{try{return JSON.parse(x,reviver);}catch(err){fallback.parse(x,{mode:'json',reviver:reviver});throw err;}}catch(err){var jsonErr=new JSONError(err);if(filename){jsonErr.fileName=filename;}throw jsonErr;}};var parseJson$1=index$56;var parseJson_1=function parseJsonWrapper(json,filepath){try{return parseJson$1(json);}catch(err){err.message='JSON Error in '+filepath+':\n'+err.message;throw err;}};var path$3=require$$0$1;var readFile=readFile_1;var parseJson=parseJson_1;var loadPackageProp$1=function loadPackageProp(packageDir,options){var packagePath=path$3.join(packageDir,'package.json');function parseContent(content){if(!content)return null;var parsedContent=parseJson(content,packagePath);var packagePropValue=parsedContent[options.packageProp];if(!packagePropValue)return null;return{config:packagePropValue,filepath:packagePath};}return!options.sync?readFile(packagePath).then(parseContent):parseContent(readFile.sync(packagePath));};function isNothing(subject){return typeof subject==='undefined'||subject===null;}function isObject(subject){return(typeof subject==='undefined'?'undefined':_typeof(subject))==='object'&&subject!==null;}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence];}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key];}}return target;}function repeat(string,count){var result='',cycle;for(cycle=0;cycle<count;cycle+=1){result+=string;}return result;}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number;}var isNothing_1=isNothing;var isObject_1=isObject;var toArray_1=toArray;var repeat_1=repeat;var isNegativeZero_1=isNegativeZero;var extend_1=extend;var common$1={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};// YAML error class. http://stackoverflow.com/questions/8458984
//
function YAMLException$2(reason,mark){// Super constructor
Error.call(this);// Include stack trace in error object
Error.call(this);this.name='YAMLException';this.reason=reason;this.mark=mark;this.message=(this.reason||'(unknown reason)')+(this.mark?' '+this.mark.toString():'');// Include stack trace in error object
if(Error.captureStackTrace){// Chrome and NodeJS
Error.captureStackTrace(this,this.constructor);}else{// FF, IE 10+ and Safari 6+. Fallback for others
this.stack=new Error().stack||'';}this.name='YAMLException';this.reason=reason;this.mark=mark;this.message=(this.reason||'(unknown reason)')+(this.mark?' '+this.mark.toString():'');}// Inherit from Error
this.stack=new Error().stack||'';}}// Inherit from Error
YAMLException$2.prototype=Object.create(Error.prototype);YAMLException$2.prototype.constructor=YAMLException$2;YAMLException$2.prototype.toString=function toString(compact){var result=this.name+': ';result+=this.reason||'(unknown reason)';if(!compact&&this.mark){result+=' '+this.mark.toString();}return result;};var exception=YAMLException$2;var common$3=common$1;function Mark$1(name,buffer,position,line,column){this.name=name;this.buffer=buffer;this.position=position;this.line=line;this.column=column;}Mark$1.prototype.getSnippet=function getSnippet(indent,maxLength){var head,start,tail,end,snippet;if(!this.buffer)return null;indent=indent||4;maxLength=maxLength||75;head='';start=this.position;while(start>0&&'\0\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start-1))===-1){start-=1;if(this.position-start>maxLength/2-1){head=' ... ';start+=5;break;}}tail='';end=this.position;while(end<this.buffer.length&&'\0\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end))===-1){end+=1;if(end-this.position>maxLength/2-1){tail=' ... ';end-=5;break;}}snippet=this.buffer.slice(start,end);return common$3.repeat(' ',indent)+head+snippet+tail+'\n'+common$3.repeat(' ',indent+this.position-start+head.length)+'^';};Mark$1.prototype.toString=function toString(compact){var snippet,where='';if(this.name){where+='in "'+this.name+'" ';}where+='at line '+(this.line+1)+', column '+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=':\n'+snippet;}}return where;};var mark=Mark$1;var YAMLException$4=exception;var TYPE_CONSTRUCTOR_OPTIONS=['kind','resolve','construct','instanceOf','predicate','represent','defaultStyle','styleAliases'];var YAML_NODE_KINDS=['scalar','sequence','mapping'];function compileStyleAliases(map){var result={};if(map!==null){Object.keys(map).forEach(function(style){map[style].forEach(function(alias){result[String(alias)]=style;});});}return result;}function Type$2(tag,options){options=options||{};Object.keys(options).forEach(function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1){throw new YAMLException$4('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.');}});// TODO: Add tag format check.
this.tag=tag;this.kind=options['kind']||null;this.resolve=options['resolve']||function(){return true;};this.construct=options['construct']||function(data){return data;};this.instanceOf=options['instanceOf']||null;this.predicate=options['predicate']||null;this.represent=options['represent']||null;this.defaultStyle=options['defaultStyle']||null;this.styleAliases=compileStyleAliases(options['styleAliases']||null);if(YAML_NODE_KINDS.indexOf(this.kind)===-1){throw new YAMLException$4('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.');}}var type=Type$2;/*eslint-disable max-len*/var common$4=common$1;var YAMLException$3=exception;var Type$1=type;function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result);});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind){exclude.push(previousIndex);}});result.push(currentType);});return result.filter(function(type$$1,index){return exclude.indexOf(index)===-1;});}function compileMap()/* lists... */{var result={scalar:{},sequence:{},mapping:{},fallback:{}},index,length;function collectType(type$$1){result[type$$1.kind][type$$1.tag]=result['fallback'][type$$1.tag]=type$$1;}for(index=0,length=arguments.length;index<length;index+=1){arguments[index].forEach(collectType);}return result;}function Schema$2(definition){this.include=definition.include||[];this.implicit=definition.implicit||[];this.explicit=definition.explicit||[];this.implicit.forEach(function(type$$1){if(type$$1.loadKind&&type$$1.loadKind!=='scalar'){throw new YAMLException$3('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');}});this.compiledImplicit=compileList(this,'implicit',[]);this.compiledExplicit=compileList(this,'explicit',[]);this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit);}Schema$2.DEFAULT=null;Schema$2.create=function createSchema(){var schemas,types;switch(arguments.length){case 1:schemas=Schema$2.DEFAULT;types=arguments[0];break;case 2:schemas=arguments[0];types=arguments[1];break;default:throw new YAMLException$3('Wrong number of arguments for Schema.create function');}schemas=common$4.toArray(schemas);types=common$4.toArray(types);if(!schemas.every(function(schema){return schema instanceof Schema$2;})){throw new YAMLException$3('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');}if(!types.every(function(type$$1){return type$$1 instanceof Type$1;})){throw new YAMLException$3('Specified list of YAML types (or a single Type object) contains a non-Type object.');}return new Schema$2({include:schemas,explicit:types});};var schema=Schema$2;var Type$3=type;var str=new Type$3('tag:yaml.org,2002:str',{kind:'scalar',construct:function construct(data){return data!==null?data:'';}});var Type$4=type;var seq=new Type$4('tag:yaml.org,2002:seq',{kind:'sequence',construct:function construct(data){return data!==null?data:[];}});var Type$5=type;var map=new Type$5('tag:yaml.org,2002:map',{kind:'mapping',construct:function construct(data){return data!==null?data:{};}});var Schema$5=schema;var failsafe=new Schema$5({explicit:[str,seq,map]});var Type$6=type;function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==='~'||max===4&&(data==='null'||data==='Null'||data==='NULL');}function constructYamlNull(){return null;}function isNull(object){return object===null;}var _null=new Type$6('tag:yaml.org,2002:null',{kind:'scalar',resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function canonical(){return'~';},lowercase:function lowercase(){return'null';},uppercase:function uppercase(){return'NULL';},camelcase:function camelcase(){return'Null';}},defaultStyle:'lowercase'});var Type$7=type;function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==='true'||data==='True'||data==='TRUE')||max===5&&(data==='false'||data==='False'||data==='FALSE');}function constructYamlBoolean(data){return data==='true'||data==='True'||data==='TRUE';}function isBoolean(object){return Object.prototype.toString.call(object)==='[object Boolean]';}var bool=new Type$7('tag:yaml.org,2002:bool',{kind:'scalar',resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function lowercase(object){return object?'true':'false';},uppercase:function uppercase(object){return object?'TRUE':'FALSE';},camelcase:function camelcase(object){return object?'True':'False';}},defaultStyle:'lowercase'});var common$5=common$1;var Type$8=type;function isHexCode(c){return 0x30/* 0 */<=c&&c<=0x39/* 9 */||0x41/* A */<=c&&c<=0x46/* F */||0x61/* a */<=c&&c<=0x66/* f */;}function isOctCode(c){return 0x30/* 0 */<=c&&c<=0x37/* 7 */;}function isDecCode(c){return 0x30Line truncated
if(ch==='-'||ch==='+'){ch=data[++index];}if(ch==='0'){// 0
@@ -1331,7 +1389,7 @@ hour=+match[4];minute=+match[5];second=+match[6];if(match[7]){fraction=match[7].
fraction+='0';}fraction=+fraction;}// match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
if(match[9]){tz_hour=+match[10];tz_minute=+(match[11]||0);delta=(tz_hour*60+tz_minute)*60000;// delta in mili-seconds
if(match[9]==='-')delta=-delta;}date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(delta)date.setTime(date.getTime()-delta);return date;}function representYamlTimestamp(object/*, style*/){return object.toISOString();}var timestamp=new Type$10('tag:yaml.org,2002:timestamp',{kind:'scalar',resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});var Type$11=type;function resolveYamlMerge(data){return data==='<<'||data===null;}var merge=new Type$11('tag:yaml.org,2002:merge',{kind:'scalar',resolve:resolveYamlMerge});/*eslint-disable no-bitwise*/var NodeBuffer;try{// A trick for browserified version, to not include `Buffer` shim
var _require$4=commonjsRequire;NodeBuffer=_require$4('buffer').Buffer;}catch(__){}var Type$12=type;// [ 64, 65, 66 ] -> [ padding, CR, LF ]
var _require=commonjsRequire;NodeBuffer=_require('buffer').Buffer;}catch(__){}var Type$12=type;// [ 64, 65, 66 ] -> [ padding, CR, LF ]
var BASE64_MAP='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';function resolveYamlBinary(data){if(data===null)return false;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;// Convert one by one.
for(idx=0;idx<max;idx++){code=map.indexOf(data.charAt(idx));// Skip CR/LF
if(code>64)continue;// Fail on illegal characters
@@ -1355,9 +1413,9 @@ if(regexp[0]==='/'){if(tail)modifiers=tail[1];regexp=regexp.slice(1,regexp.lengt
// found too - then fail to parse.
//
try{// workaround to exclude package from browserify list.
var _require$5=commonjsRequire;esprima=_require$5('esprima');}catch(_){/*global window */if(typeof window!=='undefined')esprima=window.esprima;}var Type$18=type;function resolveJavascriptFunction(data){if(data===null)return false;try{var source='('+data+')',ast=esprima.parse(source,{range:true});if(ast.type!=='Program'||ast.body.length!==1||ast.body[0].type!=='ExpressionStatement'||ast.body[0].expression.type!=='FunctionExpression'){return false;}return true;}catch(err){return false;}}function constructJavascriptFunction(data){/*jslint evil:true*/var source='('+data+')',ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=='Program'||ast.body.length!==1||ast.body[0].type!=='ExpressionStatement'||ast.body[0].expression.type!=='FunctionExpression'){throw new Error('Failed to resolve function');}ast.body[0].expression.params.forEach(function(param){params.push(param.name);});body=ast.body[0].expression.body.range;// Esprima's ranges include the first '{' and the last '}' characters on
var _require$1=commonjsRequire;esprima=_require$1('esprima');}catch(_){/*global window */if(typeof window!=='undefined')esprima=window.esprima;}var Type$18=type;function resolveJavascriptFunction(data){if(data===null)return false;try{var source='('+data+')',ast=esprima.parse(source,{range:true});if(ast.type!=='Program'||ast.body.length!==1||ast.body[0].type!=='ExpressionStatement'||ast.body[0].expression.type!=='FunctionExpression'){return false;}return true;}catch(err){return false;}}function constructJavascriptFunction(data){/*jslint evil:true*/var source='('+data+')',ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=='Program'||ast.body.length!==1||ast.body[0].type!=='ExpressionStatement'||ast.body[0].expression.type!=='FunctionExpression'){throw new Error('Failed to resolve function');}ast.body[0].expression.params.forEach(function(param){params.push(param.name);});body=ast.body[0].expression.body.range;// Esprima's ranges include the first '{' and the last '}' characters on
// function expressions. So cut them out.
/*eslint-disable no-new-func*/return new Function(params,source.slice(body[0]+1,body[1]-1));}function representJavascriptFunction(object/*, style*/){return object.toString();}function isFunction(object){return Object.prototype.toString.call(object)==='[object Function]';}var _function=new Type$18('tag:yaml.org,2002:js/function',{kind:'scalar',resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction});var Schema$6=schema;var default_full=Schema$6.DEFAULT=new Schema$6({include:[default_safe],explicit:[_undefined,regexp,_function]});/*eslint-disable max-len,no-use-before-define*/var common=common$1;var YAMLException$1=exception;var Mark=mark;var DEFAULT_SAFE_SCHEMA$1=default_safe;var DEFAULT_FULL_SCHEMA$1=default_full;var _hasOwnProperty=Object.prototype.hasOwnProperty;var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function is_EOL(c){return c===0x0A/* LF */||c===0x0D/* CR */;}function is_WHITE_SPACE(c){return c===0x09/* Tab */||c===0x20/* Space */;}function is_WS_OR_EOL(c){return c===0x09/* Tab */||c===0x20/* Space */||c===0x0A/* LF */||c===0x0D/* CR */;}function is_FLOW_INDICATOR(c){return c===0x2C/* , */||c===0x5B/* [ */||c===0x5D/* ] */||c===0x7B/* { */||c===0x7D/* } */;}function fromHexCode(c){var lc;if(0x30/* 0 */<=c&&c<=0x39/* 9 */){return c-0x30;}/*eslint-disable no-bitwise*/lc=c|0x20;if(0x61/* a */<=lc&&lc<=0x66/* f */){return lc-0x61+10;}return-1;}function escapedHexLen(c){if(c===0x78/* x */){return 2;}if(c===0x75/* u */){return 4;}if(c===0x55/* U */){return 8;}return 0;}function fromDecimalCode(c){if(0x30/* 0 */<=c&&c<=0x39/* 9 */){return c-0x30;}return-1;}function simpleEscapeSequence(c){return c===0x30/* 0 */?'\x00':c===0x61/* a */?'\x07':c===0x62/* b */?'\x08':c===0x74/* t */?'\x09':c===0x09/* Tab */?'\x09':c===0x6E/* n */?'\x0A':c===0x76/* v */?'\x0B':c===0x66/* f */?'\x0C':c===0x72/* r */?'\x0D':c===0x65/* e */?'\x1B':c===0x20/* Space */?' ':c===0x22/* " */?'\x22':c===0x2F/* / */?'/':c===0x5C/* \ */?'\x5C':c===0x4E/* N */?'\x85':c===0x5F/* _ */?'\xA0':c===0x4C/* L */?'\u2028':c===0x50/* P */?'\u2029':'';}function charFromCodepoint(c){if(c<=0xFFFF){return String.fromCharCode(c);}// Encode UTF-16 surrogate pair
/*eslint-disable no-new-func*/return new Function(params,source.slice(body[0]+1,body[1]-1));}function representJavascriptFunction(object/*, style*/){return object.toString();}function isFunction(object){return Object.prototype.toString.call(object)==='[object Function]';}var _function=new Type$18('tag:yaml.org,2002:js/function',{kind:'scalar',resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction});var Schema$6=schema;var default_full=Schema$6.DEFAULT=new Schema$6({include:[default_safe],explicit:[_undefined,regexp,_function]});/*eslint-disable max-len,no-use-before-define*/var common=common$1;var YAMLException$1=exception;var Mark=mark;var DEFAULT_SAFE_SCHEMA$1=default_safe;var DEFAULT_FULL_SCHEMA$1=default_full;var _hasOwnProperty=Object.prototype.hasOwnProperty;var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function is_EOL(c){return c===0x0A/* LF */||c===0x0D/* CR */;}function is_WHITE_SPACE(c){return c===0x09/* Tab */||c===0x20/* Space */;}function is_WS_OR_EOL(c){return c===0x09/* Tab */||c===0x20/* Space */||c===0x0A/* LF */||c===0x0D/* CR */;}function is_FLOW_INDICATOR(c){return c===0x2C/* , */||c===0x5B/* [ */||c===0x5D/* ] */||c===0x7B/* { */||c===0x7D/* } */;}function fromHexCode(c){var lc;if(0x30/* 0 */<=c&&c<=0x39/* 9 */){return c-0x30;}/*eslint-disable no-bitwise*/lc=c|0x20;if(0x61/* a */<=lc&&lc<=0x66/* f */){return lc-0x61+10;}return-1;}function escapedHexLen(c){if(c===0x78/* x */){return 2;}if(c===0x75/* u */){return 4;}if(c===0x55/* U */){return 8;}return 0;}function fromDecimalCode(c){if(0x30/* 0 */<=c&&c<=0x39/* 9 */){return c-0x30;}return-1;}function simpleEscapeSequence(c){/* eslint-disable indent */return c===0x30/* 0 */?'\x00':c===0x61/* a */?'\x07':c===0x62/* b */?'\x08':c===0x74/* t */?'\x09':c===0x09/* Tab */?'\x09':c===0x6E/* n */?'\x0A':c===0x76/* v */?'\x0B':c===0x66/* f */?'\x0C':c===0x72/* r */?'\x0D':c===0x65/* e */?'\x1B':c===0x20/* Space */?' ':c===0x22/* " */?'\x22':c===0x2F/* / */?'/':c===0x5C/* \ */?'\x5C':c===0x4E/* N */?'\x85':c===0x5F/* _ */?'\xA0':c===0x4C/* L */?'\u2028':c===0x50/* P */?'\u2029':'';}function charFromCodepoint(c){if(c<=0xFFFF){return String.fromCharCode(c);}// Encode UTF-16 surrogate pair
// https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
return String.fromCharCode((c-0x010000>>10)+0xD800,(c-0x010000&0x03FF)+0xDC00);}var simpleEscapeCheck=new Array(256);// integer, for fast access
var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i);}function State(input,options){this.input=input;this.filename=options['filename']||null;this.schema=options['schema']||DEFAULT_FULL_SCHEMA$1;this.onWarning=options['onWarning']||null;this.legacy=options['legacy']||false;this.json=options['json']||false;this.listener=options['listener']||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[];/*
@@ -1415,7 +1473,7 @@ state.result=type.construct(state.result);state.tag=type.tag;if(state.anchor!==n
throwError(state,'cannot resolve a node with !<'+state.tag+'> explicit tag');}else{state.result=type.construct(state.result);if(state.anchor!==null){state.anchorMap[state.anchor]=state.result;}}}else{throwError(state,'unknown tag !<'+state.tag+'>');}}if(state.listener!==null){state.listener('close',state);}return state.tag!==null||state.anchor!==null||hasContent;}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==0x25/* % */){break;}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position);}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,'directive name must not be less than one character in length');}while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position);}if(ch===0x23/* # */){do{ch=state.input.charCodeAt(++state.position);}while(ch!==0&&!is_EOL(ch));break;}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position);}directiveArgs.push(state.input.slice(_position,state.position));}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs);}else{throwWarning(state,'unknown document directive "'+directiveName+'"');}}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===0x2D/* - */&&state.input.charCodeAt(state.position+1)===0x2D/* - */&&state.input.charCodeAt(state.position+2)===0x2D/* - */){state.position+=3;skipSeparationSpace(state,true,-1);}else if(hasDirectives){throwError(state,'directives end mark is expected');}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,'non-ASCII line breaks are interpreted as content');}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===0x2E/* . */){state.position+=3;skipSeparationSpace(state,true,-1);}return;}if(state.position<state.length-1){throwError(state,'end of the stream or a document separator is expected');}else{return;}}function loadDocuments(input,options){input=String(input);options=options||{};if(input.length!==0){// Add tailing `\n` if not exists
if(input.charCodeAt(input.length-1)!==0x0A/* LF */&&input.charCodeAt(input.length-1)!==0x0D/* CR */){input+='\n';}// Strip BOM
if(input.charCodeAt(0)===0xFEFF){input=input.slice(1);}}var state=new State(input,options);// Use 0 as string terminator. That significantly simplifies bounds check.
state.input+='\0';while(state.input.charCodeAt(state.position)===0x20/* Space */){state.lineIndent+=1;state.position+=1;}while(state.position<state.length-1){readDocument(state);}return state.documents;}function loadAll$1(input,iterator,options){var documents=loadDocuments(input,options),index,length;for(index=0,length=documents.length;index<length;index+=1){iterator(documents[index]);}}function load$1(input,options){var documents=loadDocuments(input,options);if(documents.length===0){/*eslint-disable no-undefined*/return undefined;}else if(documents.length===1){return documents[0];}throw new YAMLException$1('expected a single document in the stream, but found more');}function safeLoadAll$1(input,output,options){loadAll$1(input,output,common.extend({schema:DEFAULT_SAFE_SCHEMA$1},options));}function safeLoad$1(input,options){return load$1(input,common.extend({schema:DEFAULT_SAFE_SCHEMA$1},options));}var loadAll_1=loadAll$1;var load_1=load$1;var safeLoadAll_1=safeLoadAll$1;var safeLoad_1=safeLoad$1;var loader$1={loadAll:loadAll_1,load:load_1,safeLoadAll:safeLoadAll_1,safeLoad:safeLoad_1};/*eslint-disable no-use-before-define*/var common$7=common$1;var YAMLException$5=exception;var DEFAULT_FULL_SCHEMA$2=default_full;var DEFAULT_SAFE_SCHEMA$2=default_safe;var _toString$2=Object.prototype.toString;var _hasOwnProperty$3=Object.prototype.hasOwnProperty;var CHAR_TAB=0x09;/* Tab */var CHAR_LINE_FEED=0x0A;/* LF */var CHAR_SPACE=0x20;/* Space */var CHAR_EXCLAMATION=0x21;/* ! */var CHAR_DOUBLE_QUOTE=0x22;/* " */var CHAR_SHARP=0x23;/* # */var CHAR_PERCENT=0x25;/* % */var CHAR_AMPERSAND=0x26;/* & */var CHAR_SINGLE_QUOTE=0x27;/* ' */var CHAR_ASTERISK=0x2A;/* * */var CHAR_COMMA=0x2C;/* , */var CHAR_MINUS=0x2D;/* - */var CHAR_COLON=0x3A;/* : */var CHAR_GREATER_THAN=0x3E;/* > */var CHAR_QUESTION=0x3F;/* ? */var CHAR_COMMERCIAL_AT=0x40;/* @ */var CHAR_LEFT_SQUARE_BRACKET=0x5B;/* [ */var CHAR_RIGHT_SQUARE_BRACKET=0x5D;/* ] */var CHAR_GRAVE_ACCENT=0x60;/* ` */var CHAR_LEFT_CURLY_BRACKET=0x7B;/* { */var CHAR_VERTICAL_LINE=0x7C;/* | */var CHAR_RIGHT_CURLY_BRACKET=0x7D;/* } */var ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0x00]='\\0';ESCAPE_SEQUENCES[0x07]='\\a';ESCAPE_SEQUENCES[0x08]='\\b';ESCAPE_SEQUENCES[0x09]='\\t';ESCAPE_SEQUENCES[0x0A]='\\n';ESCAPE_SEQUENCES[0x0B]='\\v';ESCAPE_SEQUENCES[0x0C]='\\f';ESCAPE_SEQUENCES[0x0D]='\\r';ESCAPE_SEQUENCES[0x1B]='\\e';ESCAPE_SEQUENCES[0x22]='\\"';ESCAPE_SEQUENCES[0x5C]='\\\\';ESCAPE_SEQUENCES[0x85]='\\N';ESCAPE_SEQUENCES[0xA0]='\\_';ESCAPE_SEQUENCES[0x2028]='\\L';ESCAPE_SEQUENCES[0x2029]='\\P';var DEPRECATED_BOOLEANS_SYNTAX=['y','Y','yes','Yes','YES','on','On','ON','n','N','no','No','NO','off','Off','OFF'];function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if(tag.slice(0,2)==='!!'){tag='tag:yaml.org,2002:'+tag.slice(2);}type=schema.compiledTypeMap['fallback'][tag];if(type&&_hasOwnProperty$3.call(type.styleAliases,style)){style=type.styleAliases[style];}result[tag]=style;}return result;}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=0xFF){handle='x';length=2;}else if(character<=0xFFFF){handle='u';length=4;}else if(character<=0xFFFFFFFF){handle='U';length=8;}else{throw new YAMLException$5('code point within a string may not be greater than 0xFFFFFFFF');}return'\\'+handle+common$7.repeat('0',length-string.length)+string;}function State$1(options){this.schema=options['schema']||DEFAULT_FULL_SCHEMA$2;this.indent=Math.max(1,options['indent']||2);this.skipInvalid=options['skipInvalid']||false;this.flowLevel=common$7.isNothing(options['flowLevel'])?-1:options['flowLevel'];this.styleMap=compileStyleMap(this.schema,options['styles']||null);this.sortKeys=options['sortKeys']||false;this.lineWidth=options['lineWidth']||80;this.noRefs=options['noRefs']||false;this.noCompatMode=options['noCompatMode']||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result='';this.duplicates=[];this.usedDuplicates=null;}// Indents every line in a string. Empty lines (\n only) are not indented.
state.input+='\0';while(state.input.charCodeAt(state.position)===0x20/* Space */){state.lineIndent+=1;state.position+=1;}while(state.position<state.length-1){readDocument(state);}return state.documents;}function loadAll$1(input,iterator,options){var documents=loadDocuments(input,options),index,length;if(typeof iterator!=='function'){return documents;}for(index=0,length=documents.length;index<length;index+=1){iterator(documents[index]);}}function load$1(input,options){var documents=loadDocuments(input,options);if(documents.length===0){/*eslint-disable no-undefined*/return undefined;}else if(documents.length===1){return documents[0];}throw new YAMLException$1('expected a single document in the stream, but found more');}function safeLoadAll$1(input,output,options){if(typeof output==='function'){loadAll$1(input,output,common.extend({schema:DEFAULT_SAFE_SCHEMA$1},options));}else{return loadAll$1(input,common.extend({schema:DEFAULT_SAFE_SCHEMA$1},options));}}function safeLoad$1(input,options){return load$1(input,common.extend({schema:DEFAULT_SAFE_SCHEMA$1},options));}var loadAll_1=loadAll$1;var load_1=load$1;var safeLoadAll_1=safeLoadAll$1;var safeLoad_1=safeLoad$1;var loader$1={loadAll:loadAll_1,load:load_1,safeLoadAll:safeLoadAll_1,safeLoad:safeLoad_1};/*eslint-disable no-use-before-define*/var common$7=common$1;var YAMLException$5=exception;var DEFAULT_FULL_SCHEMA$2=default_full;var DEFAULT_SAFE_SCHEMA$2=default_safe;var _toString$2=Object.prototype.toString;var _hasOwnProperty$3=Object.prototype.hasOwnProperty;var CHAR_TAB=0x09;/* Tab */var CHAR_LINE_FEED=0x0A;/* LF */var CHAR_SPACE=0x20;/* Space */var CHAR_EXCLAMATION=0x21;/* ! */var CHAR_DOUBLE_QUOTE=0x22;/* " */var CHAR_SHARP=0x23;/* # */var CHAR_PERCENT=0x25;/* % */var CHAR_AMPERSAND=0x26;/* & */var CHAR_SINGLE_QUOTE=0x27;/* ' */var CHAR_ASTERISK=0x2A;/* * */var CHAR_COMMA=0x2C;/* , */var CHAR_MINUS=0x2D;/* - */var CHAR_COLON=0x3A;/* : */var CHAR_GREATER_THAN=0x3E;/* > */var CHAR_QUESTION=0x3F;/* ? */var CHAR_COMMERCIAL_AT=0x40;/* @ */var CHAR_LEFT_SQUARE_BRACKET=0x5B;/* [ */var CHAR_RIGHT_SQUARE_BRACKET=0x5D;/* ] */var CHAR_GRAVE_ACCENT=0x60;/* ` */var CHAR_LEFT_CURLY_BRACKET=0x7B;/* { */var CHAR_VERTICAL_LINE=0x7C;/* | */var CHAR_RIGHT_CURLY_BRACKET=0x7D;/* } */var ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0x00]='\\0';ESCAPE_SEQUENCES[0x07]='\\a';ESCAPE_SEQUENCES[0x08]='\\b';ESCAPE_SEQUENCES[0x09]='\\t';ESCAPE_SEQUENCES[0x0A]='\\n';ESCAPE_SEQUENCES[0x0B]='\\v';ESCAPE_SEQUENCES[0x0C]='\\f';ESCAPE_SEQUENCES[0x0D]='\\r';ESCAPE_SEQUENCES[0x1B]='\\e';ESCAPE_SEQUENCES[0x22]='\\"';ESCAPE_SEQUENCES[0x5C]='\\\\';ESCAPE_SEQUENCES[0x85]='\\N';ESCAPE_SEQUENCES[0xA0]='\\_';ESCAPE_SEQUENCES[0x2028]='\\L';ESCAPE_SEQUENCES[0x2029]='\\P';var DEPRECATED_BOOLEANS_SYNTAX=['y','Y','yes','Yes','YES','on','On','ON','n','N','no','No','NO','off','Off','OFF'];function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if(tag.slice(0,2)==='!!'){tag='tag:yaml.org,2002:'+tag.slice(2);}type=schema.compiledTypeMap['fallback'][tag];if(type&&_hasOwnProperty$3.call(type.styleAliases,style)){style=type.styleAliases[style];}result[tag]=style;}return result;}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=0xFF){handle='x';length=2;}else if(character<=0xFFFF){handle='u';length=4;}else if(character<=0xFFFFFFFF){handle='U';length=8;}else{throw new YAMLException$5('code point within a string may not be greater than 0xFFFFFFFF');}return'\\'+handle+common$7.repeat('0',length-string.length)+string;}function State$1(options){this.schema=options['schema']||DEFAULT_FULL_SCHEMA$2;this.indent=Math.max(1,options['indent']||2);this.skipInvalid=options['skipInvalid']||false;this.flowLevel=common$7.isNothing(options['flowLevel'])?-1:options['flowLevel'];this.styleMap=compileStyleMap(this.schema,options['styles']||null);this.sortKeys=options['sortKeys']||false;this.lineWidth=options['lineWidth']||80;this.noRefs=options['noRefs']||false;this.noCompatMode=options['noCompatMode']||false;this.condenseFlow=options['condenseFlow']||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result='';this.duplicates=[];this.usedDuplicates=null;}// Indents every line in a string. Empty lines (\n only) are not indented.
function indentString(string,spaces){var ind=common$7.repeat(' ',spaces),position=0,next=-1,result='',line,length=string.length;while(position<length){next=string.indexOf('\n',position);if(next===-1){line=string.slice(position);position=length;}else{line=string.slice(position,next+1);position=next+1;}if(line.length&&line!=='\n')result+=ind;result+=line;}return result;}function generateNextLine(state,level){return'\n'+common$7.repeat(' ',state.indent*level);}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1){type=state.implicitTypes[index];if(type.resolve(str)){return true;}}return false;}// [33] s-white ::= s-space | s-tab
function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB;}// Returns true if the character can be printed without escaping.
// From YAML 1.2: "any allowed characters known to be non-printable
@@ -1506,10 +1564,10 @@ result+='\n';// Insert a break if the remainder is too long and there is a break
if(line.length-start>width&&curr>start){result+=line.slice(start,curr)+'\n'+line.slice(curr+1);}else{result+=line.slice(start);}return result.slice(1);// drop extra \n joiner
}// Escapes a double-quoted string.
function escapeString(string){var result='';var char;var escapeSeq;for(var i=0;i<string.length;i++){char=string.charCodeAt(i);escapeSeq=ESCAPE_SEQUENCES[char];result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char);}return result;}function writeFlowSequence(state,level,object){var _result='',_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1){// Write only valid elements.
if(writeNode(state,level,object[index],false,false)){if(index!==0)_result+=', ';_result+=state.dump;}}state.tag=_tag;state.dump='['+_result+']';}function writeBlockSequence(state,level,object,compact){var _result='',_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1){// Write only valid elements.
if(writeNode(state,level,object[index],false,false)){if(index!==0)_result+=','+(!state.condenseFlow?' ':'');_result+=state.dump;}}state.tag=_tag;state.dump='['+_result+']';}function writeBlockSequence(state,level,object,compact){var _result='',_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1){// Write only valid elements.
if(writeNode(state,level+1,object[index],true,true)){if(!compact||index!==0){_result+=generateNextLine(state,level);}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){_result+='-';}else{_result+='- ';}_result+=state.dump;}}state.tag=_tag;state.dump=_result||'[]';// Empty sequence if no valid values.
}function writeFlowMapping(state,level,object){var _result='',_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer='';if(index!==0)pairBuffer+=', ';objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level,objectKey,false,false)){continue;// Skip this pair because of invalid key;
}if(state.dump.length>1024)pairBuffer+='? ';pairBuffer+=state.dump+': ';if(!writeNode(state,level,objectValue,false,false)){continue;// Skip this pair because of invalid value.
}if(state.dump.length>1024)pairBuffer+='? ';pairBuffer+=state.dump+':'+(state.condenseFlow?'':' ');if(!writeNode(state,level,objectValue,false,false)){continue;// Skip this pair because of invalid value.
}pairBuffer+=state.dump;// Both key and value are valid.
_result+=pairBuffer;}state.tag=_tag;state.dump='{'+_result+'}';}function writeBlockMapping(state,level,object,compact){var _result='',_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;// Allow sorting keys so that the output file is deterministic
if(state.sortKeys===true){// Default sorting
@@ -1524,13 +1582,23 @@ _result+=pairBuffer;}state.tag=_tag;state.dump=_result||'{}';// Empty mapping if
//
function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true);}var type=_toString$2.call(state.dump);if(block){block=state.flowLevel<0||state.flowLevel>level;}var objectOrArray=type==='[object Object]'||type==='[object Array]',duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1;}if(state.tag!==null&&state.tag!=='?'||duplicate||state.indent!==2&&level>0){compact=false;}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump='*ref_'+duplicateIndex;}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true;}if(type==='[object Object]'){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump='&ref_'+duplicateIndex+state.dump;}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump='&ref_'+duplicateIndex+' '+state.dump;}}}else if(type==='[object Array]'){if(block&&state.dump.length!==0){writeBlockSequence(state,level,state.dump,compact);if(duplicate){state.dump='&ref_'+duplicateIndex+state.dump;}}else{writeFlowSequence(state,level,state.dump);if(duplicate){state.dump='&ref_'+duplicateIndex+' '+state.dump;}}}else if(type==='[object String]'){if(state.tag!=='?'){writeScalar(state,state.dump,level,iskey);}}else{if(state.skipInvalid)return false;throw new YAMLException$5('unacceptable kind of an object to dump '+type);}if(state.tag!==null&&state.tag!=='?'){state.dump='!<'+state.tag+'> '+state.dump;}}return true;}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index<length;index+=1){state.duplicates.push(objects[duplicatesIndexes[index]]);}state.usedDuplicates=new Array(length);}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&(typeof object==='undefined'?'undefined':_typeof(object))==='object'){index=objects.indexOf(object);if(index!==-1){if(duplicatesIndexes.indexOf(index)===-1){duplicatesIndexes.push(index);}}else{objects.push(object);if(Array.isArray(object)){for(index=0,length=object.length;index<length;index+=1){inspectNode(object[index],objects,duplicatesIndexes);}}else{objectKeyList=Object.keys(object);for(index=0,length=objectKeyList.length;index<length;index+=1){inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes);}}}}}function dump$1(input,options){options=options||{};var state=new State$1(options);if(!state.noRefs)getDuplicateReferences(input,state);if(writeNode(state,0,input,true,true))return state.dump+'\n';return'';}function safeDump$1(input,options){return dump$1(input,common$7.extend({schema:DEFAULT_SAFE_SCHEMA$2},options));}var dump_1=dump$1;var safeDump_1=safeDump$1;var dumper$1={dump:dump_1,safeDump:safeDump_1};var loader=loader$1;var dumper=dumper$1;function deprecated$3(name){return function(){throw new Error('Function '+name+' is deprecated and cannot be used.');};}var Type=type;var Schema=schema;var FAILSAFE_SCHEMA=failsafe;var JSON_SCHEMA=json;var CORE_SCHEMA=core;var DEFAULT_SAFE_SCHEMA=default_safe;var DEFAULT_FULL_SCHEMA=default_full;var load=loader.load;var loadAll=loader.loadAll;var safeLoad=loader.safeLoad;var safeLoadAll=loader.safeLoadAll;var dump=dumper.dump;var safeDump=dumper.safeDump;var YAMLException=exception;// Deprecated schema names from JS-YAML 2.0.x
var MINIMAL_SCHEMA=failsafe;var SAFE_SCHEMA=default_safe;var DEFAULT_SCHEMA=default_full;// Deprecated functions from JS-YAML 1.x.x
var scan=deprecated$3('scan');var parse$1=deprecated$3('parse');var compose=deprecated$3('compose');var addConstructor=deprecated$3('addConstructor');var jsYaml={Type:Type,Schema:Schema,FAILSAFE_SCHEMA:FAILSAFE_SCHEMA,JSON_SCHEMA:JSON_SCHEMA,CORE_SCHEMA:CORE_SCHEMA,DEFAULT_SAFE_SCHEMA:DEFAULT_SAFE_SCHEMA,DEFAULT_FULL_SCHEMA:DEFAULT_FULL_SCHEMA,load:load,loadAll:loadAll,safeLoad:safeLoad,safeLoadAll:safeLoadAll,dump:dump,safeDump:safeDump,YAMLException:YAMLException,MINIMAL_SCHEMA:MINIMAL_SCHEMA,SAFE_SCHEMA:SAFE_SCHEMA,DEFAULT_SCHEMA:DEFAULT_SCHEMA,scan:scan,parse:parse$1,compose:compose,addConstructor:addConstructor};var yaml$1=jsYaml;var index$64=yaml$1;var index$66=createCommonjsModule(function(module){'use strict';var Module=module$1;var path=require$$0$1;module.exports=function requireFromString(code,filename,opts){if((typeof filename==='undefined'?'undefined':_typeof(filename))==='object'){opts=filename;filename=undefined;}opts=opts||{};filename=filename||'';opts.appendPaths=opts.appendPaths||[];opts.prependPaths=opts.prependPaths||[];if(typeof code!=='string'){throw new Error('code must be a string, not '+(typeof code==='undefined'?'undefined':_typeof(code)));}var paths=Module._nodeModulePaths(path.dirname(filename));var m=new Module(filename,module.parent);m.filename=filename;m.paths=[].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);m._compile(code,filename);return m.exports;};});var yaml=index$64;var requireFromString=index$66;var readFile$3=readFile$1;var parseJson$2=parseJson_1;var loadRc$1=function loadRc$1(filepath,options){return loadExtensionlessRc().then(function(result){if(result)return result;if(options.rcExtensions)return loadRcWithExtensions();return null;});function loadExtensionlessRc(){return readRcFile().then(function(content){if(!content)return null;var pasedConfig=options.rcStrictJson?parseJson$2(content,filepath):yaml.safeLoad(content,{filename:filepath});return{config:pasedConfig,filepath:filepath};});}function loadRcWithExtensions(){return readRcFile('json').then(function(content){if(content){var successFilepath=filepath+'.json';return{config:parseJson$2(content,successFilepath),filepath:successFilepath};}// If not content was found in the file with extension,
// try the next possible extension
return readRcFile('yaml');}).then(function(content){if(content){// If the previous check returned an object with a config
var scan=deprecated$3('scan');var parse$1=deprecated$3('parse');var compose=deprecated$3('compose');var addConstructor=deprecated$3('addConstructor');var jsYaml={Type:Type,Schema:Schema,FAILSAFE_SCHEMA:FAILSAFE_SCHEMA,JSON_SCHEMA:JSON_SCHEMA,CORE_SCHEMA:CORE_SCHEMA,DEFAULT_SAFE_SCHEMA:DEFAULT_SAFE_SCHEMA,DEFAULT_FULL_SCHEMA:DEFAULT_FULL_SCHEMA,load:load,loadAll:loadAll,safeLoad:safeLoad,safeLoadAll:safeLoadAll,dump:dump,safeDump:safeDump,YAMLException:YAMLException,MINIMAL_SCHEMA:MINIMAL_SCHEMA,SAFE_SCHEMA:SAFE_SCHEMA,DEFAULT_SCHEMA:DEFAULT_SCHEMA,scan:scan,parse:parse$1,compose:compose,addConstructor:addConstructor};var yaml$1=jsYaml;var index$62=yaml$1;var index$64=createCommonjsModule(function(module){'use strict';var Module=module$1;var path=require$$0$1;module.exports=function requireFromString(code,filename,opts){if((typeof filename==='undefined'?'undefined':_typeof(filename))==='object'){opts=filename;filename=undefined;}opts=opts||{};filename=filename||'';opts.appendPaths=opts.appendPaths||[];opts.prependPaths=opts.prependPaths||[];if(typeof code!=='string'){throw new Error('code must be a string, not '+(typeof code==='undefined'?'undefined':_typeof(code)));}var paths=Module._nodeModulePaths(path.dirname(filename));var m=new Module(filename,module.parent);m.filename=filename;m.paths=[].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);m._compile(code,filename);return m.exports;};});var index$66=isPromise$1;function isPromise$1(obj){return!!obj&&((typeof obj==='undefined'?'undefined':_typeof(obj))==='object'||typeof obj==='function')&&typeof obj.then==='function';}var isPromise=index$66;var chainFuncsAsync=function chainFuncsAsync(result,func){return result.then(func);};var chainFuncsSync=function chainFuncsSync(result,func){return func(result);};/**
* Runs the given functions sequentially. If the `init` param is a promise,
* functions are chained using `p.then()`. Otherwise, functions are chained by passing
* the result of each function to the next.
*
* @param {Promise | void} init
* @param {Array<Function>} funcs
* @returns {Promise<*> | *} - A promise if `init` was one, otherwise result of function
* chain execution.
*/var funcRunner$2=function funcRunner(init,funcs){var isAsync=isPromise(init);return funcs.reduce(isAsync===true?chainFuncsAsync:chainFuncsSync,init);};var yaml=index$62;var requireFromString=index$64;var readFile$2=readFile_1;var parseJson$2=parseJson_1;var funcRunner$1=funcRunner$2;var loadRc$1=function loadRc(filepath,options){function afterLoadExtensionlessRc(result){if(result)return result;if(options.rcExtensions)return loadRcWithExtensions();return null;}return!options.sync?loadExtensionlessRc().then(afterLoadExtensionlessRc):afterLoadExtensionlessRc(loadExtensionlessRc());function loadExtensionlessRc(){function parseExtensionlessRcFile(content){if(!content)return null;var pasedConfig=options.rcStrictJson?parseJson$2(content,filepath):yaml.safeLoad(content,{filename:filepath});return{config:pasedConfig,filepath:filepath};}return!options.sync?readRcFile().then(parseExtensionlessRcFile):parseExtensionlessRcFile(readRcFile());}function loadRcWithExtensions(){function makeRcFileParser(parse,extn,nextExtn){return function parseRcFile(content){if(content){// If the previous check returned an object with a config
// property, then it succeeded and this step can be skipped
if(content.config)return content;// If it just returned a string, then *this* check succeeded
var successFilepath=filepath+'.yaml';return{config:yaml.safeLoad(content,{filename:successFilepath}),filepath:successFilepath};}return readRcFile('yml');}).then(function(content){if(content){if(content.config)return content;var successFilepath=filepath+'.yml';return{config:yaml.safeLoad(content,{filename:successFilepath}),filepath:successFilepath};}return readRcFile('js');}).then(function(content){if(content){if(content.config)return content;var successFilepath=filepath+'.js';return{config:requireFromString(content,successFilepath),filepath:successFilepath};}return null;});}function readRcFile(extension){var filepathWithExtension=extension?filepath+'.'+extension:filepath;return readFile$3(filepathWithExtension);}};var requireFromString$1=index$66;var readFile$4=readFile$1;var loadJs$1=function loadJs$1(filepath){return readFile$4(filepath).then(function(content){if(!content)return null;return{config:requireFromString$1(content,filepath),filepath:filepath};});};var yaml$2=index$64;var requireFromString$2=index$66;var readFile$5=readFile$1;var parseJson$3=parseJson_1;var loadDefinedFile$1=function loadDefinedFile$1(filepath,options){return readFile$5(filepath,{throwNotFound:true}).then(function(content){var parsedConfig=function(){switch(options.format){case'json':return parseJson$3(content,filepath);case'yaml':return yaml$2.safeLoad(content,{filename:filepath});case'js':return requireFromString$2(content,filepath);default:return tryAllParsing(content,filepath);}}();if(!parsedConfig){throw new Error('Failed to parse "'+filepath+'" as JSON, JS, or YAML.');}return{config:parsedConfig,filepath:filepath};});};function tryAllParsing(content,filepath){return tryYaml(content,filepath,function(){return tryRequire(content,filepath,function(){return null;});});}function tryYaml(content,filepath,cb){try{var result=yaml$2.safeLoad(content,{filename:filepath});if(typeof result==='string'){return cb();}return result;}catch(e){return cb();}}function tryRequire(content,filepath,cb){try{return requireFromString$2(content,filepath);}catch(e){return cb();}}var path$2=require$$0$1;var isDir=index$56;var loadPackageProp=loadPackageProp$1;var loadRc=loadRc$1;var loadJs=loadJs$1;var loadDefinedFile=loadDefinedFile$1;var createExplorer$1=function createExplorer$1(options){// These cache Promises that resolve with results, not the results themselves
var fileCache=options.cache?new Map():null;var directoryCache=options.cache?new Map():null;var transform=options.transform||identityPromise;function clearFileCache(){if(fileCache)fileCache.clear();}function clearDirectoryCache(){if(directoryCache)directoryCache.clear();}function clearCaches(){clearFileCache();clearDirectoryCache();}function load(searchPath,configPath){if(!configPath&&options.configPath){configPath=options.configPath;}if(configPath){var absoluteConfigPath=path$2.resolve(process.cwd(),configPath);if(fileCache&&fileCache.has(absoluteConfigPath)){return fileCache.get(absoluteConfigPath);}var result=loadDefinedFile(absoluteConfigPath,options).then(transform);if(fileCache)fileCache.set(absoluteConfigPath,result);return result;}if(!searchPath)return Promise.resolve(null);var absoluteSearchPath=path$2.resolve(process.cwd(),searchPath);return isDirectory(absoluteSearchPath).then(function(searchPathIsDirectory){var directory=searchPathIsDirectory?absoluteSearchPath:path$2.dirname(absoluteSearchPath);return searchDirectory(directory);});}function searchDirectory(directory){if(directoryCache&&directoryCache.has(directory)){return directoryCache.get(directory);}var result=Promise.resolve().then(function(){if(!options.packageProp)return;return loadPackageProp(directory,options);}).then(function(result){if(result||!options.rc)return result;return loadRc(path$2.join(directory,options.rc),options);}).then(function(result){if(result||!options.js)return result;return loadJs(path$2.join(directory,options.js));}).then(function(result){if(result)return result;var splitPath=directory.split(path$2.sep);var nextDirectory=splitPath.length>1?splitPath.slice(0,-1).join(path$2.sep):null;if(!nextDirectory||directory===options.stopDir)return null;return searchDirectory(nextDirectory);}).then(transform);if(directoryCache)directoryCache.set(directory,result);return result;}return{load:load,clearFileCache:clearFileCache,clearDirectoryCache:clearDirectoryCache,clearCaches:clearCaches};};function isDirectory(filepath){return new Promise(function(resolve,reject){return isDir(filepath,function(err,dir){if(err)return reject(err);return resolve(dir);});});}function identityPromise(x){return Promise.resolve(x);}var path$1=require$$0$1;var oshomedir=index$50;var minimist=index$52;var assign=index$54;var createExplorer=createExplorer$1;var parsedCliArgs=minimist(process.argv);var index$48=function index$48(moduleName,options){options=assign({packageProp:moduleName,rc:'.'+moduleName+'rc',js:moduleName+'.config.js',argv:'config',rcStrictJson:false,stopDir:oshomedir(),cache:true},options);if(options.argv&&parsedCliArgs[options.argv]){options.configPath=path$1.resolve(parsedCliArgs[options.argv]);}return createExplorer(options);};var index$70=function index$70(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]';};var index$72=balanced$1;function balanced$1(a,b,str){if(a instanceof RegExp)a=maybeMatch(a,str);if(b instanceof RegExp)b=maybeMatch(b,str);var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)};}function maybeMatch(reg,str){var m=str.match(reg);return m?m[0]:null;}balanced$1.range=range;function range(a,b,str){var begs,beg,left,right,result;var ai=str.indexOf(a);var bi=str.indexOf(b,ai+1);var i=ai;if(ai>=0&&bi>0){begs=[];left=str.length;while(i>=0&&!result){if(i==ai){begs.push(i);ai=str.indexOf(a,i+1);}else if(begs.length==1){result=[begs.pop(),bi];}else{beg=begs.pop();if(beg<left){left=beg;right=bi;}bi=str.indexOf(b,i+1);}i=ai<bi&&ai>=0?ai:bi;}if(begs.length){result=[left,right];}}return result;}var concatMap=index$70;var balanced=index$72;var index$68=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
var successFilepath=filepath+'.'+extn;return{config:parse(content,successFilepath),filepath:successFilepath};}// If not content was found in the file with extension,
// try the next possible extension
return nextExtn?readRcFile(nextExtn):null;};}var parseJsonRcFile=makeRcFileParser(parseJson$2,'json','yaml');var parseYaml=function parseYaml(content,filepath){return yaml.safeLoad(content,{filename:filepath});};var parseYamlRcFile=makeRcFileParser(parseYaml,'yaml','yml');var parseYmlRcFile=makeRcFileParser(parseYaml,'yml','js');var parseJsRcFile=makeRcFileParser(requireFromString,'js');return funcRunner$1(readRcFile('json'),[parseJsonRcFile,parseYamlRcFile,parseYmlRcFile,parseJsRcFile]);}function readRcFile(extension){var filepathWithExtension=extension?filepath+'.'+extension:filepath;return!options.sync?readFile$2(filepathWithExtension):readFile$2.sync(filepathWithExtension);}};var requireFromString$1=index$64;var readFile$3=readFile_1;var loadJs$1=function loadJs(filepath,options){function parseJsFile(content){if(!content)return null;return{config:requireFromString$1(content,filepath),filepath:filepath};}return!options.sync?readFile$3(filepath).then(parseJsFile):parseJsFile(readFile$3.sync(filepath));};var yaml$2=index$62;var requireFromString$2=index$64;var readFile$4=readFile_1;var parseJson$3=parseJson_1;var loadDefinedFile$1=function loadDefinedFile(filepath,options){function parseContent(content){if(!content){throw new Error('Config file is empty! Filepath - "'+filepath+'".');}var parsedConfig=function(){switch(options.format){case'json':return parseJson$3(content,filepath);case'yaml':return yaml$2.safeLoad(content,{filename:filepath});case'js':return requireFromString$2(content,filepath);default:return tryAllParsing(content,filepath);}}();if(!parsedConfig){throw new Error('Failed to parse "'+filepath+'" as JSON, JS, or YAML.');}return{config:parsedConfig,filepath:filepath};}return!options.sync?readFile$4(filepath,{throwNotFound:true}).then(parseContent):parseContent(readFile$4.sync(filepath,{throwNotFound:true}));};function tryAllParsing(content,filepath){return tryYaml(content,filepath,function(){return tryRequire(content,filepath,function(){return null;});});}function tryYaml(content,filepath,cb){try{var result=yaml$2.safeLoad(content,{filename:filepath});if(typeof result==='string'){return cb();}return result;}catch(e){return cb();}}function tryRequire(content,filepath,cb){try{return requireFromString$2(content,filepath);}catch(e){return cb();}}var path$2=require$$0$1;var isDir=index$54;var loadPackageProp=loadPackageProp$1;var loadRc=loadRc$1;var loadJs=loadJs$1;var loadDefinedFile=loadDefinedFile$1;var funcRunner=funcRunner$2;var createExplorer$1=function createExplorer(options){// When `options.sync` is `false` (default),
// these cache Promises that resolve with results, not the results themselves.
var fileCache=options.cache?new Map():null;var directoryCache=options.cache?new Map():null;var transform=options.transform||identity;function clearFileCache(){if(fileCache)fileCache.clear();}function clearDirectoryCache(){if(directoryCache)directoryCache.clear();}function clearCaches(){clearFileCache();clearDirectoryCache();}function load(searchPath,configPath){if(!configPath&&options.configPath){configPath=options.configPath;}if(configPath){var absoluteConfigPath=path$2.resolve(process.cwd(),configPath);if(fileCache&&fileCache.has(absoluteConfigPath)){return fileCache.get(absoluteConfigPath);}var result=!options.sync?loadDefinedFile(absoluteConfigPath,options).then(transform):transform(loadDefinedFile(absoluteConfigPath,options));if(fileCache)fileCache.set(absoluteConfigPath,result);return result;}if(!searchPath)return!options.sync?Promise.resolve(null):null;var absoluteSearchPath=path$2.resolve(process.cwd(),searchPath);var searchPathDir=resolveDir(absoluteSearchPath,options.sync);return!options.sync?searchPathDir.then(searchDirectory):searchDirectory(searchPathDir);}function searchDirectory(directory){if(directoryCache&&directoryCache.has(directory)){return directoryCache.get(directory);}var result=funcRunner(!options.sync?Promise.resolve():undefined,[function(){if(!options.packageProp)return;return loadPackageProp(directory,options);},function(result){if(result||!options.rc)return result;return loadRc(path$2.join(directory,options.rc),options);},function(result){if(result||!options.js)return result;return loadJs(path$2.join(directory,options.js),options);},function(result){if(result)return result;var splitPath=directory.split(path$2.sep);var nextDirectory=splitPath.length>1?splitPath.slice(0,-1).join(path$2.sep):null;if(!nextDirectory||directory===options.stopDir)return null;return searchDirectory(nextDirectory);},transform]);if(directoryCache)directoryCache.set(directory,result);return result;}return{load:load,clearFileCache:clearFileCache,clearDirectoryCache:clearDirectoryCache,clearCaches:clearCaches};};function resolveDir(searchPath,sync){var dirForPath=function dirForPath(pathIsDir){return pathIsDir?searchPath:path$2.dirname(searchPath);};if(sync===true){return dirForPath(isDir.sync(searchPath));}return new Promise(function(resolve,reject){return isDir(searchPath,function(err,pathIsDir){if(err)return reject(err);return resolve(dirForPath(pathIsDir));});});}function identity(x){return x;}var require$$1$22=_package$3&&_package$3['default']||_package$3;index$48(require$$1$22);var path$1=require$$0$1;var oshomedir=index$50;var minimist=index$52;var createExplorer=createExplorer$1;var parsedCliArgs=minimist(process.argv);var index$46=function cosmiconfig(moduleName,options){options=Object.assign({packageProp:moduleName,rc:'.'+moduleName+'rc',js:moduleName+'.config.js',argv:'config',rcStrictJson:false,stopDir:oshomedir(),cache:true,sync:false},options);if(options.argv&&parsedCliArgs[options.argv]){options.configPath=path$1.resolve(parsedCliArgs[options.argv]);}return createExplorer(options);};var index$70=function index$70(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]';};var index$72=balanced$1;function balanced$1(a,b,str){if(a instanceof RegExp)a=maybeMatch(a,str);if(b instanceof RegExp)b=maybeMatch(b,str);var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)};}function maybeMatch(reg,str){var m=str.match(reg);return m?m[0]:null;}balanced$1.range=range;function range(a,b,str){var begs,beg,left,right,result;var ai=str.indexOf(a);var bi=str.indexOf(b,ai+1);var i=ai;if(ai>=0&&bi>0){begs=[];left=str.length;while(i>=0&&!result){if(i==ai){begs.push(i);ai=str.indexOf(a,i+1);}else if(begs.length==1){result=[begs.pop(),bi];}else{beg=begs.pop();if(beg<left){left=beg;right=bi;}bi=str.indexOf(b,i+1);}i=ai<bi&&ai>=0?ai:bi;}if(begs.length){result=[left,right];}}return result;}var concatMap=index$70;var balanced=index$72;var index$68=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[];// I don't know why Bash 4.3 does this, but it does.
@@ -1770,11 +1838,12 @@ return partial;}else if(pi===pl){// ran out of pattern, still have file left.
// 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,'\\$&');}var cosmiconfig=index$48;var minimatch=minimatch_1;var withCache=cosmiconfig("prettier");var noCache=cosmiconfig("prettier",{cache:false});function resolveConfig(filePath,opts){var useCache=!(opts&&opts.useCache===false);return(useCache?withCache:noCache).load(filePath).then(function(result){if(!result){return null;}return mergeOverrides(result.config,filePath);});}function clearCache(){withCache.clearCaches();}function resolveConfigFile(filePath){return noCache.load(filePath).then(function(result){if(result){return result.filepath;}return null;});}function mergeOverrides(config,filePath){var options=Object.assign({},config);if(filePath&&options.overrides){var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=options.overrides[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var override=_step2.value;if(pathMatchesGlobs(filePath,override.files,override.excludeFiles)){Object.assign(options,override.options);}}}catch(err){_didIteratorError2=true;_iteratorError2=err;}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return){_iterator2.return();}}finally{if(_didIteratorError2){throw _iteratorError2;}}}}delete options.overrides;return options;}// Based on eslint: https://github.com/eslint/eslint/blob/master/lib/config/config-ops.js
function pathMatchesGlobs(filePath,patterns,excludedPatterns){var patternList=[].concat(patterns);var excludedPatternList=[].concat(excludedPatterns||[]);var opts={matchBase:true};return patternList.some(function(pattern){return minimatch(filePath,pattern,opts);})&&!excludedPatternList.some(function(excludedPattern){return minimatch(filePath,excludedPattern,opts);});}var resolveConfig_1={resolveConfig:resolveConfig,resolveConfigFile:resolveConfigFile,clearCache:clearCache};var require$$2$19=_package$1&&_package$1['default']||_package$1;var stripBom=index$2;var comments=comments$1;var version=require$$2$19.version;var printAstToDoc=printer.printAstToDoc;var util$1=util$3;var _printDocToString=docPrinter.printDocToString;var normalizeOptions=options.normalize;var parser=parser$1;var printDocToDebug=docDebug.printDocToDebug;var config=resolveConfig_1;function guessLineEnding(text){var index=text.indexOf("\n");if(index>=0&&text.charAt(index-1)==="\r"){return"\r\n";}return"\n";}function attachComments(text,ast,opts){var astComments=ast.comments;if(astComments){delete ast.comments;comments.attach(astComments,ast,text,opts);}ast.tokens=[];opts.originalText=text.trimRight();return astComments;}function ensureAllCommentsPrinted(astComments){if(!astComments){return;}for(var _i34=0;_i34<astComments.length;++_i34){if(astComments[_i34].value.trim()==="prettier-ignore"){// If there's a prettier-ignore, we're not printing that sub-tree so we
function globUnescape(s){return s.replace(/\\(.)/g,'$1');}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,'\\$&');}var cosmiconfig=index$46;var minimatch=minimatch_1;var asyncWithCache=cosmiconfig("prettier");var asyncNoCache=cosmiconfig("prettier",{cache:false});var syncWithCache=cosmiconfig("prettier",{sync:true});var syncNoCache=cosmiconfig("prettier",{cache:false,sync:true});function resolveConfig(filePath,opts){var useCache=!(opts&&opts.useCache===false);return(useCache?asyncWithCache:asyncNoCache).load(filePath).then(function(result){return!result?null:mergeOverrides(result.config,filePath);});}resolveConfig.sync=function(filePath,opts){var useCache=!(opts&&opts.useCache===false);var result=(useCache?syncWithCache:syncNoCache).load(filePath);return!result?null:mergeOverrides(result.config,filePath);};function clearCache(){syncWithCache.clearCaches();asyncWithCache.clearCaches();}function resolveConfigFile(filePath){return asyncNoCache.load(filePath).then(function(result){return result?result.filepath:null;});}resolveConfigFile.sync=function(filePath){var result=syncNoCache.load(filePath);return result?result.filepath:null;};function mergeOverrides(config,filePath){var options=Object.assign({},config);if(filePath&&options.overrides){var _iteratorNormalCompletion13=true;var _didIteratorError13=false;var _iteratorError13=undefined;try{for(var _iterator13=options.overrides[Symbol.iterator](),_step13;!(_iteratorNormalCompletion13=(_step13=_iterator13.next()).done);_iteratorNormalCompletion13=true){var override=_step13.value;if(pathMatchesGlobs(filePath,override.files,override.excludeFiles)){Object.assign(options,override.options);}}}catch(err){_didIteratorError13=true;_iteratorError13=err;}finally{try{if(!_iteratorNormalCompletion13&&_iterator13.return){_iterator13.return();}}finally{if(_didIteratorError13){throw _iteratorError13;}}}}delete options.overrides;return options;}// Based on eslint: https://github.com/eslint/eslint/blob/master/lib/config/config-ops.js
function pathMatchesGlobs(filePath,patterns,excludedPatterns){var patternList=[].concat(patterns);var excludedPatternList=[].concat(excludedPatterns||[]);var opts={matchBase:true};return patternList.some(function(pattern){return minimatch(filePath,pattern,opts);})&&!excludedPatternList.some(function(excludedPattern){return minimatch(filePath,excludedPattern,opts);});}var resolveConfig_1={resolveConfig:resolveConfig,resolveConfigFile:resolveConfigFile,clearCache:clearCache};var commentEndRe=/\*\/$/;var commentStartRe=/^\/\*\*/;var docblockRe=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;var lineCommentRe=/\/\/([^\r\n]*)/g;var ltrimRe=/^\s*/;var multilineRe=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *([^@\r\n\s][^@\r\n]+?) *\r?\n/g;var propertyRe=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g;var stringStartRe=/(\r?\n|^) *\*/g;var wsRe=/[\t ]+/g;function extract(contents){var match=contents.match(docblockRe);return match?match[0].replace(ltrimRe,'')||'':'';}function parse$3(docblock){docblock=docblock.replace(commentStartRe,'').replace(commentEndRe,'').replace(wsRe,' ').replace(lineCommentRe,'').replace(stringStartRe,'$1');// Normalize multi-line directives
var prev='';while(prev!==docblock){prev=docblock;docblock=docblock.replace(multilineRe,'\n$1 $2\n');}docblock=docblock.trim();var result=Object.create(null);var match=void 0;while(match=propertyRe.exec(docblock)){result[match[1]]=match[2];}return result;}var extract_1=extract;var parse_1$2=parse$3;var index$74={extract:extract_1,parse:parse_1$2};var require$$2$18=_package$1&&_package$1['default']||_package$1;var stripBom=index$2;var comments=comments$1;var version=require$$2$18.version;var printAstToDoc=printer.printAstToDoc;var util$1=util$3;var _printDocToString=docPrinter.printDocToString;var normalizeOptions=options.normalize;var parser=parser$1;var printDocToDebug=docDebug.printDocToDebug;var config=resolveConfig_1;var docblock=index$74;function guessLineEnding(text){var index=text.indexOf("\n");if(index>=0&&text.charAt(index-1)==="\r"){return"\r\n";}return"\n";}function attachComments(text,ast,opts){var astComments=ast.comments;if(astComments){delete ast.comments;comments.attach(astComments,ast,text,opts);}ast.tokens=[];opts.originalText=text.trimRight();return astComments;}function hasPragma(text){var pragmas=Object.keys(docblock.parse(docblock.extract(text)));return pragmas.indexOf("prettier")!==-1||pragmas.indexOf("format")!==-1;}function ensureAllCommentsPrinted(astComments){if(!astComments){return;}for(var _i34=0;_i34<astComments.length;++_i34){if(astComments[_i34].value.trim()==="prettier-ignore"){// If there's a prettier-ignore, we're not printing that sub-tree so we
// don't know if the comments was printed or not.
return;}}astComments.forEach(function(comment){if(!comment.printed){throw new Error('Comment "'+comment.value.trim()+'" was not printed. Please report this error!');}delete comment.printed;});}function _formatWithCursor(text,opts,addAlignmentSize){text=stripBom(text);addAlignmentSize=addAlignmentSize||0;var ast=parser.parse(text,opts);var formattedRangeOnly=formatRange(text,opts,ast);if(formattedRangeOnly){return{formatted:formattedRangeOnly};}var cursorOffset=void 0;if(opts.cursorOffset>=0){var cursorNodeAndParents=findNodeAtOffset(ast,opts.cursorOffset);var cursorNode=cursorNodeAndParents.node;if(cursorNode){cursorOffset=opts.cursorOffset-util$1.locStart(cursorNode);opts.cursorNode=cursorNode;}}var astComments=attachComments(text,ast,opts);var doc=printAstToDoc(ast,opts,addAlignmentSize);opts.newLine=guessLineEnding(text);var toStringResult=_printDocToString(doc,opts);var str=toStringResult.formatted;var cursorOffsetResult=toStringResult.cursor;ensureAllCommentsPrinted(astComments);// Remove extra leading indentation as well as the added indentation after last newline
if(addAlignmentSize>0){return{formatted:str.trim()+opts.newLine};}if(cursorOffset!==undefined){return{formatted:str,cursorOffset:cursorOffsetResult+cursorOffset};}return{formatted:str};}function _format(text,opts,addAlignmentSize){return _formatWithCursor(text,opts,addAlignmentSize).formatted;}function findSiblingAncestors(startNodeAndParents,endNodeAndParents){var resultStartNode=startNodeAndParents.node;var resultEndNode=endNodeAndParents.node;if(resultStartNode===resultEndNode){return{startNode:resultStartNode,endNode:resultEndNode};}var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=endNodeAndParents.parentNodes[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var endParent=_step3.value;if(endParent.type!=="Program"&&endParent.type!=="File"&&util$1.locStart(endParent)>=util$1.locStart(startNodeAndParents.node)){resultEndNode=endParent;}else{break;}}}catch(err){_didIteratorError3=true;_iteratorError3=err;}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return();}}finally{if(_didIteratorError3){throw _iteratorError3;}}}var _iteratorNormalCompletion4=true;var _didIteratorError4=false;var _iteratorError4=undefined;try{for(var _iterator4=startNodeAndParents.parentNodes[Symbol.iterator](),_step4;!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=true){var startParent=_step4.value;if(startParent.type!=="Program"&&startParent.type!=="File"&&util$1.locEnd(startParent)<=util$1.locEnd(endNodeAndParents.node)){resultStartNode=startParent;}else{break;}}}catch(err){_didIteratorError4=true;_iteratorError4=err;}finally{try{if(!_iteratorNormalCompletion4&&_iterator4.return){_iterator4.return();}}finally{if(_didIteratorError4){throw _iteratorError4;}}}return{startNode:resultStartNode,endNode:resultEndNode};}function findNodeAtOffset(node,offset,predicate,parentNodes){predicate=predicate||function(){return true;};parentNodes=parentNodes||[];var start=util$1.locStart(node);var end=util$1.locEnd(node);if(start<=offset&&offset<=end){var _iteratorNormalCompletion5=true;var _didIteratorError5=false;var _iteratorError5=undefined;try{for(var _iterator5=comments.getSortedChildNodes(node)[Symbol.iterator](),_step5;!(_iteratorNormalCompletion5=(_step5=_iterator5.next()).done);_iteratorNormalCompletion5=true){var childNode=_step5.value;var childResult=findNodeAtOffset(childNode,offset,predicate,[node].concat(parentNodes));if(childResult){return childResult;}}}catch(err){_didIteratorError5=true;_iteratorError5=err;}finally{try{if(!_iteratorNormalCompletion5&&_iterator5.return){_iterator5.return();}}finally{if(_didIteratorError5){throw _iteratorError5;}}}if(predicate(node)){return{node:node,parentNodes:parentNodes};}}}// See https://www.ecma-international.org/ecma-262/5.1/#sec-A.5
return;}}astComments.forEach(function(comment){if(!comment.printed){throw new Error('Comment "'+comment.value.trim()+'" was not printed. Please report this error!');}delete comment.printed;});}function _formatWithCursor(text,opts,addAlignmentSize){if(opts.requirePragma&&!hasPragma(text)){return{formatted:text};}text=stripBom(text);addAlignmentSize=addAlignmentSize||0;var ast=parser.parse(text,opts);var formattedRangeOnly=formatRange(text,opts,ast);if(formattedRangeOnly){return{formatted:formattedRangeOnly};}var cursorOffset=void 0;if(opts.cursorOffset>=0){var cursorNodeAndParents=findNodeAtOffset(ast,opts.cursorOffset);var cursorNode=cursorNodeAndParents.node;if(cursorNode){cursorOffset=opts.cursorOffset-util$1.locStart(cursorNode);opts.cursorNode=cursorNode;}}var astComments=attachComments(text,ast,opts);var doc=printAstToDoc(ast,opts,addAlignmentSize);opts.newLine=guessLineEnding(text);var toStringResult=_printDocToString(doc,opts);var str=toStringResult.formatted;var cursorOffsetResult=toStringResult.cursor;ensureAllCommentsPrinted(astComments);// Remove extra leading indentation as well as the added indentation after last newline
if(addAlignmentSize>0){return{formatted:str.trim()+opts.newLine};}if(cursorOffset!==undefined){return{formatted:str,cursorOffset:cursorOffsetResult+cursorOffset};}return{formatted:str};}function _format(text,opts,addAlignmentSize){return _formatWithCursor(text,opts,addAlignmentSize).formatted;}function findSiblingAncestors(startNodeAndParents,endNodeAndParents){var resultStartNode=startNodeAndParents.node;var resultEndNode=endNodeAndParents.node;if(resultStartNode===resultEndNode){return{startNode:resultStartNode,endNode:resultEndNode};}var _iteratorNormalCompletion14=true;var _didIteratorError14=false;var _iteratorError14=undefined;try{for(var _iterator14=endNodeAndParents.parentNodes[Symbol.iterator](),_step14;!(_iteratorNormalCompletion14=(_step14=_iterator14.next()).done);_iteratorNormalCompletion14=true){var endParent=_step14.value;if(endParent.type!=="Program"&&endParent.type!=="File"&&util$1.locStart(endParent)>=util$1.locStart(startNodeAndParents.node)){resultEndNode=endParent;}else{break;}}}catch(err){_didIteratorError14=true;_iteratorError14=err;}finally{try{if(!_iteratorNormalCompletion14&&_iterator14.return){_iterator14.return();}}finally{if(_didIteratorError14){throw _iteratorError14;}}}var _iteratorNormalCompletion15=true;var _didIteratorError15=false;var _iteratorError15=undefined;try{for(var _iterator15=startNodeAndParents.parentNodes[Symbol.iterator](),_step15;!(_iteratorNormalCompletion15=(_step15=_iterator15.next()).done);_iteratorNormalCompletion15=true){var startParent=_step15.value;if(startParent.type!=="Program"&&startParent.type!=="File"&&util$1.locEnd(startParent)<=util$1.locEnd(endNodeAndParents.node)){resultStartNode=startParent;}else{break;}}}catch(err){_didIteratorError15=true;_iteratorError15=err;}finally{try{if(!_iteratorNormalCompletion15&&_iterator15.return){_iterator15.return();}}finally{if(_didIteratorError15){throw _iteratorError15;}}}return{startNode:resultStartNode,endNode:resultEndNode};}function findNodeAtOffset(node,offset,predicate,parentNodes){predicate=predicate||function(){return true;};parentNodes=parentNodes||[];var start=util$1.locStart(node);var end=util$1.locEnd(node);if(start<=offset&&offset<=end){var _iteratorNormalCompletion16=true;var _didIteratorError16=false;var _iteratorError16=undefined;try{for(var _iterator16=comments.getSortedChildNodes(node)[Symbol.iterator](),_step16;!(_iteratorNormalCompletion16=(_step16=_iterator16.next()).done);_iteratorNormalCompletion16=true){var childNode=_step16.value;var childResult=findNodeAtOffset(childNode,offset,predicate,[node].concat(parentNodes));if(childResult){return childResult;}}}catch(err){_didIteratorError16=true;_iteratorError16=err;}finally{try{if(!_iteratorNormalCompletion16&&_iterator16.return){_iterator16.return();}}finally{if(_didIteratorError16){throw _iteratorError16;}}}if(predicate(node)){return{node:node,parentNodes:parentNodes};}}}// See https://www.ecma-international.org/ecma-262/5.1/#sec-A.5
function isSourceElement(opts,node){if(node==null){return false;}switch(node.type||node.kind){case"ObjectExpression":// JSON
case"ArrayExpression":// JSON
case"StringLiteral":// JSON
+9 -1
View File
@@ -25379,7 +25379,15 @@ function parseNestedCSS(node) {
node.selector = parseSelector(selector);
} catch (e) {
// Fail silently. It's better to print it as is than to try and parse it
node.selector = selector;
// Note: A common failure is for SCSS nested properties. `background:
// none { color: red; }` is parsed as a NestedDeclaration by
// postcss-scss, while `background: { color: red; }` is parsed as a Rule
// with a selector ending with a colon. See:
// https://github.com/postcss/postcss-scss/issues/39
node.selector = {
type: "selector-root-invalid",
value: selector
};
}
}
if (node.type && typeof node.value === "string") {
+3 -3
View File
@@ -232,9 +232,9 @@ var process = {
uptime: uptime
};
var __dirname = '/Users/vjeux/random/prettier/dist';
var __dirname = '/Users/suchipi/Code/prettier/dist';
var __filename = '/Users/vjeux/random/prettier/dist/parser-typescript.js';
var __filename = '/Users/suchipi/Code/prettier/dist/parser-typescript.js';
var browser$1 = true;
@@ -2231,7 +2231,7 @@ function createCommonjsModule(fn, module) {
}
var parserTypescript_1 = createCommonjsModule(function (module) {
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}function createError$1(e,t){const n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n}function includeShebang$1(e,t){if(!e.startsWith("#!"))return;const n=e.indexOf("\n"),r={type:"Line",value:e.slice(2,n),range:[0,n],loc:{source:null,start:{line:1,column:0},end:{line:1,column:n}}};t.comments=[r].concat(t.comments);}function commonjsRequire$$1(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function createCommonjsModule$$1(e,t){return t={exports:{}},e(t,t.exports),t.exports}function toVLQSigned(e){return e<0?1+(-e<<1):0+(e<<1)}function fromVLQSigned(e){var t=e>>1;return 1==(1&e)?-t:t}function ArraySet$1(){this._array=[],this._set=Object.create(null);}function generatedPositionAfter(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return r>n||r==n&&a>=i||util$4.compareByGeneratedPositionsInflated(e,t)<=0}function MappingList$1(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0};}function SourceMapGenerator$1(e){e||(e={}),this._file=util.getArg(e,"file",null),this._sourceRoot=util.getArg(e,"sourceRoot",null),this._skipValidation=util.getArg(e,"skipValidation",!1),this._sources=new ArraySet,this._names=new ArraySet,this._mappings=new MappingList,this._sourcesContents=null;}function swap(e,t,n){var r=e[t];e[t]=e[n],e[n]=r;}function randomIntInRange(e,t){return Math.round(e+Math.random()*(t-e))}function doQuickSort(e,t,n,r){if(n<r){var i=n-1;swap(e,randomIntInRange(n,r),r);for(var a=e[r],o=n;o<r;o++)t(e[o],a)<=0&&swap(e,i+=1,o);swap(e,i+1,o);var s=i+1;doQuickSort(e,t,n,s-1),doQuickSort(e,t,s+1,r);}}function SourceMapConsumer$2(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new IndexedSourceMapConsumer(t):new BasicSourceMapConsumer(t)}function BasicSourceMapConsumer(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=util$5.getArg(t,"version"),r=util$5.getArg(t,"sources"),i=util$5.getArg(t,"names",[]),a=util$5.getArg(t,"sourceRoot",null),o=util$5.getArg(t,"sourcesContent",null),s=util$5.getArg(t,"mappings"),c=util$5.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(String).map(util$5.normalize).map(function(e){return a&&util$5.isAbsolute(a)&&util$5.isAbsolute(e)?util$5.relative(a,e):e}),this._names=ArraySet$2.fromArray(i.map(String),!0),this._sources=ArraySet$2.fromArray(r,!0),this.sourceRoot=a,this.sourcesContent=o,this._mappings=s,this.file=c;}function Mapping(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null;}function IndexedSourceMapConsumer(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=util$5.getArg(t,"version"),r=util$5.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new ArraySet$2,this._names=new ArraySet$2;var i={line:-1,column:0};this._sections=r.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=util$5.getArg(e,"offset"),n=util$5.getArg(t,"line"),r=util$5.getArg(t,"column");if(n<i.line||n===i.line&&r<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=t,{generatedOffset:{generatedLine:n+1,generatedColumn:r+1},consumer:new SourceMapConsumer$2(util$5.getArg(e,"map"))}});}function SourceNode$1(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[isSourceNode]=!0,null!=r&&this.add(r);}function isInBrowser(){return"browser"===environment||"node"!==environment&&("undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type))}function hasGlobalProcessEventEmitter(){return"object"==typeof process&&null!==process&&"function"==typeof process.on}function handlerExec(e){return function(t){for(var n=0;n<e.length;n++){var r=e[n](t);if(r)return r}return null}}function supportRelativeURL(e,t){if(!e)return t;var n=path$1.dirname(e),r=/^\w+:\/\/[^\/]*/.exec(n),i=r?r[0]:"";return i+path$1.resolve(n.slice(i.length),t)}function retrieveSourceMapURL(e){var t;if(isInBrowser())try{var n=new XMLHttpRequest;n.open("GET",e,!1),n.send(null),t=4===n.readyState?n.responseText:null;var r=n.getResponseHeader("SourceMap")||n.getResponseHeader("X-SourceMap");if(r)return r}catch(e){}t=retrieveFile(e);for(var i,a,o=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/gm;a=o.exec(t);)i=a;return i?i[1]:null}function mapSourcePosition(e){var t=sourceMapCache[e.source];if(!t){var n=retrieveSourceMap(e.source);n?(t=sourceMapCache[e.source]={url:n.url,map:new SourceMapConsumer(n.map)}).map.sourcesContent&&tLine truncated
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}function createError$1(e,t){const n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n}function includeShebang$1(e,t){if(!e.startsWith("#!"))return;const n=e.indexOf("\n"),r={type:"Line",value:e.slice(2,n),range:[0,n],loc:{source:null,start:{line:1,column:0},end:{line:1,column:n}}};t.comments=[r].concat(t.comments);}function commonjsRequire$$1(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function createCommonjsModule$$1(e,t){return t={exports:{}},e(t,t.exports),t.exports}function toVLQSigned(e){return e<0?1+(-e<<1):0+(e<<1)}function fromVLQSigned(e){var t=e>>1;return 1==(1&e)?-t:t}function ArraySet$1(){this._array=[],this._set=Object.create(null);}function generatedPositionAfter(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return r>n||r==n&&a>=i||util$4.compareByGeneratedPositionsInflated(e,t)<=0}function MappingList$1(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0};}function SourceMapGenerator$1(e){e||(e={}),this._file=util.getArg(e,"file",null),this._sourceRoot=util.getArg(e,"sourceRoot",null),this._skipValidation=util.getArg(e,"skipValidation",!1),this._sources=new ArraySet,this._names=new ArraySet,this._mappings=new MappingList,this._sourcesContents=null;}function swap(e,t,n){var r=e[t];e[t]=e[n],e[n]=r;}function randomIntInRange(e,t){return Math.round(e+Math.random()*(t-e))}function doQuickSort(e,t,n,r){if(n<r){var i=n-1;swap(e,randomIntInRange(n,r),r);for(var a=e[r],o=n;o<r;o++)t(e[o],a)<=0&&swap(e,i+=1,o);swap(e,i+1,o);var s=i+1;doQuickSort(e,t,n,s-1),doQuickSort(e,t,s+1,r);}}function SourceMapConsumer$2(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new IndexedSourceMapConsumer(t):new BasicSourceMapConsumer(t)}function BasicSourceMapConsumer(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=util$5.getArg(t,"version"),r=util$5.getArg(t,"sources"),i=util$5.getArg(t,"names",[]),a=util$5.getArg(t,"sourceRoot",null),o=util$5.getArg(t,"sourcesContent",null),s=util$5.getArg(t,"mappings"),c=util$5.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(String).map(util$5.normalize).map(function(e){return a&&util$5.isAbsolute(a)&&util$5.isAbsolute(e)?util$5.relative(a,e):e}),this._names=ArraySet$2.fromArray(i.map(String),!0),this._sources=ArraySet$2.fromArray(r,!0),this.sourceRoot=a,this.sourcesContent=o,this._mappings=s,this.file=c;}function Mapping(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null;}function IndexedSourceMapConsumer(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=util$5.getArg(t,"version"),r=util$5.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new ArraySet$2,this._names=new ArraySet$2;var i={line:-1,column:0};this._sections=r.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=util$5.getArg(e,"offset"),n=util$5.getArg(t,"line"),r=util$5.getArg(t,"column");if(n<i.line||n===i.line&&r<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=t,{generatedOffset:{generatedLine:n+1,generatedColumn:r+1},consumer:new SourceMapConsumer$2(util$5.getArg(e,"map"))}});}function SourceNode$1(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[isSourceNode]=!0,null!=r&&this.add(r);}function isInBrowser(){return"browser"===environment||"node"!==environment&&("undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type))}function hasGlobalProcessEventEmitter(){return"object"==typeof process&&null!==process&&"function"==typeof process.on}function handlerExec(e){return function(t){for(var n=0;n<e.length;n++){var r=e[n](t);if(r)return r}return null}}function supportRelativeURL(e,t){if(!e)return t;var n=path$1.dirname(e),r=/^\w+:\/\/[^\/]*/.exec(n),i=r?r[0]:"";return i+path$1.resolve(n.slice(i.length),t)}function retrieveSourceMapURL(e){var t;if(isInBrowser())try{var n=new XMLHttpRequest;n.open("GET",e,!1),n.send(null),t=4===n.readyState?n.responseText:null;var r=n.getResponseHeader("SourceMap")||n.getResponseHeader("X-SourceMap");if(r)return r}catch(e){}t=retrieveFile(e);for(var i,a,o=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/gm;a=o.exec(t);)i=a;return i?i[1]:null}function mapSourcePosition(e){var t=sourceMapCache[e.source];if(!t){var n=retrieveSourceMap(e.source);n?(t=sourceMapCache[e.source]={url:n.url,map:new SourceMapConsumer(n.map)}).map.sourcesContent&&tLine truncated
});
var parserTypescript = unwrapExports(parserTypescript_1);