mirror of
https://github.com/actions/setup-python.git
synced 2024-11-30 03:45:17 +00:00
1 line
No EOL
1.6 MiB
1 line
No EOL
1.6 MiB
{"version":3,"sources":["webpack://expect/webpack/universalModuleDefinition","webpack://expect/webpack/bootstrap","webpack://expect/./node_modules/@babel/code-frame/lib/index.js","webpack://expect/./node_modules/@babel/highlight/lib/index.js","webpack://expect/./node_modules/ansi-regex/index.js","webpack://expect/./node_modules/ansi-styles/index.js","webpack://expect/./node_modules/arr-diff/index.js","webpack://expect/./node_modules/arr-flatten/index.js","webpack://expect/./node_modules/arr-union/index.js","webpack://expect/./node_modules/array-unique/index.js","webpack://expect/./node_modules/assign-symbols/index.js","webpack://expect/./node_modules/base/index.js","webpack://expect/./node_modules/base/node_modules/define-property/index.js","webpack://expect/./node_modules/braces/index.js","webpack://expect/./node_modules/braces/lib/braces.js","webpack://expect/./node_modules/braces/lib/compilers.js","webpack://expect/./node_modules/braces/lib/parsers.js","webpack://expect/./node_modules/braces/lib/utils.js","webpack://expect/./node_modules/cache-base/index.js","webpack://expect/./node_modules/class-utils/index.js","webpack://expect/./node_modules/collection-visit/index.js","webpack://expect/./node_modules/color-convert/conversions.js","webpack://expect/./node_modules/color-convert/index.js","webpack://expect/./node_modules/color-convert/route.js","webpack://expect/./node_modules/color-name/index.js","webpack://expect/./node_modules/component-emitter/index.js","webpack://expect/./node_modules/copy-descriptor/index.js","webpack://expect/./node_modules/define-property/index.js","webpack://expect/./node_modules/define-property/node_modules/is-accessor-descriptor/index.js","webpack://expect/./node_modules/define-property/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js","webpack://expect/./node_modules/define-property/node_modules/is-data-descriptor/index.js","webpack://expect/./node_modules/define-property/node_modules/is-data-descriptor/node_modules/kind-of/index.js","webpack://expect/./node_modules/define-property/node_modules/is-descriptor/index.js","webpack://expect/./node_modules/define-property/node_modules/kind-of/index.js","webpack://expect/./node_modules/esutils/lib/ast.js","webpack://expect/./node_modules/esutils/lib/code.js","webpack://expect/./node_modules/esutils/lib/keyword.js","webpack://expect/./node_modules/esutils/lib/utils.js","webpack://expect/./node_modules/expand-brackets/index.js","webpack://expect/./node_modules/expand-brackets/lib/compilers.js","webpack://expect/./node_modules/expand-brackets/lib/parsers.js","webpack://expect/./node_modules/expand-brackets/lib/utils.js","webpack://expect/./node_modules/expand-brackets/node_modules/debug/src/browser.js","webpack://expect/./node_modules/expand-brackets/node_modules/debug/src/debug.js","webpack://expect/./node_modules/expand-brackets/node_modules/ms/index.js","webpack://expect/./node_modules/extend-shallow/index.js","webpack://expect/./node_modules/extglob/index.js","webpack://expect/./node_modules/extglob/lib/compilers.js","webpack://expect/./node_modules/extglob/lib/extglob.js","webpack://expect/./node_modules/extglob/lib/parsers.js","webpack://expect/./node_modules/extglob/lib/utils.js","webpack://expect/./node_modules/extglob/node_modules/define-property/index.js","webpack://expect/./node_modules/fill-range/index.js","webpack://expect/./node_modules/for-in/index.js","webpack://expect/./node_modules/fragment-cache/index.js","webpack://expect/./node_modules/get-value/index.js","webpack://expect/./node_modules/has-value/index.js","webpack://expect/./node_modules/has-values/index.js","webpack://expect/./node_modules/has-values/node_modules/kind-of/index.js","webpack://expect/./node_modules/inherits/inherits_browser.js","webpack://expect/./node_modules/is-accessor-descriptor/index.js","webpack://expect/./node_modules/is-accessor-descriptor/node_modules/kind-of/index.js","webpack://expect/./node_modules/is-buffer/index.js","webpack://expect/./node_modules/is-data-descriptor/index.js","webpack://expect/./node_modules/is-data-descriptor/node_modules/kind-of/index.js","webpack://expect/./node_modules/is-descriptor/index.js","webpack://expect/./node_modules/is-descriptor/node_modules/kind-of/index.js","webpack://expect/./node_modules/is-extendable/index.js","webpack://expect/./node_modules/is-number/index.js","webpack://expect/./node_modules/is-plain-object/index.js","webpack://expect/./node_modules/is-windows/index.js","webpack://expect/./node_modules/isarray/index.js","webpack://expect/./node_modules/isobject/index.js","webpack://expect/./node_modules/js-tokens/index.js","webpack://expect/./node_modules/kind-of/index.js","webpack://expect/./node_modules/map-cache/index.js","webpack://expect/./node_modules/map-visit/index.js","webpack://expect/./node_modules/micromatch/index.js","webpack://expect/./node_modules/micromatch/lib/cache.js","webpack://expect/./node_modules/micromatch/lib/compilers.js","webpack://expect/./node_modules/micromatch/lib/parsers.js","webpack://expect/./node_modules/micromatch/lib/utils.js","webpack://expect/./node_modules/micromatch/node_modules/define-property/index.js","webpack://expect/./node_modules/micromatch/node_modules/extend-shallow/index.js","webpack://expect/./node_modules/micromatch/node_modules/is-extendable/index.js","webpack://expect/./node_modules/micromatch/node_modules/kind-of/index.js","webpack://expect/./node_modules/mixin-deep/index.js","webpack://expect/./node_modules/mixin-deep/node_modules/is-extendable/index.js","webpack://expect/./node_modules/nanomatch/index.js","webpack://expect/./node_modules/nanomatch/lib/cache.js","webpack://expect/./node_modules/nanomatch/lib/compilers.js","webpack://expect/./node_modules/nanomatch/lib/parsers.js","webpack://expect/./node_modules/nanomatch/lib/utils.js","webpack://expect/./node_modules/nanomatch/node_modules/define-property/index.js","webpack://expect/./node_modules/nanomatch/node_modules/extend-shallow/index.js","webpack://expect/./node_modules/nanomatch/node_modules/is-extendable/index.js","webpack://expect/./node_modules/nanomatch/node_modules/kind-of/index.js","webpack://expect/./node_modules/object-copy/index.js","webpack://expect/./node_modules/object-visit/index.js","webpack://expect/./node_modules/object.pick/index.js","webpack://expect/./node_modules/pascalcase/index.js","webpack://expect/./node_modules/path-browserify/index.js","webpack://expect/./node_modules/posix-character-classes/index.js","webpack://expect/./node_modules/process/browser.js","webpack://expect/./node_modules/react-is/cjs/react-is.development.js","webpack://expect/./node_modules/react-is/index.js","webpack://expect/./node_modules/regex-not/index.js","webpack://expect/./node_modules/regex-not/node_modules/extend-shallow/index.js","webpack://expect/./node_modules/regex-not/node_modules/is-extendable/index.js","webpack://expect/./node_modules/repeat-element/index.js","webpack://expect/./node_modules/repeat-string/index.js","webpack://expect/./node_modules/resolve-url/resolve-url.js","webpack://expect/./node_modules/ret/lib/index.js","webpack://expect/./node_modules/ret/lib/positions.js","webpack://expect/./node_modules/ret/lib/sets.js","webpack://expect/./node_modules/ret/lib/types.js","webpack://expect/./node_modules/ret/lib/util.js","webpack://expect/./node_modules/safe-regex/index.js","webpack://expect/./node_modules/set-value/index.js","webpack://expect/./node_modules/setimmediate/setImmediate.js","webpack://expect/./node_modules/slash/index.js","webpack://expect/./node_modules/snapdragon-node/index.js","webpack://expect/./node_modules/snapdragon-node/node_modules/define-property/index.js","webpack://expect/./node_modules/snapdragon-util/index.js","webpack://expect/./node_modules/snapdragon/index.js","webpack://expect/./node_modules/snapdragon/lib/compiler.js","webpack://expect/./node_modules/snapdragon/lib/parser.js","webpack://expect/./node_modules/snapdragon/lib/position.js","webpack://expect/./node_modules/snapdragon/lib/source-maps.js","webpack://expect/./node_modules/snapdragon/lib/utils.js","webpack://expect/./node_modules/snapdragon/node_modules/debug/src/browser.js","webpack://expect/./node_modules/snapdragon/node_modules/debug/src/debug.js","webpack://expect/./node_modules/snapdragon/node_modules/ms/index.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/array-set.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/base64-vlq.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/base64.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/binary-search.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/mapping-list.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/quick-sort.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/source-map-consumer.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/source-map-generator.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/source-node.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/lib/util.js","webpack://expect/./node_modules/snapdragon/node_modules/source-map/source-map.js","webpack://expect/./node_modules/source-map-resolve/source-map-resolve.js","webpack://expect/./node_modules/source-map-url/source-map-url.js","webpack://expect/./node_modules/split-string/index.js","webpack://expect/./node_modules/split-string/node_modules/extend-shallow/index.js","webpack://expect/./node_modules/split-string/node_modules/is-extendable/index.js","webpack://expect/./node_modules/stack-utils/index.js","webpack://expect/./node_modules/static-extend/index.js","webpack://expect/./node_modules/timers-browserify/main.js","webpack://expect/./node_modules/to-object-path/index.js","webpack://expect/./node_modules/to-regex-range/index.js","webpack://expect/./node_modules/to-regex/index.js","webpack://expect/./node_modules/to-regex/node_modules/define-property/index.js","webpack://expect/./node_modules/to-regex/node_modules/extend-shallow/index.js","webpack://expect/./node_modules/to-regex/node_modules/is-extendable/index.js","webpack://expect/./node_modules/union-value/index.js","webpack://expect/./node_modules/union-value/node_modules/set-value/index.js","webpack://expect/./node_modules/unset-value/index.js","webpack://expect/./node_modules/unset-value/node_modules/has-value/index.js","webpack://expect/./node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js","webpack://expect/./node_modules/unset-value/node_modules/has-values/index.js","webpack://expect/./node_modules/use/index.js","webpack://expect/./node_modules/util/support/isBufferBrowser.js","webpack://expect/./node_modules/util/util.js","webpack://expect/(webpack)/buildin/global.js","webpack://expect/(webpack)/buildin/module.js","webpack://expect/./packages/diff-sequences/build/index.js","webpack://expect/./packages/expect/build/fakeChalk.js","webpack://expect/./packages/expect/src/asymmetricMatchers.ts","webpack://expect/./packages/expect/src/extractExpectedAssertionsErrors.ts","webpack://expect/./packages/expect/src/index.ts","webpack://expect/./packages/expect/src/jasmineUtils.ts","webpack://expect/./packages/expect/src/jestMatchersObject.ts","webpack://expect/./packages/expect/src/matchers.ts","webpack://expect/./packages/expect/src/print.ts","webpack://expect/./packages/expect/src/spyMatchers.ts","webpack://expect/./packages/expect/src/toThrowMatchers.ts","webpack://expect/./packages/expect/src/utils.ts","webpack://expect/./packages/jest-diff/build/constants.js","webpack://expect/./packages/jest-diff/build/diffStrings.js","webpack://expect/./packages/jest-diff/build/index.js","webpack://expect/./packages/jest-get-type/build/index.js","webpack://expect/./packages/jest-matcher-utils/build/index.js","webpack://expect/./packages/jest-message-util/build/index.js","webpack://expect/./packages/pretty-format/build/collections.js","webpack://expect/./packages/pretty-format/build/index.js","webpack://expect/./packages/pretty-format/build/plugins/AsymmetricMatcher.js","webpack://expect/./packages/pretty-format/build/plugins/ConvertAnsi.js","webpack://expect/./packages/pretty-format/build/plugins/DOMCollection.js","webpack://expect/./packages/pretty-format/build/plugins/DOMElement.js","webpack://expect/./packages/pretty-format/build/plugins/Immutable.js","webpack://expect/./packages/pretty-format/build/plugins/ReactElement.js","webpack://expect/./packages/pretty-format/build/plugins/ReactTestComponent.js","webpack://expect/./packages/pretty-format/build/plugins/lib/escapeHTML.js","webpack://expect/./packages/pretty-format/build/plugins/lib/markup.js"],"names":["Object","defineProperty","exports","value","codeFrameColumns","default","_default","_highlight","data","_interopRequireWildcard","require","obj","__esModule","newObj","key","prototype","hasOwnProperty","call","desc","getOwnPropertyDescriptor","get","set","deprecationWarningShown","getDefs","chalk","gutter","grey","marker","red","bold","message","NEWLINE","getMarkerLines","loc","source","opts","startLoc","assign","column","line","start","endLoc","end","linesAbove","linesBelow","startLine","startColumn","endLine","endColumn","Math","max","min","length","lineDiff","markerLines","i","lineNumber","sourceLength","rawLines","highlighted","highlightCode","forceColor","shouldHighlight","getChalk","defs","maybeHighlight","chalkFn","string","lines","split","hasColumns","numberMaxWidth","String","frame","slice","map","index","number","paddedNumber","hasMarker","lastMarkerLine","markerLine","Array","isArray","markerSpacing","replace","numberOfMarkers","repeat","join","reset","colNumber","process","emitWarning","deprecationError","Error","name","console","warn","location","highlight","_jsTokens","_esutils","_interopRequireDefault","_chalk","keyword","cyan","capitalized","yellow","jsx_tag","punctuator","magenta","green","regex","comment","invalid","white","bgRed","JSX_TAG","BRACKET","getTokenType","match","offset","text","token","matchToToken","type","isReservedWordES6","test","substr","toLowerCase","highlightTokens","args","colorize","str","options","supportsColor","constructor","enabled","level","code","module","onlyFirst","pattern","RegExp","undefined","colorConvert","wrapAnsi16","fn","apply","arguments","wrapAnsi256","wrapAnsi16m","rgb","assembleStyles","codes","Map","styles","modifier","dim","italic","underline","inverse","hidden","strikethrough","color","black","blue","gray","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgColor","bgBlack","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","keys","groupName","group","styleName","style","open","close","enumerable","ansi2ansi","n","rgb2rgb","r","g","b","ansi","ansi256","ansi16m","suite","ansi16","diff","arr","len","idx","diffArray","one","two","tlen","olen","ele","hasEle","val","push","flat","res","cur","union","init","TypeError","arg","j","indexOf","unique","splice","immutable","uniqueImmutable","arrLen","newArr","receiver","objects","Symbol","getOwnPropertySymbols","isEnumerable","propertyIsEnumerable","target","provider","names","util","define","CacheBase","Emitter","isObject","merge","pascal","cu","namespace","Cache","fns","Base","config","is","initBase","inherits","cache","_callbacks","visit","run","isRegistered","register","registered","emit","use","mixin","mixins","configurable","parent","base","prop","extend","Ctor","Parent","Child","inherit","bubble","isDescriptor","writable","toRegex","compilers","parsers","Braces","utils","MAX_LENGTH","braces","createKey","disabled","create","nodupes","expand","optimize","maxLength","isEmptySets","isQuotedString","proto","result","output","noempty","filter","Boolean","memoize","makeRe","strictErrors","parse","compile","ast","clearCache","Snapdragon","isInitialized","createOptions","snapdragon","compiler","parser","parsed","input","stack","addParent","pop","node","nodes","queue","isEscaped","count","escaped","negated","inner","last","arrayify","mapVisit","segs","multiplier","quantifiers","isQuantifier","isType","expanded","isOptimized","unescape","hasQueue","multiply","flatten","shift","prev","isLiteralBrace","noInner","hasEmpty","Node","pos","position","m","ch","consume","charAt","concatNodes","isInside","esc","isExtglobChar","brace","strict","lastNode","first","orig","a","simpleText","splitString","fillRange","id","bval","sep","keepQuotes","keepEscaping","escapeBrackets","rangeLimit","tok","stringifyArray","step","RangeError","brackets","parens","isString","escapeRegex","toPath","del","has","ctx","clear","method","staticExtend","isObj","nativeKeys","hasAll","values","noop","identity","hasConstructor","getOwnPropertyNames","getDescriptor","copyDescriptor","copy","omit","props","concat","events","on","bind","collection","cssKeywords","reverseKeywords","convert","channels","labels","hsl","hsv","hwb","cmyk","xyz","lab","lch","hex","hcg","apple","model","delta","h","s","l","rdif","gdif","bdif","v","diffc","c","w","y","k","comparativeDistance","x","pow","reversed","currentClosestDistance","Infinity","currentClosestKeyword","distance","z","t1","t2","t3","smin","lmin","sv","hi","floor","f","p","q","t","vmin","sl","wh","bl","ratio","y2","x2","z2","hr","atan2","PI","sqrt","cos","sin","round","mult","rem","integer","toString","toUpperCase","substring","colorString","char","parseInt","chroma","grayscale","hue","pure","mg","conversions","route","models","wrapRaw","wrappedFn","conversion","wrapRounded","forEach","fromModel","routes","routeModels","toModel","raw","buildGraph","graph","deriveBFS","current","adjacents","adjacent","unshift","link","from","to","wrapConversion","path","addEventListener","event","once","off","removeListener","removeAllListeners","removeEventListener","callbacks","cb","listeners","hasListeners","typeOf","accessor","isAccessorDescriptor","isBuffer","kindOf","Number","Function","Date","isDataDescriptor","isAccessor","isData","isExpression","isIterationStatement","isStatement","isSourceElement","trailingStatement","alternate","consequent","body","isProblematicIfStatement","ES6Regex","ES5Regex","NON_ASCII_WHITESPACES","IDENTIFIER_START","IDENTIFIER_PART","NonAsciiIdentifierStart","NonAsciiIdentifierPart","isDecimalDigit","isHexDigit","isOctalDigit","isWhiteSpace","isLineTerminator","fromCodePoint","cp","fromCharCode","cu1","cu2","isIdentifierStartES5","isIdentifierPartES5","isIdentifierStartES6","isIdentifierPartES6","isStrictModeReservedWordES6","isKeywordES5","isKeywordES6","isReservedWordES5","isRestrictedWord","isIdentifierNameES5","iz","charCodeAt","decodeUtf16","lead","trail","isIdentifierNameES6","lowCh","check","isIdentifierES5","isIdentifierES6","debug","__filename","isMatch","matcher","failglob","nonull","nullglob","re","posix","isNegated","TEXT_REGEX","not","createRegex","state","sets","bracket","capture","inside","insideBracket","next","rest","regexNot","cached","include","contains","strictClose","log","formatArgs","save","load","useColors","storage","chrome","local","localstorage","colors","window","document","documentElement","WebkitAppearance","firebug","exception","table","navigator","userAgent","$1","formatters","JSON","stringify","err","humanize","lastC","namespaces","removeItem","e","env","DEBUG","enable","localStorage","createDebug","coerce","disable","skips","prevTime","selectColor","hash","abs","self","curr","ms","format","formatter","logFn","d","isNaN","long","fmtLong","fmtShort","exec","parseFloat","plural","ceil","o","hasOwn","Extglob","extglob","list","matches","strictOpen","ext","SyntaxError","__data__","star","prefix","bash","hasSlash","slash","patterns","sibling","loose","paren","metachar","isNumber","stop","toNumber","transform","isValidNumber","strictRanges","isValid","inspect","isPadded","toRange","zero","greater","lesser","asc","zeros","toSequence","dash","pad","isValidLetter","forIn","thisArg","MapCache","FragmentCache","caches","cacheName","hasValues","hasValue","size","ctor","superCtor","super_","TempCtor","isGeneratorFn","isArguments","isDate","isError","isRegexp","ctorName","isGeneratorObj","stackTraceLimit","toDateString","getDate","setDate","flags","ignoreCase","multiline","global","throw","return","callee","isSlowBuffer","_isBuffer","readFloatLE","isExtendable","num","trim","isObjectObject","isPlainObject","prot","factory","isWindows","platform","OSTYPE","closed","mapSet","mapGet","mapHas","mapDelete","micromatch","keep","unixify","ignore","isEmptyString","equals","equalsPattern","some","every","any","all","containsPattern","matchBase","basename","matchKeys","pick","compose","hasSpecialChars","nocase","matchPath","matchBasename","ast_array","nobrace","braceExpand","instantiate","matchers","file","nanomatch","escape","qmark","plus","dot","noext","escapeExtglobs","TEXT","createNotRegex","textRegex","notRegex","notStr","toPosixPath","stripPrefix","isSlash","_equals","filepath","unixPath","_contains","equal","lower","isobject","Reflect","assignSymbols","toObject","isEnum","mixinDeep","matcherFn","wrap","nonegate","dotfiles","addQmark","leadingGlobstar","before","after","prior","isStart","NOT_REGEX","createTextRegex","slashes","paths","addPrefix","quote","advanceTo","bos","append","noglobstar","globstar","starRe","endChar","advance","isRegex","combineDupes","stripDrive","fp","isSimpleChar","pascalcase","_","normalizeArray","parts","allowAboveRoot","up","splitPathRe","splitPath","filename","resolve","resolvedPath","resolvedAbsolute","cwd","normalize","isAbsolute","trailingSlash","relative","fromParts","toParts","samePartsLength","outputParts","delimiter","dirname","root","dir","extname","xs","alnum","alpha","ascii","blank","cntrl","digit","print","punct","space","upper","word","xdigit","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","setTimeout","clearTimeout","runTimeout","fun","runClearTimeout","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","timeout","nextTick","Item","array","title","browser","argv","version","versions","addListener","prependListener","prependOnceListener","binding","chdir","umask","hasSymbol","for","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","isValidElementType","$$typeof","lowPriorityWarning","printWarning","_len","_key","argIndex","condition","_len2","_key2","lowPriorityWarning$1","object","$$typeofType","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","hasWarnedAboutDeprecatedIsAsyncMode","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","safe","strictNegate","resolveUrl","numUrls","createElement","href","head","getElementsByTagName","insertBefore","firstChild","resolved","removeChild","types","positions","regexpStr","ROOT","lastGroup","groupStack","repeatErr","error","strToChars","wordBoundary","nonWordBoundary","words","notWords","ints","notInts","whitespace","notWhitespace","REFERENCE","CHAR","begin","classTokens","tokenizeClass","SET","anyChar","GROUP","remember","followedBy","notFollowedBy","rs","REPETITION","POSITION","INTS","RANGE","WORDS","WHITESPACE","NOTANYCHAR","CTRL","SLSH","chars_regex","lbs","a16","b16","c8","dctrl","eslsh","tokens","regexp","lastIndex","msg","replimit","limit","isRegExp","reps","walk","starHeight","ok","setImmediate","nextHandle","tasksByHandle","currentlyRunningATask","doc","registerImmediate","callback","task","clearImmediate","handle","runIfPresent","installNextTickImplementation","canUsePostMessage","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","installPostMessageImplementation","messagePrefix","random","onGlobalMessage","attachEvent","installMessageChannelImplementation","channel","MessageChannel","port1","port2","installReadyStateChangeImplementation","html","script","onreadystatechange","appendChild","installSetTimeoutImplementation","attachTo","getPrototypeOf","isExtendedLengthPath","hasNonAscii","ownNames","lazyKeys","isNode","isEmpty","assert","remove","find","findNode","hasType","siblings","isScope","scope","toNoop","isFunction","addOpen","unshiftNode","addClose","pushNode","wrapNodes","popNode","shiftNode","removeNode","firstOfType","isOpen","isClose","hasOpen","hasClose","hasOpenAndClose","addType","removeType","child","isInsideType","Compiler","Parser","regexCache","compiled","reason","silent","errors","parsingErrors","sourcemap","sourcemaps","applySourceMaps","toJSON","Position","currentType","setCount","updatePosition","lastIndexOf","capturePair","openRegex","closeRegex","specialChars","suffix","eos","visited","hasDelims","fs","SourceMap","SourceMapGenerator","content","files","addMapping","generated","original","addContent","addFile","setSourceContent","inputSourcemaps","originalMap","sourceMapResolve","resolveSync","readFileSync","SourceMapConsumer","relativeTo","sourcesRelativeTo","applySourceMap","_comment","hasNativeMap","ArraySet","_array","_set","fromArray","ArraySet_fromArray","aArray","aAllowDuplicates","add","ArraySet_size","ArraySet_add","aStr","sStr","toSetString","isDuplicate","ArraySet_has","ArraySet_indexOf","at","ArraySet_at","aIdx","toArray","ArraySet_toArray","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","encode","base64VLQ_encode","encoded","vlq","decode","base64VLQ_decode","aIndex","aOutParam","strLen","continuation","intToCharMap","charCode","bigA","bigZ","littleA","littleZ","nine","littleOffset","numberOffset","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","recursiveSearch","aLow","aHigh","aNeedle","aHaystack","aCompare","aBias","mid","cmp","search","generatedPositionAfter","mappingA","mappingB","lineA","generatedLine","lineB","columnA","generatedColumn","columnB","compareByGeneratedPositionsInflated","MappingList","_sorted","_last","unsortedForEach","MappingList_forEach","aCallback","aThisArg","MappingList_add","aMapping","MappingList_toArray","sort","swap","ary","temp","randomIntInRange","low","high","doQuickSort","comparator","pivotIndex","pivot","quickSort","binarySearch","base64VLQ","aSourceMap","sourceMap","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","fromSourceMap","_version","__generatedMappings","_parseMappings","_mappings","sourceRoot","__originalMappings","_charIsMappingSeparator","SourceMapConsumer_charIsMappingSeparator","SourceMapConsumer_parseMappings","aSourceRoot","GENERATED_ORDER","ORIGINAL_ORDER","eachMapping","SourceMapConsumer_eachMapping","aContext","aOrder","context","order","mappings","_generatedMappings","_originalMappings","mapping","_sources","originalLine","originalColumn","_names","allGeneratedPositionsFor","SourceMapConsumer_allGeneratedPositionsFor","aArgs","getArg","needle","_findMapping","compareByOriginalPositions","lastColumn","sources","sourcesContent","consumer","SourceMapConsumer_fromSourceMap","smc","_sourceRoot","_generateSourcesContent","_file","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","Mapping","previousGeneratedColumn","previousOriginalLine","previousOriginalColumn","previousSource","previousName","cachedSegments","originalMappings","segment","compareByGeneratedPositionsDeflated","SourceMapConsumer_findMapping","aMappings","aLineName","aColumnName","aComparator","computeColumnSpans","SourceMapConsumer_computeColumnSpans","nextMapping","lastGeneratedColumn","originalPositionFor","SourceMapConsumer_originalPositionFor","hasContentsOfAllSources","BasicSourceMapConsumer_hasContentsOfAllSources","sc","sourceContentFor","SourceMapConsumer_sourceContentFor","aSource","nullOnMissing","url","urlParse","fileUriAbsPath","scheme","generatedPositionFor","SourceMapConsumer_generatedPositionFor","lastOffset","_sections","offsetLine","offsetColumn","generatedOffset","IndexedSourceMapConsumer_originalPositionFor","sectionIndex","section","bias","IndexedSourceMapConsumer_hasContentsOfAllSources","IndexedSourceMapConsumer_sourceContentFor","IndexedSourceMapConsumer_generatedPositionFor","generatedPosition","ret","IndexedSourceMapConsumer_parseMappings","sectionMappings","adjustedMapping","_skipValidation","_sourcesContents","SourceMapGenerator_fromSourceMap","aSourceMapConsumer","generator","newMapping","sourceFile","SourceMapGenerator_addMapping","_validateMapping","SourceMapGenerator_setSourceContent","aSourceFile","aSourceContent","SourceMapGenerator_applySourceMap","aSourceMapPath","newSources","newNames","SourceMapGenerator_validateMapping","aGenerated","aOriginal","aName","_serializeMappings","SourceMapGenerator_serializeMappings","previousGeneratedLine","nameIdx","sourceIdx","SourceMapGenerator_generateSourcesContent","aSources","SourceMapGenerator_toJSON","SourceMapGenerator_toString","REGEX_NEWLINE","NEWLINE_CODE","isSourceNode","SourceNode","aLine","aColumn","aChunks","children","sourceContents","fromStringWithSourceMap","SourceNode_fromStringWithSourceMap","aGeneratedCode","aRelativePath","remainingLines","remainingLinesIndex","shiftNextLine","lineContents","getNextLine","newLine","lastGeneratedLine","lastMapping","addMappingWithCode","nextLine","SourceNode_add","aChunk","chunk","prepend","SourceNode_prepend","SourceNode_walk","aFn","SourceNode_join","aSep","newChildren","replaceRight","SourceNode_replaceRight","aPattern","aReplacement","lastChild","SourceNode_setSourceContent","walkSourceContents","SourceNode_walkSourceContents","fromSetString","SourceNode_toString","toStringWithSourceMap","SourceNode_toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent","aDefaultValue","urlRegexp","dataUrlRegexp","aUrl","auth","host","port","urlGenerate","aParsedUrl","aPath","part","aRoot","aPathUrl","aRootUrl","joined","supportsNullProto","isProtoString","onlyCompareOriginal","onlyCompareGenerated","strcmp","aStr1","aStr2","sourceMappingURL","callbackAsync","parseMapToJSON","sourceMapData","readSync","read","readUrl","resolveSourceMap","codeUrl","mapData","resolveSourceMapHelper","resolveSourceMapSync","dataUriRegex","jsonMimeTypeRegex","getFrom","dataUri","mimeType","lastParameter","atob","decodeURIComponent","mapUrl","resolveSources","pending","sourcesResolved","done","resolveSourcesHelper","fullUrl","resolveSourcesSync","endingSlash","_resolveSources","innerRegex","_innerRegex","existsIn","removeFrom","quotes","closeIdx","expected","getClosingQuote","keepDoubleQuotes","keepSingleQuotes","StackUtils","_cwd","_internals","internals","_wrapCallSite","wrapCallSite","nodeInternals","natives","clean","outdent","lastNonAtLine","st","isInternal","internal","isAtLine","captureString","limitBefore","captureStackTrace","prepBefore","prepareStackTrace","site","getLineNumber","getColumnNumber","_setFile","getFileName","isConstructor","isEval","evalOrigin","getEvalOrigin","isNative","native","typename","getTypeName","er","fname","getFunctionName","function","meth","getMethodName","methodRe","parseLine","evalFile","evalLine","evalCol","lnum","col","closeParen","closes","methodMatch","evalColumn","bound","extendFn","Timeout","setInterval","clearInterval","clearFn","_id","_clearFn","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","onTimeout","_onTimeout","toRegexRange","relax","relaxZeros","shorthand","padding","positives","negatives","maxLen","newMin","newMax","splitToPatterns","siftPatterns","neg","onlyNegative","filterPatterns","onlyPositive","intersected","subpatterns","splitToRanges","nines","stops","countNines","countZeros","compare","rangeToPattern","digits","zipped","zip","numbers","startDigit","stopDigit","toCharacterClass","ranges","range","toQuantifier","padZeros","comparison","intersection","negate","originalOptions","createdOptions","unionValue","unset","noZero","app","hook","plugin","fill","readUInt8","getOwnPropertyDescriptors","descriptors","formatRegExp","isNull","deprecate","noDeprecation","warned","deprecated","throwDeprecation","traceDeprecation","trace","debugs","debugEnviron","debuglog","isUndefined","NODE_DEBUG","pid","seen","stylize","stylizeNoColor","depth","isBoolean","showHidden","_extend","customInspect","stylizeWithColor","formatValue","styleType","arrayToHash","recurseTimes","primitive","formatPrimitive","visibleKeys","formatError","toUTCString","formatArray","formatProperty","reduceToSingleString","simple","numLinesEst","reduce","ar","isNullOrUndefined","isSymbol","objectToString","isPrimitive","months","timestamp","time","getHours","getMinutes","getSeconds","getMonth","origin","kCustomPromisifiedSymbol","promisify","promiseResolve","promiseReject","promise","Promise","reject","setPrototypeOf","defineProperties","custom","callbackifyOnRejected","newReason","callbackify","callbackified","maybeCb","then","rej","webpackPolyfill","pkg","NOT_YET_SET","countCommonItemsF","aEnd","bIndex","bEnd","isCommon","nCommon","countCommonItemsR","aStart","bStart","extendPathsF","bF","aIndexesF","iMaxF","iF","kF","aFirst","aIndexPrev1","nF","extendPathsR","bR","aIndexesR","iMaxR","iR","kR","nR","extendOverlappablePathsF","division","aLength","bLength","baDeltaLength","kMinOverlapF","kMaxOverlapF","insert","aLastPrev","bFirst","nCommonF","aLast","bLastPrev","nCommonR","aIndexPrevFirst","bIndexPrevFirst","aEndPreceding","bEndPreceding","nChangePreceding","nCommonPreceding","aCommonPreceding","bCommonPreceding","nCommonFollowing","aCommonFollowing","bCommonFollowing","aStartFollowing","bStartFollowing","nChangeFollowing","extendOverlappablePathsR","kMinOverlapR","kMaxOverlapR","bLast","divide","nChange","dMin","dMax","findSubsequences","transposed","_callbacks$","foundSubsequence","_foundSubsequence","_x","_x2","_x3","bCommon","aCommon","_isCommon","_x4","_x5","tStart","tEnd","validateLength","isSafeInteger","validateCallback","nCommonFR","_ansiStyles","returnInput","allColorsAsFunc","acc","AsymmetricMatcher","sample","Any","other","Anything","ArrayContaining","another","ObjectContaining","property","StringContaining","includes","StringMatching","expectedObject","anything","arrayContaining","arrayNotContaining","objectContaining","objectNotContaining","stringContaining","stringNotContaining","stringMatching","stringNotMatching","resetAssertionsLocalState","assertionCalls","expectedAssertionsNumber","isExpectingAssertions","extractExpectedAssertionsErrors","expectedAssertionsNumberError","isExpectingAssertionsError","numOfAssertionsExpected","isDirectExpectCall","actual","received","JestAssertionError","isPromise","createToThrowErrorMatchingSnapshotMatcher","testNameOrInlineSnapshot","getPromiseMatcher","expect","allMatchers","expectation","rejects","resolves","promiseMatcher","makeThrowingMatcher","makeResolveMatcher","makeRejectMatcher","getMessage","matcherUtils","RECEIVED_COLOR","matcherName","isNot","outerErr","matcherErrorMessage","matcherHint","printWithType","printReceived","innerErr","throwingMatcher","throws","iterableEquality","subsetEquality","matcherContext","dontThrow","processResult","asyncError","_validateResult","pass","matcherResult","suppressedErrors","handlError","INTERNAL_MATCHER_FLAG","potentialResult","asyncResult","aResult","catch","syncResult","assertions","hasAssertions","ensureNoExpected","spyMatchers","toThrowMatchers","addSnapshotSerializer","getState","setState","expectExport","customTesters","strictCheck","eq","hasKey","hasDefinedKey","functionToString","isAsymmetric","isA","asymmetricMatch","asymmetricA","asymmetricB","aStack","bStack","asymmetricResult","customTesterResult","className","isDomNode","isEqualNode","aKeys","allKeys","symbol","extraKeys","typeName","nodeType","nodeName","fnNameFor","func","getPrototype","hasProperty","IS_KEYED_SENTINEL","IS_SET_SENTINEL","IS_ORDERED_SENTINEL","isImmutableUnorderedKeyed","maybeKeyed","isImmutableUnorderedSet","maybeSet","JEST_MATCHERS_OBJECT","getMatchers","setMatchers","CustomMatcher","EXPECTED_LABEL","RECEIVED_LABEL","EXPECTED_VALUE_LABEL","RECEIVED_VALUE_LABEL","toStrictEqualTesters","typeEquality","sparseArrayEquality","toBe","expectedType","deepEqualityName","toBeCloseTo","precision","secondArgument","expectedDiff","receivedDiff","toBeDefined","toBeFalsy","toBeGreaterThan","toBeGreaterThanOrEqual","toBeInstanceOf","printExpected","toBeLessThan","toBeLessThanOrEqual","toBeNaN","toBeNull","toBeTruthy","toBeUndefined","toContain","labelExpected","labelReceived","printLabel","indexable","findIndex","SUGGEST_TO_CONTAIN_EQUAL","toContainEqual","toEqual","toHaveLength","labelReceivedLength","labelReceivedValue","toHaveProperty","expectedPath","expectedValue","expectedArgument","expectedPathType","expectedPathLength","lastTraversedObject","hasEndProp","receivedPath","traversedPath","hasCompletePath","receivedValue","toMatch","toMatchObject","toStrictEqual","printSubstring","printReceivedStringContainExpectedSubstring","printReceivedStringContainExpectedResult","printReceivedArrayContainExpectedItem","stringified","shouldPrintDiff","receivedType","printDiffOrStringify","expectedLabel","receivedLabel","difference","aAnnotation","bAnnotation","printExpectedConstructorName","label","printConstructorName","printExpectedConstructorNameNot","printReceivedConstructorName","printReceivedConstructorNameNot","isExpected","CALL_PRINT_LIMIT","RETURN_PRINT_LIMIT","LAST_CALL_PRINT_LIMIT","createToBeCalledMatcher","ensureMock","receivedIsSpy","isSpy","receivedName","getMockName","identifier","calls","mock","formatReceivedCalls","sameSentence","createToReturnMatcher","returnValues","results","getPrintedReturnValues","createToBeCalledTimesMatcher","createToReturnTimesMatcher","returnResults","createToBeCalledWithMatcher","fail","formatMismatchedCalls","createToReturnWithMatcher","formatMismatchedReturnValues","createLastCalledWithMatcher","createLastReturnedMatcher","lastResult","createNthCalledWithMatcher","nth","nthToString","createNthReturnedWithMatcher","nthResult","nthString","lastCalledWith","lastReturnedWith","nthCalledWith","nthReturnedWith","toBeCalled","toBeCalledTimes","toBeCalledWith","toHaveBeenCalled","toHaveBeenCalledTimes","toHaveBeenCalledWith","toHaveBeenLastCalledWith","toHaveBeenNthCalledWith","toHaveLastReturnedWith","toHaveNthReturnedWith","toHaveReturned","toHaveReturnedTimes","toHaveReturnedWith","toReturn","toReturnTimes","toReturnWith","spy","mockOrSpy","_isMockFunction","getPrintedCalls","but","printedCalls","formatMismatchedArgs","printedArgs","oneline","diffString","DID_NOT_THROW","getThrown","hasMessage","createMatcher","fromPromise","thrown","placeholder","toThrow","toThrowExpectedClass","toThrowExpectedString","toThrowExpectedRegExp","toThrowExpectedAsymmetric","toThrowExpectedObject","toThrowError","formatExpected","formatReceived","formatStack","rootDir","testMatch","noStackTrace","hasGetterFromConstructor","descriptor","getPath","propertyPath","lastProp","newObject","getObjectSubset","subset","sub","trimmed","IteratorSymbol","iterator","hasIterator","iterableEqualityWithStack","allFound","bValue","isEqual","aEntry","bEntry","matchedKey","matchedValue","bIterator","nextB","isObjectWithKeys","bKeys","partition","items","predicate","emptyObject","MULTILINE_REGEXP","isOneline","SIMILAR_MESSAGE","NO_DIFF_MESSAGE","_diffSequences","_constants","DIFF_CONTEXT_DEFAULT","fgPatchMark","fgDelete","fgInsert","fgCommon","fgIndent","bgCommon","bgInverse","highlightTrailingSpaces","highlightLeadingTrailingSpaces","getHighlightSpaces","bothEdges","getAnnotation","formatDelete","aLinesUn","aLinesIn","put","highlightSpaces","aLineUn","aLineIn","indentation","formatInsert","bLinesUn","bLinesIn","bLineUn","bLineIn","formatCommon","bLineInLength","hasSameIndentation","fg","bg","diffExpand","createPatchMark","getContextLines","contextLines","diffNoExpand","nContextLines","iPatchMark","isAtEnd","nContextLines2","aStartCommon","bStartCommon","aEndCommon","bEndCommon","nLines","maxContextLines","_prettyFormat","_jestGetType","_diffStrings","_objectSpread","ownKeys","sym","_defineProperty","_prettyFormat$plugins","plugins","DOMCollection","DOMElement","Immutable","ReactElement","ReactTestComponent","PLUGINS","FORMAT_OPTIONS","FORMAT_OPTIONS_0","indent","FALLBACK_FORMAT_OPTIONS","callToJSON","maxDepth","FALLBACK_FORMAT_OPTIONS_0","aType","omitDifference","getExpectedType","comparePrimitive","compareObjects","sortMap","sortSet","entries","Set","diffMessage","hasThrown","getType","_jestDiff","DiffOptions","getLabelPrinter","pluralize","ensureExpectedIsNonNegativeInteger","ensureNumbers","ensureExpectedIsNumber","ensureActualIsNumber","highlightTrailingWhitespace","DIM_COLOR","BOLD_WEIGHT","INVERTED_COLOR","EXPECTED_COLOR","NUMBERS","matcherString","strings","hint","generic","specific","_options$comment","_options$isDirectExpe","_options$isNot","_options$promise","_options$secondArgume","dimString","_types","Frame","separateMessageFromStack","formatResultsErrors","formatStackTrace","getTopFrame","getStackTraceLines","formatExecError","_fs","_path","_micromatch","_slash","_codeFrame","_stackUtils","jestReadFile","stackUtils","PATH_NODE_MODULES","PATH_JEST_PACKAGES","JASMINE_IGNORE","JEST_INTERNALS_IGNORE","ANONYMOUS_FN_IGNORE","ANONYMOUS_PROMISE_IGNORE","ANONYMOUS_GENERATOR_IGNORE","NATIVE_NEXT_IGNORE","TITLE_INDENT","MESSAGE_INDENT","STACK_INDENT","ANCESTRY_SEPARATOR","TITLE_BULLET","STACK_TRACE_COLOR","STACK_PATH_REGEXP","EXEC_ERROR_MESSAGE","NOT_EMPTY_LINE_REGEXP","indentAllLines","trimPaths","getRenderedCallsite","fileContent","renderedCallsite","testPath","reuseMessage","separated","messageToUse","removeInternalStackEntries","pathCounter","formatPaths","relativeTestPath","filePath","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","_step","parsedFrame","topFrame","stacktrace","testResults","failedResults","failureMessages","_separateMessageFromS","ancestorTitles","messageMatch","printIteratorEntries","printIteratorValues","printListItems","printObjectProperties","getKeysOfEnumerableProperties","refs","printer","separator","spacingOuter","indentationNext","spacingInner","_collections","_AsymmetricMatcher","_ConvertAnsi","_DOMCollection","_DOMElement","_Immutable","_ReactElement","_ReactTestComponent","toISOString","errorToString","regExpToString","symbolToString","getConstructorName","isWindow","SYMBOL_REGEXP","NEWLINE_REGEXP","PrettyFormatPluginError","isToStringedArrayType","toStringed","printNumber","printBigInt","printFunction","printFunctionName","printSymbol","printError","printBasicValue","escapeString","printComplexValue","hasCalledToJSON","hitMaxDepth","isNewPlugin","serialize","printPlugin","printed","valChild","edgeSpacing","spacing","findPlugin","basicResult","DEFAULT_THEME","tag","DEFAULT_THEME_KEYS","DEFAULT_OPTIONS","theme","validateOptions","getColorsHighlight","getColorsEmpty","getPrintFunctionName","getEscapeRegex","getEscapeString","getConfig","createIndent","prettyFormat","ConvertAnsi","asymmetricMatcher","SPACE","stringedValue","toAsymmetricMatcher","_ansiRegex","toHumanReadableAnsi","OBJECT_NAMES","ARRAY_REGEXP","testName","propsReducer","attribute","_markup","ELEMENT_NODE","TEXT_NODE","COMMENT_NODE","FRAGMENT_NODE","ELEMENT_REGEXP","testNode","nodeIsText","nodeIsComment","nodeIsFragment","printText","printComment","tagName","printElementAsLeaf","printElement","printProps","attributes","attr","printChildren","childNodes","IS_ITERABLE_SENTINEL","IS_LIST_SENTINEL","IS_MAP_SENTINEL","IS_RECORD_SENTINEL","IS_SEQ_SENTINEL","IS_STACK_SENTINEL","getImmutableName","printAsLeaf","LAZY","printImmutableEntries","getRecordEntries","_keys","printImmutableRecord","_name","printImmutableSeq","_iter","_object","_collection","_iterable","printImmutableValues","ReactIs","getChildren","element","displayName","functionName","render","getPropKeys","testSymbol","escapeHTML","_escapeHTML","contentColor","commentColor","printedProps","printedChildren","tagColor"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AClFA,+CAAa;;AAEbA,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EAA6C;AAC3CC,OAAK,EAAE;AADoC,CAA7C;AAGAD,OAAO,CAACE,gBAAR,GAA2BA,gBAA3B;AACAF,OAAO,CAACG,OAAR,GAAkBC,QAAlB;;AAEA,SAASC,UAAT,GAAsB;AACpB,MAAMC,IAAI,GAAGC,uBAAuB,CAACC,mBAAO,CAAC,sEAAD,CAAR,CAApC;;AAEAH,YAAU,GAAG,sBAAY;AACvB,WAAOC,I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,GAAxB,GAA8B,EAA9B,GAAmC,GAApC,IAA2C,GAlB/C,IAmBA,GAnBA,GAoBA0xE,QAAQ,CAACxoE,KArBX;AAuBD,CA/BD;;AAiCAnM,OAAO,CAACmyE,YAAR,GAAuBA,YAAvB;;AAEA,IAAMD,kBAAkB,GAAG,SAArBA,kBAAqB,CAACvqE,IAAD,EAAOsI,MAAP,EAAkB;AAC3C,MAAM0kE,QAAQ,GAAG1kE,MAAM,CAACyW,MAAP,CAAckpD,GAA/B;AACA,SACE+E,QAAQ,CAACzoE,IAAT,GACA,GADA,GAEAvE,IAFA,GAGAgtE,QAAQ,CAACxoE,KAHT,GAIA,IAJA,GAKAwoE,QAAQ,CAACzoE,IALT,GAMA,KANA,GAOAyoE,QAAQ,CAACxoE,KARX;AAUD,CAZD;;AAcAnM,OAAO,CAACkyE,kBAAR,GAA6BA,kBAA7B,C","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"expect\"] = factory();\n\telse\n\t\troot[\"expect\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./packages/expect/src/index.ts\");\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\n\nfunction _highlight() {\n const data = _interopRequireWildcard(require(\"@babel/highlight\"));\n\n _highlight = function () {\n return data;\n };\n\n return data;\n}\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nlet deprecationWarningShown = false;\n\nfunction getDefs(chalk) {\n return {\n gutter: chalk.grey,\n marker: chalk.red.bold,\n message: chalk.red.bold\n };\n}\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return {\n start,\n end,\n markerLines\n };\n}\n\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts);\n const chalk = (0, _highlight().getChalk)(opts);\n const defs = getDefs(chalk);\n\n const maybeHighlight = (chalkFn, string) => {\n return highlighted ? chalkFn(string) : string;\n };\n\n if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts);\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n let frame = lines.slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} | `;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n\n if (hasMarker) {\n let markerLine = \"\";\n\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")), markerSpacing, maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers)].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n\n return [maybeHighlight(defs.marker, \">\"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${line}`;\n }\n }).join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (highlighted) {\n return chalk.reset(frame);\n } else {\n return frame;\n }\n}\n\nfunction _default(rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.shouldHighlight = shouldHighlight;\nexports.getChalk = getChalk;\nexports.default = highlight;\n\nfunction _jsTokens() {\n const data = _interopRequireWildcard(require(\"js-tokens\"));\n\n _jsTokens = function () {\n return data;\n };\n\n return data;\n}\n\nfunction _esutils() {\n const data = _interopRequireDefault(require(\"esutils\"));\n\n _esutils = function () {\n return data;\n };\n\n return data;\n}\n\nfunction _chalk() {\n const data = _interopRequireDefault(require(\"chalk\"));\n\n _chalk = function () {\n return data;\n };\n\n return data;\n}\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nfunction getDefs(chalk) {\n return {\n keyword: chalk.cyan,\n capitalized: chalk.yellow,\n jsx_tag: chalk.yellow,\n punctuator: chalk.yellow,\n number: chalk.magenta,\n string: chalk.green,\n regex: chalk.magenta,\n comment: chalk.grey,\n invalid: chalk.white.bgRed.bold\n };\n}\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nconst JSX_TAG = /^[a-z][\\w-]*$/i;\nconst BRACKET = /^[()[\\]{}]$/;\n\nfunction getTokenType(match) {\n const [offset, text] = match.slice(-2);\n const token = (0, _jsTokens().matchToToken)(match);\n\n if (token.type === \"name\") {\n if (_esutils().default.keyword.isReservedWordES6(token.value)) {\n return \"keyword\";\n }\n\n if (JSX_TAG.test(token.value) && (text[offset - 1] === \"<\" || text.substr(offset - 2, 2) == \"</\")) {\n return \"jsx_tag\";\n }\n\n if (token.value[0] !== token.value[0].toLowerCase()) {\n return \"capitalized\";\n }\n }\n\n if (token.type === \"punctuator\" && BRACKET.test(token.value)) {\n return \"bracket\";\n }\n\n if (token.type === \"invalid\" && (token.value === \"@\" || token.value === \"#\")) {\n return \"punctuator\";\n }\n\n return token.type;\n}\n\nfunction highlightTokens(defs, text) {\n return text.replace(_jsTokens().default, function (...args) {\n const type = getTokenType(args);\n const colorize = defs[type];\n\n if (colorize) {\n return args[0].split(NEWLINE).map(str => colorize(str)).join(\"\\n\");\n } else {\n return args[0];\n }\n });\n}\n\nfunction shouldHighlight(options) {\n return _chalk().default.supportsColor || options.forceColor;\n}\n\nfunction getChalk(options) {\n let chalk = _chalk().default;\n\n if (options.forceColor) {\n chalk = new (_chalk().default.constructor)({\n enabled: true,\n level: 1\n });\n }\n\n return chalk;\n}\n\nfunction highlight(code, options = {}) {\n if (shouldHighlight(options)) {\n const chalk = getChalk(options);\n const defs = getDefs(chalk);\n return highlightTokens(defs, code);\n } else {\n return code;\n }\n}","'use strict';\n\nmodule.exports = options => {\n\toptions = Object.assign({\n\t\tonlyFirst: false\n\t}, options);\n\n\tconst pattern = [\n\t\t'[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:[a-zA-Z\\\\d]*(?:;[a-zA-Z\\\\d]*)*)?\\\\u0007)',\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, options.onlyFirst ? undefined : 'g');\n};\n","'use strict';\nconst colorConvert = require('color-convert');\n\nconst wrapAnsi16 = (fn, offset) => function () {\n\tconst code = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => function () {\n\tconst code = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => function () {\n\tconst rgb = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\t\t\tgray: [90, 39],\n\n\t\t\t// Bright color\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Fix humans\n\tstyles.color.grey = styles.color.gray;\n\n\tfor (const groupName of Object.keys(styles)) {\n\t\tconst group = styles[groupName];\n\n\t\tfor (const styleName of Object.keys(group)) {\n\t\t\tconst style = group[styleName];\n\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\n\t\tObject.defineProperty(styles, 'codes', {\n\t\t\tvalue: codes,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tconst ansi2ansi = n => n;\n\tconst rgb2rgb = (r, g, b) => [r, g, b];\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = {\n\t\tansi: wrapAnsi16(ansi2ansi, 0)\n\t};\n\tstyles.color.ansi256 = {\n\t\tansi256: wrapAnsi256(ansi2ansi, 0)\n\t};\n\tstyles.color.ansi16m = {\n\t\trgb: wrapAnsi16m(rgb2rgb, 0)\n\t};\n\n\tstyles.bgColor.ansi = {\n\t\tansi: wrapAnsi16(ansi2ansi, 10)\n\t};\n\tstyles.bgColor.ansi256 = {\n\t\tansi256: wrapAnsi256(ansi2ansi, 10)\n\t};\n\tstyles.bgColor.ansi16m = {\n\t\trgb: wrapAnsi16m(rgb2rgb, 10)\n\t};\n\n\tfor (let key of Object.keys(colorConvert)) {\n\t\tif (typeof colorConvert[key] !== 'object') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst suite = colorConvert[key];\n\n\t\tif (key === 'ansi16') {\n\t\t\tkey = 'ansi';\n\t\t}\n\n\t\tif ('ansi16' in suite) {\n\t\t\tstyles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);\n\t\t\tstyles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);\n\t\t}\n\n\t\tif ('ansi256' in suite) {\n\t\t\tstyles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);\n\t\t\tstyles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);\n\t\t}\n\n\t\tif ('rgb' in suite) {\n\t\t\tstyles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);\n\t\t\tstyles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);\n\t\t}\n\t}\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","/*!\n * arr-diff <https://github.com/jonschlinkert/arr-diff>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function diff(arr/*, arrays*/) {\n var len = arguments.length;\n var idx = 0;\n while (++idx < len) {\n arr = diffArray(arr, arguments[idx]);\n }\n return arr;\n};\n\nfunction diffArray(one, two) {\n if (!Array.isArray(two)) {\n return one.slice();\n }\n\n var tlen = two.length\n var olen = one.length;\n var idx = -1;\n var arr = [];\n\n while (++idx < olen) {\n var ele = one[idx];\n\n var hasEle = false;\n for (var i = 0; i < tlen; i++) {\n var val = two[i];\n\n if (ele === val) {\n hasEle = true;\n break;\n }\n }\n\n if (hasEle === false) {\n arr.push(ele);\n }\n }\n return arr;\n}\n","/*!\n * arr-flatten <https://github.com/jonschlinkert/arr-flatten>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function (arr) {\n return flat(arr, []);\n};\n\nfunction flat(arr, res) {\n var i = 0, cur;\n var len = arr.length;\n for (; i < len; i++) {\n cur = arr[i];\n Array.isArray(cur) ? flat(cur, res) : res.push(cur);\n }\n return res;\n}\n","'use strict';\n\nmodule.exports = function union(init) {\n if (!Array.isArray(init)) {\n throw new TypeError('arr-union expects the first argument to be an array.');\n }\n\n var len = arguments.length;\n var i = 0;\n\n while (++i < len) {\n var arg = arguments[i];\n if (!arg) continue;\n\n if (!Array.isArray(arg)) {\n arg = [arg];\n }\n\n for (var j = 0; j < arg.length; j++) {\n var ele = arg[j];\n\n if (init.indexOf(ele) >= 0) {\n continue;\n }\n init.push(ele);\n }\n }\n return init;\n};\n","/*!\n * array-unique <https://github.com/jonschlinkert/array-unique>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function unique(arr) {\n if (!Array.isArray(arr)) {\n throw new TypeError('array-unique expects an array.');\n }\n\n var len = arr.length;\n var i = -1;\n\n while (i++ < len) {\n var j = i + 1;\n\n for (; j < arr.length; ++j) {\n if (arr[i] === arr[j]) {\n arr.splice(j--, 1);\n }\n }\n }\n return arr;\n};\n\nmodule.exports.immutable = function uniqueImmutable(arr) {\n if (!Array.isArray(arr)) {\n throw new TypeError('array-unique expects an array.');\n }\n\n var arrLen = arr.length;\n var newArr = new Array(arrLen);\n\n for (var i = 0; i < arrLen; i++) {\n newArr[i] = arr[i];\n }\n\n return module.exports(newArr);\n};\n","/*!\n * assign-symbols <https://github.com/jonschlinkert/assign-symbols>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function(receiver, objects) {\n if (receiver === null || typeof receiver === 'undefined') {\n throw new TypeError('expected first argument to be an object.');\n }\n\n if (typeof objects === 'undefined' || typeof Symbol === 'undefined') {\n return receiver;\n }\n\n if (typeof Object.getOwnPropertySymbols !== 'function') {\n return receiver;\n }\n\n var isEnumerable = Object.prototype.propertyIsEnumerable;\n var target = Object(receiver);\n var len = arguments.length, i = 0;\n\n while (++i < len) {\n var provider = Object(arguments[i]);\n var names = Object.getOwnPropertySymbols(provider);\n\n for (var j = 0; j < names.length; j++) {\n var key = names[j];\n\n if (isEnumerable.call(provider, key)) {\n target[key] = provider[key];\n }\n }\n }\n return target;\n};\n","'use strict';\n\nvar util = require('util');\nvar define = require('define-property');\nvar CacheBase = require('cache-base');\nvar Emitter = require('component-emitter');\nvar isObject = require('isobject');\nvar merge = require('mixin-deep');\nvar pascal = require('pascalcase');\nvar cu = require('class-utils');\n\n/**\n * Optionally define a custom `cache` namespace to use.\n */\n\nfunction namespace(name) {\n var Cache = name ? CacheBase.namespace(name) : CacheBase;\n var fns = [];\n\n /**\n * Create an instance of `Base` with the given `config` and `options`.\n *\n * ```js\n * // initialize with `config` and `options`\n * var app = new Base({isApp: true}, {abc: true});\n * app.set('foo', 'bar');\n *\n * // values defined with the given `config` object will be on the root of the instance\n * console.log(app.baz); //=> undefined\n * console.log(app.foo); //=> 'bar'\n * // or use `.get`\n * console.log(app.get('isApp')); //=> true\n * console.log(app.get('foo')); //=> 'bar'\n *\n * // values defined with the given `options` object will be on `app.options\n * console.log(app.options.abc); //=> true\n * ```\n *\n * @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation.\n * @param {Object} `options` If supplied, this object is used to initialize the `base.options` object.\n * @api public\n */\n\n function Base(config, options) {\n if (!(this instanceof Base)) {\n return new Base(config, options);\n }\n Cache.call(this, config);\n this.is('base');\n this.initBase(config, options);\n }\n\n /**\n * Inherit cache-base\n */\n\n util.inherits(Base, Cache);\n\n /**\n * Add static emitter methods\n */\n\n Emitter(Base);\n\n /**\n * Initialize `Base` defaults with the given `config` object\n */\n\n Base.prototype.initBase = function(config, options) {\n this.options = merge({}, this.options, options);\n this.cache = this.cache || {};\n this.define('registered', {});\n if (name) this[name] = {};\n\n // make `app._callbacks` non-enumerable\n this.define('_callbacks', this._callbacks);\n if (isObject(config)) {\n this.visit('set', config);\n }\n Base.run(this, 'use', fns);\n };\n\n /**\n * Set the given `name` on `app._name` and `app.is*` properties. Used for doing\n * lookups in plugins.\n *\n * ```js\n * app.is('foo');\n * console.log(app._name);\n * //=> 'foo'\n * console.log(app.isFoo);\n * //=> true\n * app.is('bar');\n * console.log(app.isFoo);\n * //=> true\n * console.log(app.isBar);\n * //=> true\n * console.log(app._name);\n * //=> 'bar'\n * ```\n * @name .is\n * @param {String} `name`\n * @return {Boolean}\n * @api public\n */\n\n Base.prototype.is = function(name) {\n if (typeof name !== 'string') {\n throw new TypeError('expected name to be a string');\n }\n this.define('is' + pascal(name), true);\n this.define('_name', name);\n this.define('_appname', name);\n return this;\n };\n\n /**\n * Returns true if a plugin has already been registered on an instance.\n *\n * Plugin implementors are encouraged to use this first thing in a plugin\n * to prevent the plugin from being called more than once on the same\n * instance.\n *\n * ```js\n * var base = new Base();\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin')) return;\n * // do stuff to `app`\n * });\n *\n * // to also record the plugin as being registered\n * base.use(function(app) {\n * if (app.isRegistered('myPlugin', true)) return;\n * // do stuff to `app`\n * });\n * ```\n * @name .isRegistered\n * @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.\n * @param {String} `name` The plugin name.\n * @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument.\n * @return {Boolean} Returns true if a plugin is already registered.\n * @api public\n */\n\n Base.prototype.isRegistered = function(name, register) {\n if (this.registered.hasOwnProperty(name)) {\n return true;\n }\n if (register !== false) {\n this.registered[name] = true;\n this.emit('plugin', name);\n }\n return false;\n };\n\n /**\n * Define a plugin function to be called immediately upon init. Plugins are chainable\n * and expose the following arguments to the plugin function:\n *\n * - `app`: the current instance of `Base`\n * - `base`: the [first ancestor instance](#base) of `Base`\n *\n * ```js\n * var app = new Base()\n * .use(foo)\n * .use(bar)\n * .use(baz)\n * ```\n * @name .use\n * @param {Function} `fn` plugin function to call\n * @return {Object} Returns the item instance for chaining.\n * @api public\n */\n\n Base.prototype.use = function(fn) {\n fn.call(this, this);\n return this;\n };\n\n /**\n * The `.define` method is used for adding non-enumerable property on the instance.\n * Dot-notation is **not supported** with `define`.\n *\n * ```js\n * // arbitrary `render` function using lodash `template`\n * app.define('render', function(str, locals) {\n * return _.template(str)(locals);\n * });\n * ```\n * @name .define\n * @param {String} `key` The name of the property to define.\n * @param {any} `value`\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n Base.prototype.define = function(key, val) {\n if (isObject(key)) {\n return this.visit('define', key);\n }\n define(this, key, val);\n return this;\n };\n\n /**\n * Mix property `key` onto the Base prototype. If base is inherited using\n * `Base.extend` this method will be overridden by a new `mixin` method that will\n * only add properties to the prototype of the inheriting application.\n *\n * ```js\n * app.mixin('foo', function() {\n * // do stuff\n * });\n * ```\n * @name .mixin\n * @param {String} `key`\n * @param {Object|Array} `val`\n * @return {Object} Returns the `base` instance for chaining.\n * @api public\n */\n\n Base.prototype.mixin = function(key, val) {\n Base.prototype[key] = val;\n return this;\n };\n\n /**\n * Non-enumberable mixin array, used by the static [Base.mixin]() method.\n */\n\n Base.prototype.mixins = Base.prototype.mixins || [];\n\n /**\n * Getter/setter used when creating nested instances of `Base`, for storing a reference\n * to the first ancestor instance. This works by setting an instance of `Base` on the `parent`\n * property of a \"child\" instance. The `base` property defaults to the current instance if\n * no `parent` property is defined.\n *\n * ```js\n * // create an instance of `Base`, this is our first (\"base\") instance\n * var first = new Base();\n * first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later\n *\n * // create another instance\n * var second = new Base();\n * // create a reference to the first instance (`first`)\n * second.parent = first;\n *\n * // create another instance\n * var third = new Base();\n * // create a reference to the previous instance (`second`)\n * // repeat this pattern every time a \"child\" instance is created\n * third.parent = second;\n *\n * // we can always access the first instance using the `base` property\n * console.log(first.base.foo);\n * //=> 'bar'\n * console.log(second.base.foo);\n * //=> 'bar'\n * console.log(third.base.foo);\n * //=> 'bar'\n * // and now you know how to get to third base ;)\n * ```\n * @name .base\n * @api public\n */\n\n Object.defineProperty(Base.prototype, 'base', {\n configurable: true,\n get: function() {\n return this.parent ? this.parent.base : this;\n }\n });\n\n /**\n * Static method for adding global plugin functions that will\n * be added to an instance when created.\n *\n * ```js\n * Base.use(function(app) {\n * app.foo = 'bar';\n * });\n * var app = new Base();\n * console.log(app.foo);\n * //=> 'bar'\n * ```\n * @name #use\n * @param {Function} `fn` Plugin function to use on each instance.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'use', function(fn) {\n fns.push(fn);\n return Base;\n });\n\n /**\n * Run an array of functions by passing each function\n * to a method on the given object specified by the given property.\n *\n * @param {Object} `obj` Object containing method to use.\n * @param {String} `prop` Name of the method on the object to use.\n * @param {Array} `arr` Array of functions to pass to the method.\n */\n\n define(Base, 'run', function(obj, prop, arr) {\n var len = arr.length, i = 0;\n while (len--) {\n obj[prop](arr[i++]);\n }\n return Base;\n });\n\n /**\n * Static method for inheriting the prototype and static methods of the `Base` class.\n * This method greatly simplifies the process of creating inheritance-based applications.\n * See [static-extend][] for more details.\n *\n * ```js\n * var extend = cu.extend(Parent);\n * Parent.extend(Child);\n *\n * // optional methods\n * Parent.extend(Child, {\n * foo: function() {},\n * bar: function() {}\n * });\n * ```\n * @name #extend\n * @param {Function} `Ctor` constructor to extend\n * @param {Object} `methods` Optional prototype properties to mix in.\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) {\n Ctor.prototype.mixins = Ctor.prototype.mixins || [];\n\n define(Ctor, 'mixin', function(fn) {\n var mixin = fn(Ctor.prototype, Ctor);\n if (typeof mixin === 'function') {\n Ctor.prototype.mixins.push(mixin);\n }\n return Ctor;\n });\n\n define(Ctor, 'mixins', function(Child) {\n Base.run(Child, 'mixin', Ctor.prototype.mixins);\n return Ctor;\n });\n\n Ctor.prototype.mixin = function(key, value) {\n Ctor.prototype[key] = value;\n return this;\n };\n return Base;\n }));\n\n /**\n * Used for adding methods to the `Base` prototype, and/or to the prototype of child instances.\n * When a mixin function returns a function, the returned function is pushed onto the `.mixins`\n * array, making it available to be used on inheriting classes whenever `Base.mixins()` is\n * called (e.g. `Base.mixins(Child)`).\n *\n * ```js\n * Base.mixin(function(proto) {\n * proto.foo = function(msg) {\n * return 'foo ' + msg;\n * };\n * });\n * ```\n * @name #mixin\n * @param {Function} `fn` Function to call\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixin', function(fn) {\n var mixin = fn(Base.prototype, Base);\n if (typeof mixin === 'function') {\n Base.prototype.mixins.push(mixin);\n }\n return Base;\n });\n\n /**\n * Static method for running global mixin functions against a child constructor.\n * Mixins must be registered before calling this method.\n *\n * ```js\n * Base.extend(Child);\n * Base.mixins(Child);\n * ```\n * @name #mixins\n * @param {Function} `Child` Constructor function of a child class\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'mixins', function(Child) {\n Base.run(Child, 'mixin', Base.prototype.mixins);\n return Base;\n });\n\n /**\n * Similar to `util.inherit`, but copies all static properties, prototype properties, and\n * getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details.\n *\n * ```js\n * Base.inherit(Foo, Bar);\n * ```\n * @name #inherit\n * @param {Function} `Receiver` Receiving (child) constructor\n * @param {Function} `Provider` Providing (parent) constructor\n * @return {Object} Returns the `Base` constructor for chaining\n * @api public\n */\n\n define(Base, 'inherit', cu.inherit);\n define(Base, 'bubble', cu.bubble);\n return Base;\n}\n\n/**\n * Expose `Base` with default settings\n */\n\nmodule.exports = namespace();\n\n/**\n * Allow users to define a namespace\n */\n\nmodule.exports.namespace = namespace;\n","/*!\n * define-property <https://github.com/jonschlinkert/define-property>\n *\n * Copyright (c) 2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isDescriptor = require('is-descriptor');\n\nmodule.exports = function defineProperty(obj, prop, val) {\n if (typeof obj !== 'object' && typeof obj !== 'function') {\n throw new TypeError('expected an object or function.');\n }\n\n if (typeof prop !== 'string') {\n throw new TypeError('expected `prop` to be a string.');\n }\n\n if (isDescriptor(val) && ('set' in val || 'get' in val)) {\n return Object.defineProperty(obj, prop, val);\n }\n\n return Object.defineProperty(obj, prop, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: val\n });\n};\n","'use strict';\n\n/**\n * Module dependencies\n */\n\nvar toRegex = require('to-regex');\nvar unique = require('array-unique');\nvar extend = require('extend-shallow');\n\n/**\n * Local dependencies\n */\n\nvar compilers = require('./lib/compilers');\nvar parsers = require('./lib/parsers');\nvar Braces = require('./lib/braces');\nvar utils = require('./lib/utils');\nvar MAX_LENGTH = 1024 * 64;\nvar cache = {};\n\n/**\n * Convert the given `braces` pattern into a regex-compatible string. By default, only one string is generated for every input string. Set `options.expand` to true to return an array of patterns (similar to Bash or minimatch. Before using `options.expand`, it's recommended that you read the [performance notes](#performance)).\n *\n * ```js\n * var braces = require('braces');\n * console.log(braces('{a,b,c}'));\n * //=> ['(a|b|c)']\n *\n * console.log(braces('{a,b,c}', {expand: true}));\n * //=> ['a', 'b', 'c']\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\nfunction braces(pattern, options) {\n var key = utils.createKey(String(pattern), options);\n var arr = [];\n\n var disabled = options && options.cache === false;\n if (!disabled && cache.hasOwnProperty(key)) {\n return cache[key];\n }\n\n if (Array.isArray(pattern)) {\n for (var i = 0; i < pattern.length; i++) {\n arr.push.apply(arr, braces.create(pattern[i], options));\n }\n } else {\n arr = braces.create(pattern, options);\n }\n\n if (options && options.nodupes === true) {\n arr = unique(arr);\n }\n\n if (!disabled) {\n cache[key] = arr;\n }\n return arr;\n}\n\n/**\n * Expands a brace pattern into an array. This method is called by the main [braces](#braces) function when `options.expand` is true. Before using this method it's recommended that you read the [performance notes](#performance)) and advantages of using [.optimize](#optimize) instead.\n *\n * ```js\n * var braces = require('braces');\n * console.log(braces.expand('a/{b,c}/d'));\n * //=> ['a/b/d', 'a/c/d'];\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.expand = function(pattern, options) {\n return braces.create(pattern, extend({}, options, {expand: true}));\n};\n\n/**\n * Expands a brace pattern into a regex-compatible, optimized string. This method is called by the main [braces](#braces) function by default.\n *\n * ```js\n * var braces = require('braces');\n * console.log(braces.expand('a/{b,c}/d'));\n * //=> ['a/(b|c)/d']\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.optimize = function(pattern, options) {\n return braces.create(pattern, options);\n};\n\n/**\n * Processes a brace pattern and returns either an expanded array (if `options.expand` is true), a highly optimized regex-compatible string. This method is called by the main [braces](#braces) function.\n *\n * ```js\n * var braces = require('braces');\n * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))\n * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.create = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected a string');\n }\n\n var maxLength = (options && options.maxLength) || MAX_LENGTH;\n if (pattern.length >= maxLength) {\n throw new Error('expected pattern to be less than ' + maxLength + ' characters');\n }\n\n function create() {\n if (pattern === '' || pattern.length < 3) {\n return [pattern];\n }\n\n if (utils.isEmptySets(pattern)) {\n return [];\n }\n\n if (utils.isQuotedString(pattern)) {\n return [pattern.slice(1, -1)];\n }\n\n var proto = new Braces(options);\n var result = !options || options.expand !== true\n ? proto.optimize(pattern, options)\n : proto.expand(pattern, options);\n\n // get the generated pattern(s)\n var arr = result.output;\n\n // filter out empty strings if specified\n if (options && options.noempty === true) {\n arr = arr.filter(Boolean);\n }\n\n // filter out duplicates if specified\n if (options && options.nodupes === true) {\n arr = unique(arr);\n }\n\n Object.defineProperty(arr, 'result', {\n enumerable: false,\n value: result\n });\n\n return arr;\n }\n\n return memoize('create', pattern, options, create);\n};\n\n/**\n * Create a regular expression from the given string `pattern`.\n *\n * ```js\n * var braces = require('braces');\n *\n * console.log(braces.makeRe('id-{200..300}'));\n * //=> /^(?:id-(20[0-9]|2[1-9][0-9]|300))$/\n * ```\n * @param {String} `pattern` The pattern to convert to regex.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\nbraces.makeRe = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected a string');\n }\n\n var maxLength = (options && options.maxLength) || MAX_LENGTH;\n if (pattern.length >= maxLength) {\n throw new Error('expected pattern to be less than ' + maxLength + ' characters');\n }\n\n function makeRe() {\n var arr = braces(pattern, options);\n var opts = extend({strictErrors: false}, options);\n return toRegex(arr, opts);\n }\n\n return memoize('makeRe', pattern, options, makeRe);\n};\n\n/**\n * Parse the given `str` with the given `options`.\n *\n * ```js\n * var braces = require('braces');\n * var ast = braces.parse('a/{b,c}/d');\n * console.log(ast);\n * // { type: 'root',\n * // errors: [],\n * // input: 'a/{b,c}/d',\n * // nodes:\n * // [ { type: 'bos', val: '' },\n * // { type: 'text', val: 'a/' },\n * // { type: 'brace',\n * // nodes:\n * // [ { type: 'brace.open', val: '{' },\n * // { type: 'text', val: 'b,c' },\n * // { type: 'brace.close', val: '}' } ] },\n * // { type: 'text', val: '/d' },\n * // { type: 'eos', val: '' } ] }\n * ```\n * @param {String} `pattern` Brace pattern to parse\n * @param {Object} `options`\n * @return {Object} Returns an AST\n * @api public\n */\n\nbraces.parse = function(pattern, options) {\n var proto = new Braces(options);\n return proto.parse(pattern, options);\n};\n\n/**\n * Compile the given `ast` or string with the given `options`.\n *\n * ```js\n * var braces = require('braces');\n * var ast = braces.parse('a/{b,c}/d');\n * console.log(braces.compile(ast));\n * // { options: { source: 'string' },\n * // state: {},\n * // compilers:\n * // { eos: [Function],\n * // noop: [Function],\n * // bos: [Function],\n * // brace: [Function],\n * // 'brace.open': [Function],\n * // text: [Function],\n * // 'brace.close': [Function] },\n * // output: [ 'a/(b|c)/d' ],\n * // ast:\n * // { ... },\n * // parsingErrors: [] }\n * ```\n * @param {Object|String} `ast` AST from [.parse](#parse). If a string is passed it will be parsed first.\n * @param {Object} `options`\n * @return {Object} Returns an object that has an `output` property with the compiled string.\n * @api public\n */\n\nbraces.compile = function(ast, options) {\n var proto = new Braces(options);\n return proto.compile(ast, options);\n};\n\n/**\n * Clear the regex cache.\n *\n * ```js\n * braces.clearCache();\n * ```\n * @api public\n */\n\nbraces.clearCache = function() {\n cache = braces.cache = {};\n};\n\n/**\n * Memoize a generated regex or function. A unique key is generated\n * from the method name, pattern, and user-defined options. Set\n * options.memoize to false to disable.\n */\n\nfunction memoize(type, pattern, options, fn) {\n var key = utils.createKey(type + ':' + pattern, options);\n var disabled = options && options.cache === false;\n if (disabled) {\n braces.clearCache();\n return fn(pattern, options);\n }\n\n if (cache.hasOwnProperty(key)) {\n return cache[key];\n }\n\n var res = fn(pattern, options);\n cache[key] = res;\n return res;\n}\n\n/**\n * Expose `Braces` constructor and methods\n * @type {Function}\n */\n\nbraces.Braces = Braces;\nbraces.compilers = compilers;\nbraces.parsers = parsers;\nbraces.cache = cache;\n\n/**\n * Expose `braces`\n * @type {Function}\n */\n\nmodule.exports = braces;\n","'use strict';\n\nvar extend = require('extend-shallow');\nvar Snapdragon = require('snapdragon');\nvar compilers = require('./compilers');\nvar parsers = require('./parsers');\nvar utils = require('./utils');\n\n/**\n * Customize Snapdragon parser and renderer\n */\n\nfunction Braces(options) {\n this.options = extend({}, options);\n}\n\n/**\n * Initialize braces\n */\n\nBraces.prototype.init = function(options) {\n if (this.isInitialized) return;\n this.isInitialized = true;\n var opts = utils.createOptions({}, this.options, options);\n this.snapdragon = this.options.snapdragon || new Snapdragon(opts);\n this.compiler = this.snapdragon.compiler;\n this.parser = this.snapdragon.parser;\n\n compilers(this.snapdragon, opts);\n parsers(this.snapdragon, opts);\n\n /**\n * Call Snapdragon `.parse` method. When AST is returned, we check to\n * see if any unclosed braces are left on the stack and, if so, we iterate\n * over the stack and correct the AST so that compilers are called in the correct\n * order and unbalance braces are properly escaped.\n */\n\n utils.define(this.snapdragon, 'parse', function(pattern, options) {\n var parsed = Snapdragon.prototype.parse.apply(this, arguments);\n this.parser.ast.input = pattern;\n\n var stack = this.parser.stack;\n while (stack.length) {\n addParent({type: 'brace.close', val: ''}, stack.pop());\n }\n\n function addParent(node, parent) {\n utils.define(node, 'parent', parent);\n parent.nodes.push(node);\n }\n\n // add non-enumerable parser reference\n utils.define(parsed, 'parser', this.parser);\n return parsed;\n });\n};\n\n/**\n * Decorate `.parse` method\n */\n\nBraces.prototype.parse = function(ast, options) {\n if (ast && typeof ast === 'object' && ast.nodes) return ast;\n this.init(options);\n return this.snapdragon.parse(ast, options);\n};\n\n/**\n * Decorate `.compile` method\n */\n\nBraces.prototype.compile = function(ast, options) {\n if (typeof ast === 'string') {\n ast = this.parse(ast, options);\n } else {\n this.init(options);\n }\n return this.snapdragon.compile(ast, options);\n};\n\n/**\n * Expand\n */\n\nBraces.prototype.expand = function(pattern) {\n var ast = this.parse(pattern, {expand: true});\n return this.compile(ast, {expand: true});\n};\n\n/**\n * Optimize\n */\n\nBraces.prototype.optimize = function(pattern) {\n var ast = this.parse(pattern, {optimize: true});\n return this.compile(ast, {optimize: true});\n};\n\n/**\n * Expose `Braces`\n */\n\nmodule.exports = Braces;\n","'use strict';\n\nvar utils = require('./utils');\n\nmodule.exports = function(braces, options) {\n braces.compiler\n\n /**\n * bos\n */\n\n .set('bos', function() {\n if (this.output) return;\n this.ast.queue = isEscaped(this.ast) ? [this.ast.val] : [];\n this.ast.count = 1;\n })\n\n /**\n * Square brackets\n */\n\n .set('bracket', function(node) {\n var close = node.close;\n var open = !node.escaped ? '[' : '\\\\[';\n var negated = node.negated;\n var inner = node.inner;\n\n inner = inner.replace(/\\\\(?=[\\\\\\w]|$)/g, '\\\\\\\\');\n if (inner === ']-') {\n inner = '\\\\]\\\\-';\n }\n\n if (negated && inner.indexOf('.') === -1) {\n inner += '.';\n }\n if (negated && inner.indexOf('/') === -1) {\n inner += '/';\n }\n\n var val = open + negated + inner + close;\n var queue = node.parent.queue;\n var last = utils.arrayify(queue.pop());\n\n queue.push(utils.join(last, val));\n queue.push.apply(queue, []);\n })\n\n /**\n * Brace\n */\n\n .set('brace', function(node) {\n node.queue = isEscaped(node) ? [node.val] : [];\n node.count = 1;\n return this.mapVisit(node.nodes);\n })\n\n /**\n * Open\n */\n\n .set('brace.open', function(node) {\n node.parent.open = node.val;\n })\n\n /**\n * Inner\n */\n\n .set('text', function(node) {\n var queue = node.parent.queue;\n var escaped = node.escaped;\n var segs = [node.val];\n\n if (node.optimize === false) {\n options = utils.extend({}, options, {optimize: false});\n }\n\n if (node.multiplier > 1) {\n node.parent.count *= node.multiplier;\n }\n\n if (options.quantifiers === true && utils.isQuantifier(node.val)) {\n escaped = true;\n\n } else if (node.val.length > 1) {\n if (isType(node.parent, 'brace') && !isEscaped(node)) {\n var expanded = utils.expand(node.val, options);\n segs = expanded.segs;\n\n if (expanded.isOptimized) {\n node.parent.isOptimized = true;\n }\n\n // if nothing was expanded, we probably have a literal brace\n if (!segs.length) {\n var val = (expanded.val || node.val);\n if (options.unescape !== false) {\n // unescape unexpanded brace sequence/set separators\n val = val.replace(/\\\\([,.])/g, '$1');\n // strip quotes\n val = val.replace(/[\"'`]/g, '');\n }\n\n segs = [val];\n escaped = true;\n }\n }\n\n } else if (node.val === ',') {\n if (options.expand) {\n node.parent.queue.push(['']);\n segs = [''];\n } else {\n segs = ['|'];\n }\n } else {\n escaped = true;\n }\n\n if (escaped && isType(node.parent, 'brace')) {\n if (node.parent.nodes.length <= 4 && node.parent.count === 1) {\n node.parent.escaped = true;\n } else if (node.parent.length <= 3) {\n node.parent.escaped = true;\n }\n }\n\n if (!hasQueue(node.parent)) {\n node.parent.queue = segs;\n return;\n }\n\n var last = utils.arrayify(queue.pop());\n if (node.parent.count > 1 && options.expand) {\n last = multiply(last, node.parent.count);\n node.parent.count = 1;\n }\n\n queue.push(utils.join(utils.flatten(last), segs.shift()));\n queue.push.apply(queue, segs);\n })\n\n /**\n * Close\n */\n\n .set('brace.close', function(node) {\n var queue = node.parent.queue;\n var prev = node.parent.parent;\n var last = prev.queue.pop();\n var open = node.parent.open;\n var close = node.val;\n\n if (open && close && isOptimized(node, options)) {\n open = '(';\n close = ')';\n }\n\n // if a close brace exists, and the previous segment is one character\n // don't wrap the result in braces or parens\n var ele = utils.last(queue);\n if (node.parent.count > 1 && options.expand) {\n ele = multiply(queue.pop(), node.parent.count);\n node.parent.count = 1;\n queue.push(ele);\n }\n\n if (close && typeof ele === 'string' && ele.length === 1) {\n open = '';\n close = '';\n }\n\n if ((isLiteralBrace(node, options) || noInner(node)) && !node.parent.hasEmpty) {\n queue.push(utils.join(open, queue.pop() || ''));\n queue = utils.flatten(utils.join(queue, close));\n }\n\n if (typeof last === 'undefined') {\n prev.queue = [queue];\n } else {\n prev.queue.push(utils.flatten(utils.join(last, queue)));\n }\n })\n\n /**\n * eos\n */\n\n .set('eos', function(node) {\n if (this.input) return;\n\n if (options.optimize !== false) {\n this.output = utils.last(utils.flatten(this.ast.queue));\n } else if (Array.isArray(utils.last(this.ast.queue))) {\n this.output = utils.flatten(this.ast.queue.pop());\n } else {\n this.output = utils.flatten(this.ast.queue);\n }\n\n if (node.parent.count > 1 && options.expand) {\n this.output = multiply(this.output, node.parent.count);\n }\n\n this.output = utils.arrayify(this.output);\n this.ast.queue = [];\n });\n\n};\n\n/**\n * Multiply the segments in the current brace level\n */\n\nfunction multiply(queue, n, options) {\n return utils.flatten(utils.repeat(utils.arrayify(queue), n));\n}\n\n/**\n * Return true if `node` is escaped\n */\n\nfunction isEscaped(node) {\n return node.escaped === true;\n}\n\n/**\n * Returns true if regex parens should be used for sets. If the parent `type`\n * is not `brace`, then we're on a root node, which means we should never\n * expand segments and open/close braces should be `{}` (since this indicates\n * a brace is missing from the set)\n */\n\nfunction isOptimized(node, options) {\n if (node.parent.isOptimized) return true;\n return isType(node.parent, 'brace')\n && !isEscaped(node.parent)\n && options.expand !== true;\n}\n\n/**\n * Returns true if the value in `node` should be wrapped in a literal brace.\n * @return {Boolean}\n */\n\nfunction isLiteralBrace(node, options) {\n return isEscaped(node.parent) || options.optimize !== false;\n}\n\n/**\n * Returns true if the given `node` does not have an inner value.\n * @return {Boolean}\n */\n\nfunction noInner(node, type) {\n if (node.parent.queue.length === 1) {\n return true;\n }\n var nodes = node.parent.nodes;\n return nodes.length === 3\n && isType(nodes[0], 'brace.open')\n && !isType(nodes[1], 'text')\n && isType(nodes[2], 'brace.close');\n}\n\n/**\n * Returns true if the given `node` is the given `type`\n * @return {Boolean}\n */\n\nfunction isType(node, type) {\n return typeof node !== 'undefined' && node.type === type;\n}\n\n/**\n * Returns true if the given `node` has a non-empty queue.\n * @return {Boolean}\n */\n\nfunction hasQueue(node) {\n return Array.isArray(node.queue) && node.queue.length;\n}\n","'use strict';\n\nvar Node = require('snapdragon-node');\nvar utils = require('./utils');\n\n/**\n * Braces parsers\n */\n\nmodule.exports = function(braces, options) {\n braces.parser\n .set('bos', function() {\n if (!this.parsed) {\n this.ast = this.nodes[0] = new Node(this.ast);\n }\n })\n\n /**\n * Character parsers\n */\n\n .set('escape', function() {\n var pos = this.position();\n var m = this.match(/^(?:\\\\(.)|\\$\\{)/);\n if (!m) return;\n\n var prev = this.prev();\n var last = utils.last(prev.nodes);\n\n var node = pos(new Node({\n type: 'text',\n multiplier: 1,\n val: m[0]\n }));\n\n if (node.val === '\\\\\\\\') {\n return node;\n }\n\n if (node.val === '${') {\n var str = this.input;\n var idx = -1;\n var ch;\n\n while ((ch = str[++idx])) {\n this.consume(1);\n node.val += ch;\n if (ch === '\\\\') {\n node.val += str[++idx];\n continue;\n }\n if (ch === '}') {\n break;\n }\n }\n }\n\n if (this.options.unescape !== false) {\n node.val = node.val.replace(/\\\\([{}])/g, '$1');\n }\n\n if (last.val === '\"' && this.input.charAt(0) === '\"') {\n last.val = node.val;\n this.consume(1);\n return;\n }\n\n return concatNodes.call(this, pos, node, prev, options);\n })\n\n /**\n * Brackets: \"[...]\" (basic, this is overridden by\n * other parsers in more advanced implementations)\n */\n\n .set('bracket', function() {\n var isInside = this.isInside('brace');\n var pos = this.position();\n var m = this.match(/^(?:\\[([!^]?)([^\\]]{2,}|\\]-)(\\]|[^*+?]+)|\\[)/);\n if (!m) return;\n\n var prev = this.prev();\n var val = m[0];\n var negated = m[1] ? '^' : '';\n var inner = m[2] || '';\n var close = m[3] || '';\n\n if (isInside && prev.type === 'brace') {\n prev.text = prev.text || '';\n prev.text += val;\n }\n\n var esc = this.input.slice(0, 2);\n if (inner === '' && esc === '\\\\]') {\n inner += esc;\n this.consume(2);\n\n var str = this.input;\n var idx = -1;\n var ch;\n\n while ((ch = str[++idx])) {\n this.consume(1);\n if (ch === ']') {\n close = ch;\n break;\n }\n inner += ch;\n }\n }\n\n return pos(new Node({\n type: 'bracket',\n val: val,\n escaped: close !== ']',\n negated: negated,\n inner: inner,\n close: close\n }));\n })\n\n /**\n * Empty braces (we capture these early to\n * speed up processing in the compiler)\n */\n\n .set('multiplier', function() {\n var isInside = this.isInside('brace');\n var pos = this.position();\n var m = this.match(/^\\{((?:,|\\{,+\\})+)\\}/);\n if (!m) return;\n\n this.multiplier = true;\n var prev = this.prev();\n var val = m[0];\n\n if (isInside && prev.type === 'brace') {\n prev.text = prev.text || '';\n prev.text += val;\n }\n\n var node = pos(new Node({\n type: 'text',\n multiplier: 1,\n match: m,\n val: val\n }));\n\n return concatNodes.call(this, pos, node, prev, options);\n })\n\n /**\n * Open\n */\n\n .set('brace.open', function() {\n var pos = this.position();\n var m = this.match(/^\\{(?!(?:[^\\\\}]?|,+)\\})/);\n if (!m) return;\n\n var prev = this.prev();\n var last = utils.last(prev.nodes);\n\n // if the last parsed character was an extglob character\n // we need to _not optimize_ the brace pattern because\n // it might be mistaken for an extglob by a downstream parser\n if (last && last.val && isExtglobChar(last.val.slice(-1))) {\n last.optimize = false;\n }\n\n var open = pos(new Node({\n type: 'brace.open',\n val: m[0]\n }));\n\n var node = pos(new Node({\n type: 'brace',\n nodes: []\n }));\n\n node.push(open);\n prev.push(node);\n this.push('brace', node);\n })\n\n /**\n * Close\n */\n\n .set('brace.close', function() {\n var pos = this.position();\n var m = this.match(/^\\}/);\n if (!m || !m[0]) return;\n\n var brace = this.pop('brace');\n var node = pos(new Node({\n type: 'brace.close',\n val: m[0]\n }));\n\n if (!this.isType(brace, 'brace')) {\n if (this.options.strict) {\n throw new Error('missing opening \"{\"');\n }\n node.type = 'text';\n node.multiplier = 0;\n node.escaped = true;\n return node;\n }\n\n var prev = this.prev();\n var last = utils.last(prev.nodes);\n if (last.text) {\n var lastNode = utils.last(last.nodes);\n if (lastNode.val === ')' && /[!@*?+]\\(/.test(last.text)) {\n var open = last.nodes[0];\n var text = last.nodes[1];\n if (open.type === 'brace.open' && text && text.type === 'text') {\n text.optimize = false;\n }\n }\n }\n\n if (brace.nodes.length > 2) {\n var first = brace.nodes[1];\n if (first.type === 'text' && first.val === ',') {\n brace.nodes.splice(1, 1);\n brace.nodes.push(first);\n }\n }\n\n brace.push(node);\n })\n\n /**\n * Capture boundary characters\n */\n\n .set('boundary', function() {\n var pos = this.position();\n var m = this.match(/^[$^](?!\\{)/);\n if (!m) return;\n return pos(new Node({\n type: 'text',\n val: m[0]\n }));\n })\n\n /**\n * One or zero, non-comma characters wrapped in braces\n */\n\n .set('nobrace', function() {\n var isInside = this.isInside('brace');\n var pos = this.position();\n var m = this.match(/^\\{[^,]?\\}/);\n if (!m) return;\n\n var prev = this.prev();\n var val = m[0];\n\n if (isInside && prev.type === 'brace') {\n prev.text = prev.text || '';\n prev.text += val;\n }\n\n return pos(new Node({\n type: 'text',\n multiplier: 0,\n val: val\n }));\n })\n\n /**\n * Text\n */\n\n .set('text', function() {\n var isInside = this.isInside('brace');\n var pos = this.position();\n var m = this.match(/^((?!\\\\)[^${}[\\]])+/);\n if (!m) return;\n\n var prev = this.prev();\n var val = m[0];\n\n if (isInside && prev.type === 'brace') {\n prev.text = prev.text || '';\n prev.text += val;\n }\n\n var node = pos(new Node({\n type: 'text',\n multiplier: 1,\n val: val\n }));\n\n return concatNodes.call(this, pos, node, prev, options);\n });\n};\n\n/**\n * Returns true if the character is an extglob character.\n */\n\nfunction isExtglobChar(ch) {\n return ch === '!' || ch === '@' || ch === '*' || ch === '?' || ch === '+';\n}\n\n/**\n * Combine text nodes, and calculate empty sets (`{,,}`)\n * @param {Function} `pos` Function to calculate node position\n * @param {Object} `node` AST node\n * @return {Object}\n */\n\nfunction concatNodes(pos, node, parent, options) {\n node.orig = node.val;\n var prev = this.prev();\n var last = utils.last(prev.nodes);\n var isEscaped = false;\n\n if (node.val.length > 1) {\n var a = node.val.charAt(0);\n var b = node.val.slice(-1);\n\n isEscaped = (a === '\"' && b === '\"')\n || (a === \"'\" && b === \"'\")\n || (a === '`' && b === '`');\n }\n\n if (isEscaped && options.unescape !== false) {\n node.val = node.val.slice(1, node.val.length - 1);\n node.escaped = true;\n }\n\n if (node.match) {\n var match = node.match[1];\n if (!match || match.indexOf('}') === -1) {\n match = node.match[0];\n }\n\n // replace each set with a single \",\"\n var val = match.replace(/\\{/g, ',').replace(/\\}/g, '');\n node.multiplier *= val.length;\n node.val = '';\n }\n\n var simpleText = last.type === 'text'\n && last.multiplier === 1\n && node.multiplier === 1\n && node.val;\n\n if (simpleText) {\n last.val += node.val;\n return;\n }\n\n prev.push(node);\n}\n","'use strict';\n\nvar splitString = require('split-string');\nvar utils = module.exports;\n\n/**\n * Module dependencies\n */\n\nutils.extend = require('extend-shallow');\nutils.flatten = require('arr-flatten');\nutils.isObject = require('isobject');\nutils.fillRange = require('fill-range');\nutils.repeat = require('repeat-element');\nutils.unique = require('array-unique');\n\nutils.define = function(obj, key, val) {\n Object.defineProperty(obj, key, {\n writable: true,\n configurable: true,\n enumerable: false,\n value: val\n });\n};\n\n/**\n * Returns true if the given string contains only empty brace sets.\n */\n\nutils.isEmptySets = function(str) {\n return /^(?:\\{,\\})+$/.test(str);\n};\n\n/**\n * Returns true if the given string contains only empty brace sets.\n */\n\nutils.isQuotedString = function(str) {\n var open = str.charAt(0);\n if (open === '\\'' || open === '\"' || open === '`') {\n return str.slice(-1) === open;\n }\n return false;\n};\n\n/**\n * Create the key to use for memoization. The unique key is generated\n * by iterating over the options and concatenating key-value pairs\n * to the pattern string.\n */\n\nutils.createKey = function(pattern, options) {\n var id = pattern;\n if (typeof options === 'undefined') {\n return id;\n }\n var keys = Object.keys(options);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n id += ';' + key + '=' + String(options[key]);\n }\n return id;\n};\n\n/**\n * Normalize options\n */\n\nutils.createOptions = function(options) {\n var opts = utils.extend.apply(null, arguments);\n if (typeof opts.expand === 'boolean') {\n opts.optimize = !opts.expand;\n }\n if (typeof opts.optimize === 'boolean') {\n opts.expand = !opts.optimize;\n }\n if (opts.optimize === true) {\n opts.makeRe = true;\n }\n return opts;\n};\n\n/**\n * Join patterns in `a` to patterns in `b`\n */\n\nutils.join = function(a, b, options) {\n options = options || {};\n a = utils.arrayify(a);\n b = utils.arrayify(b);\n\n if (!a.length) return b;\n if (!b.length) return a;\n\n var len = a.length;\n var idx = -1;\n var arr = [];\n\n while (++idx < len) {\n var val = a[idx];\n if (Array.isArray(val)) {\n for (var i = 0; i < val.length; i++) {\n val[i] = utils.join(val[i], b, options);\n }\n arr.push(val);\n continue;\n }\n\n for (var j = 0; j < b.length; j++) {\n var bval = b[j];\n\n if (Array.isArray(bval)) {\n arr.push(utils.join(val, bval, options));\n } else {\n arr.push(val + bval);\n }\n }\n }\n return arr;\n};\n\n/**\n * Split the given string on `,` if not escaped.\n */\n\nutils.split = function(str, options) {\n var opts = utils.extend({sep: ','}, options);\n if (typeof opts.keepQuotes !== 'boolean') {\n opts.keepQuotes = true;\n }\n if (opts.unescape === false) {\n opts.keepEscaping = true;\n }\n return splitString(str, opts, utils.escapeBrackets(opts));\n};\n\n/**\n * Expand ranges or sets in the given `pattern`.\n *\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object}\n */\n\nutils.expand = function(str, options) {\n var opts = utils.extend({rangeLimit: 10000}, options);\n var segs = utils.split(str, opts);\n var tok = { segs: segs };\n\n if (utils.isQuotedString(str)) {\n return tok;\n }\n\n if (opts.rangeLimit === true) {\n opts.rangeLimit = 10000;\n }\n\n if (segs.length > 1) {\n if (opts.optimize === false) {\n tok.val = segs[0];\n return tok;\n }\n\n tok.segs = utils.stringifyArray(tok.segs);\n } else if (segs.length === 1) {\n var arr = str.split('..');\n\n if (arr.length === 1) {\n tok.val = tok.segs[tok.segs.length - 1] || tok.val || str;\n tok.segs = [];\n return tok;\n }\n\n if (arr.length === 2 && arr[0] === arr[1]) {\n tok.escaped = true;\n tok.val = arr[0];\n tok.segs = [];\n return tok;\n }\n\n if (arr.length > 1) {\n if (opts.optimize !== false) {\n opts.optimize = true;\n delete opts.expand;\n }\n\n if (opts.optimize !== true) {\n var min = Math.min(arr[0], arr[1]);\n var max = Math.max(arr[0], arr[1]);\n var step = arr[2] || 1;\n\n if (opts.rangeLimit !== false && ((max - min) / step >= opts.rangeLimit)) {\n throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');\n }\n }\n\n arr.push(opts);\n tok.segs = utils.fillRange.apply(null, arr);\n\n if (!tok.segs.length) {\n tok.escaped = true;\n tok.val = str;\n return tok;\n }\n\n if (opts.optimize === true) {\n tok.segs = utils.stringifyArray(tok.segs);\n }\n\n if (tok.segs === '') {\n tok.val = str;\n } else {\n tok.val = tok.segs[0];\n }\n return tok;\n }\n } else {\n tok.val = str;\n }\n return tok;\n};\n\n/**\n * Ensure commas inside brackets and parens are not split.\n * @param {Object} `tok` Token from the `split-string` module\n * @return {undefined}\n */\n\nutils.escapeBrackets = function(options) {\n return function(tok) {\n if (tok.escaped && tok.val === 'b') {\n tok.val = '\\\\b';\n return;\n }\n\n if (tok.val !== '(' && tok.val !== '[') return;\n var opts = utils.extend({}, options);\n var brackets = [];\n var parens = [];\n var stack = [];\n var val = tok.val;\n var str = tok.str;\n var i = tok.idx - 1;\n\n while (++i < str.length) {\n var ch = str[i];\n\n if (ch === '\\\\') {\n val += (opts.keepEscaping === false ? '' : ch) + str[++i];\n continue;\n }\n\n if (ch === '(') {\n parens.push(ch);\n stack.push(ch);\n }\n\n if (ch === '[') {\n brackets.push(ch);\n stack.push(ch);\n }\n\n if (ch === ')') {\n parens.pop();\n stack.pop();\n if (!stack.length) {\n val += ch;\n break;\n }\n }\n\n if (ch === ']') {\n brackets.pop();\n stack.pop();\n if (!stack.length) {\n val += ch;\n break;\n }\n }\n val += ch;\n }\n\n tok.split = false;\n tok.val = val.slice(1);\n tok.idx = i;\n };\n};\n\n/**\n * Returns true if the given string looks like a regex quantifier\n * @return {Boolean}\n */\n\nutils.isQuantifier = function(str) {\n return /^(?:[0-9]?,[0-9]|[0-9],)$/.test(str);\n};\n\n/**\n * Cast `val` to an array.\n * @param {*} `val`\n */\n\nutils.stringifyArray = function(arr) {\n return [utils.arrayify(arr).join('|')];\n};\n\n/**\n * Cast `val` to an array.\n * @param {*} `val`\n */\n\nutils.arrayify = function(arr) {\n if (typeof arr === 'undefined') {\n return [];\n }\n if (typeof arr === 'string') {\n return [arr];\n }\n return arr;\n};\n\n/**\n * Returns true if the given `str` is a non-empty string\n * @return {Boolean}\n */\n\nutils.isString = function(str) {\n return str != null && typeof str === 'string';\n};\n\n/**\n * Get the last element from `array`\n * @param {Array} `array`\n * @return {*}\n */\n\nutils.last = function(arr, n) {\n return arr[arr.length - (n || 1)];\n};\n\nutils.escapeRegex = function(str) {\n return str.replace(/\\\\?([!^*?()[\\]{}+?/])/g, '\\\\$1');\n};\n","'use strict';\n\nvar isObject = require('isobject');\nvar Emitter = require('component-emitter');\nvar visit = require('collection-visit');\nvar toPath = require('to-object-path');\nvar union = require('union-value');\nvar del = require('unset-value');\nvar get = require('get-value');\nvar has = require('has-value');\nvar set = require('set-value');\n\n/**\n * Create a `Cache` constructor that when instantiated will\n * store values on the given `prop`.\n *\n * ```js\n * var Cache = require('cache-base').namespace('data');\n * var cache = new Cache();\n *\n * cache.set('foo', 'bar');\n * //=> {data: {foo: 'bar'}}\n * ```\n * @param {String} `prop` The property name to use for storing values.\n * @return {Function} Returns a custom `Cache` constructor\n * @api public\n */\n\nfunction namespace(prop) {\n\n /**\n * Create a new `Cache`. Internally the `Cache` constructor is created using\n * the `namespace` function, with `cache` defined as the storage object.\n *\n * ```js\n * var app = new Cache();\n * ```\n * @param {Object} `cache` Optionally pass an object to initialize with.\n * @constructor\n * @api public\n */\n\n function Cache(cache) {\n if (prop) {\n this[prop] = {};\n }\n if (cache) {\n this.set(cache);\n }\n }\n\n /**\n * Inherit Emitter\n */\n\n Emitter(Cache.prototype);\n\n /**\n * Assign `value` to `key`. Also emits `set` with\n * the key and value.\n *\n * ```js\n * app.on('set', function(key, val) {\n * // do something when `set` is emitted\n * });\n *\n * app.set(key, value);\n *\n * // also takes an object or array\n * app.set({name: 'Halle'});\n * app.set([{foo: 'bar'}, {baz: 'quux'}]);\n * console.log(app);\n * //=> {name: 'Halle', foo: 'bar', baz: 'quux'}\n * ```\n *\n * @name .set\n * @emits `set` with `key` and `value` as arguments.\n * @param {String} `key`\n * @param {any} `value`\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n Cache.prototype.set = function(key, val) {\n if (Array.isArray(key) && arguments.length === 2) {\n key = toPath(key);\n }\n if (isObject(key) || Array.isArray(key)) {\n this.visit('set', key);\n } else {\n set(prop ? this[prop] : this, key, val);\n this.emit('set', key, val);\n }\n return this;\n };\n\n /**\n * Union `array` to `key`. Also emits `set` with\n * the key and value.\n *\n * ```js\n * app.union('a.b', ['foo']);\n * app.union('a.b', ['bar']);\n * console.log(app.get('a'));\n * //=> {b: ['foo', 'bar']}\n * ```\n * @name .union\n * @param {String} `key`\n * @param {any} `value`\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n Cache.prototype.union = function(key, val) {\n if (Array.isArray(key) && arguments.length === 2) {\n key = toPath(key);\n }\n var ctx = prop ? this[prop] : this;\n union(ctx, key, arrayify(val));\n this.emit('union', val);\n return this;\n };\n\n /**\n * Return the value of `key`. Dot notation may be used\n * to get [nested property values][get-value].\n *\n * ```js\n * app.set('a.b.c', 'd');\n * app.get('a.b');\n * //=> {c: 'd'}\n *\n * app.get(['a', 'b']);\n * //=> {c: 'd'}\n * ```\n *\n * @name .get\n * @emits `get` with `key` and `value` as arguments.\n * @param {String} `key` The name of the property to get. Dot-notation may be used.\n * @return {any} Returns the value of `key`\n * @api public\n */\n\n Cache.prototype.get = function(key) {\n key = toPath(arguments);\n\n var ctx = prop ? this[prop] : this;\n var val = get(ctx, key);\n\n this.emit('get', key, val);\n return val;\n };\n\n /**\n * Return true if app has a stored value for `key`,\n * false only if value is `undefined`.\n *\n * ```js\n * app.set('foo', 'bar');\n * app.has('foo');\n * //=> true\n * ```\n *\n * @name .has\n * @emits `has` with `key` and true or false as arguments.\n * @param {String} `key`\n * @return {Boolean}\n * @api public\n */\n\n Cache.prototype.has = function(key) {\n key = toPath(arguments);\n\n var ctx = prop ? this[prop] : this;\n var val = get(ctx, key);\n\n var has = typeof val !== 'undefined';\n this.emit('has', key, has);\n return has;\n };\n\n /**\n * Delete one or more properties from the instance.\n *\n * ```js\n * app.del(); // delete all\n * // or\n * app.del('foo');\n * // or\n * app.del(['foo', 'bar']);\n * ```\n * @name .del\n * @emits `del` with the `key` as the only argument.\n * @param {String|Array} `key` Property name or array of property names.\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n Cache.prototype.del = function(key) {\n if (Array.isArray(key)) {\n this.visit('del', key);\n } else {\n del(prop ? this[prop] : this, key);\n this.emit('del', key);\n }\n return this;\n };\n\n /**\n * Reset the entire cache to an empty object.\n *\n * ```js\n * app.clear();\n * ```\n * @api public\n */\n\n Cache.prototype.clear = function() {\n if (prop) {\n this[prop] = {};\n }\n };\n\n /**\n * Visit `method` over the properties in the given object, or map\n * visit over the object-elements in an array.\n *\n * @name .visit\n * @param {String} `method` The name of the `base` method to call.\n * @param {Object|Array} `val` The object or array to iterate over.\n * @return {Object} Returns the instance for chaining.\n * @api public\n */\n\n Cache.prototype.visit = function(method, val) {\n visit(this, method, val);\n return this;\n };\n\n return Cache;\n}\n\n/**\n * Cast val to an array\n */\n\nfunction arrayify(val) {\n return val ? (Array.isArray(val) ? val : [val]) : [];\n}\n\n/**\n * Expose `Cache`\n */\n\nmodule.exports = namespace();\n\n/**\n * Expose `Cache.namespace`\n */\n\nmodule.exports.namespace = namespace;\n","'use strict';\n\nvar util = require('util');\nvar union = require('arr-union');\nvar define = require('define-property');\nvar staticExtend = require('static-extend');\nvar isObj = require('isobject');\n\n/**\n * Expose class utils\n */\n\nvar cu = module.exports;\n\n/**\n * Expose class utils: `cu`\n */\n\ncu.isObject = function isObject(val) {\n return isObj(val) || typeof val === 'function';\n};\n\n/**\n * Returns true if an array has any of the given elements, or an\n * object has any of the give keys.\n *\n * ```js\n * cu.has(['a', 'b', 'c'], 'c');\n * //=> true\n *\n * cu.has(['a', 'b', 'c'], ['c', 'z']);\n * //=> true\n *\n * cu.has({a: 'b', c: 'd'}, ['c', 'z']);\n * //=> true\n * ```\n * @param {Object} `obj`\n * @param {String|Array} `val`\n * @return {Boolean}\n * @api public\n */\n\ncu.has = function has(obj, val) {\n val = cu.arrayify(val);\n var len = val.length;\n\n if (cu.isObject(obj)) {\n for (var key in obj) {\n if (val.indexOf(key) > -1) {\n return true;\n }\n }\n\n var keys = cu.nativeKeys(obj);\n return cu.has(keys, val);\n }\n\n if (Array.isArray(obj)) {\n var arr = obj;\n while (len--) {\n if (arr.indexOf(val[len]) > -1) {\n return true;\n }\n }\n return false;\n }\n\n throw new TypeError('expected an array or object.');\n};\n\n/**\n * Returns true if an array or object has all of the given values.\n *\n * ```js\n * cu.hasAll(['a', 'b', 'c'], 'c');\n * //=> true\n *\n * cu.hasAll(['a', 'b', 'c'], ['c', 'z']);\n * //=> false\n *\n * cu.hasAll({a: 'b', c: 'd'}, ['c', 'z']);\n * //=> false\n * ```\n * @param {Object|Array} `val`\n * @param {String|Array} `values`\n * @return {Boolean}\n * @api public\n */\n\ncu.hasAll = function hasAll(val, values) {\n values = cu.arrayify(values);\n var len = values.length;\n while (len--) {\n if (!cu.has(val, values[len])) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Cast the given value to an array.\n *\n * ```js\n * cu.arrayify('foo');\n * //=> ['foo']\n *\n * cu.arrayify(['foo']);\n * //=> ['foo']\n * ```\n *\n * @param {String|Array} `val`\n * @return {Array}\n * @api public\n */\n\ncu.arrayify = function arrayify(val) {\n return val ? (Array.isArray(val) ? val : [val]) : [];\n};\n\n/**\n * Noop\n */\n\ncu.noop = function noop() {\n return;\n};\n\n/**\n * Returns the first argument passed to the function.\n */\n\ncu.identity = function identity(val) {\n return val;\n};\n\n/**\n * Returns true if a value has a `contructor`\n *\n * ```js\n * cu.hasConstructor({});\n * //=> true\n *\n * cu.hasConstructor(Object.create(null));\n * //=> false\n * ```\n * @param {Object} `value`\n * @return {Boolean}\n * @api public\n */\n\ncu.hasConstructor = function hasConstructor(val) {\n return cu.isObject(val) && typeof val.constructor !== 'undefined';\n};\n\n/**\n * Get the native `ownPropertyNames` from the constructor of the\n * given `object`. An empty array is returned if the object does\n * not have a constructor.\n *\n * ```js\n * cu.nativeKeys({a: 'b', b: 'c', c: 'd'})\n * //=> ['a', 'b', 'c']\n *\n * cu.nativeKeys(function(){})\n * //=> ['length', 'caller']\n * ```\n *\n * @param {Object} `obj` Object that has a `constructor`.\n * @return {Array} Array of keys.\n * @api public\n */\n\ncu.nativeKeys = function nativeKeys(val) {\n if (!cu.hasConstructor(val)) return [];\n var keys = Object.getOwnPropertyNames(val);\n if ('caller' in val) keys.push('caller');\n return keys;\n};\n\n/**\n * Returns property descriptor `key` if it's an \"own\" property\n * of the given object.\n *\n * ```js\n * function App() {}\n * Object.defineProperty(App.prototype, 'count', {\n * get: function() {\n * return Object.keys(this).length;\n * }\n * });\n * cu.getDescriptor(App.prototype, 'count');\n * // returns:\n * // {\n * // get: [Function],\n * // set: undefined,\n * // enumerable: false,\n * // configurable: false\n * // }\n * ```\n *\n * @param {Object} `obj`\n * @param {String} `key`\n * @return {Object} Returns descriptor `key`\n * @api public\n */\n\ncu.getDescriptor = function getDescriptor(obj, key) {\n if (!cu.isObject(obj)) {\n throw new TypeError('expected an object.');\n }\n if (typeof key !== 'string') {\n throw new TypeError('expected key to be a string.');\n }\n return Object.getOwnPropertyDescriptor(obj, key);\n};\n\n/**\n * Copy a descriptor from one object to another.\n *\n * ```js\n * function App() {}\n * Object.defineProperty(App.prototype, 'count', {\n * get: function() {\n * return Object.keys(this).length;\n * }\n * });\n * var obj = {};\n * cu.copyDescriptor(obj, App.prototype, 'count');\n * ```\n * @param {Object} `receiver`\n * @param {Object} `provider`\n * @param {String} `name`\n * @return {Object}\n * @api public\n */\n\ncu.copyDescriptor = function copyDescriptor(receiver, provider, name) {\n if (!cu.isObject(receiver)) {\n throw new TypeError('expected receiving object to be an object.');\n }\n if (!cu.isObject(provider)) {\n throw new TypeError('expected providing object to be an object.');\n }\n if (typeof name !== 'string') {\n throw new TypeError('expected name to be a string.');\n }\n\n var val = cu.getDescriptor(provider, name);\n if (val) Object.defineProperty(receiver, name, val);\n};\n\n/**\n * Copy static properties, prototype properties, and descriptors\n * from one object to another.\n *\n * @param {Object} `receiver`\n * @param {Object} `provider`\n * @param {String|Array} `omit` One or more properties to omit\n * @return {Object}\n * @api public\n */\n\ncu.copy = function copy(receiver, provider, omit) {\n if (!cu.isObject(receiver)) {\n throw new TypeError('expected receiving object to be an object.');\n }\n if (!cu.isObject(provider)) {\n throw new TypeError('expected providing object to be an object.');\n }\n var props = Object.getOwnPropertyNames(provider);\n var keys = Object.keys(provider);\n var len = props.length,\n key;\n omit = cu.arrayify(omit);\n\n while (len--) {\n key = props[len];\n\n if (cu.has(keys, key)) {\n define(receiver, key, provider[key]);\n } else if (!(key in receiver) && !cu.has(omit, key)) {\n cu.copyDescriptor(receiver, provider, key);\n }\n }\n};\n\n/**\n * Inherit the static properties, prototype properties, and descriptors\n * from of an object.\n *\n * @param {Object} `receiver`\n * @param {Object} `provider`\n * @param {String|Array} `omit` One or more properties to omit\n * @return {Object}\n * @api public\n */\n\ncu.inherit = function inherit(receiver, provider, omit) {\n if (!cu.isObject(receiver)) {\n throw new TypeError('expected receiving object to be an object.');\n }\n if (!cu.isObject(provider)) {\n throw new TypeError('expected providing object to be an object.');\n }\n\n var keys = [];\n for (var key in provider) {\n keys.push(key);\n receiver[key] = provider[key];\n }\n\n keys = keys.concat(cu.arrayify(omit));\n\n var a = provider.prototype || provider;\n var b = receiver.prototype || receiver;\n cu.copy(b, a, keys);\n};\n\n/**\n * Returns a function for extending the static properties,\n * prototype properties, and descriptors from the `Parent`\n * constructor onto `Child` constructors.\n *\n * ```js\n * var extend = cu.extend(Parent);\n * Parent.extend(Child);\n *\n * // optional methods\n * Parent.extend(Child, {\n * foo: function() {},\n * bar: function() {}\n * });\n * ```\n * @param {Function} `Parent` Parent ctor\n * @param {Function} `extend` Optional extend function to handle custom extensions. Useful when updating methods that require a specific prototype.\n * @param {Function} `Child` Child ctor\n * @param {Object} `proto` Optionally pass additional prototype properties to inherit.\n * @return {Object}\n * @api public\n */\n\ncu.extend = function() {\n // keep it lazy, instead of assigning to `cu.extend`\n return staticExtend.apply(null, arguments);\n};\n\n/**\n * Bubble up events emitted from static methods on the Parent ctor.\n *\n * @param {Object} `Parent`\n * @param {Array} `events` Event names to bubble up\n * @api public\n */\n\ncu.bubble = function(Parent, events) {\n events = events || [];\n Parent.bubble = function(Child, arr) {\n if (Array.isArray(arr)) {\n events = union([], events, arr);\n }\n var len = events.length;\n var idx = -1;\n while (++idx < len) {\n var name = events[idx];\n Parent.on(name, Child.emit.bind(Child, name));\n }\n cu.bubble(Child, events);\n };\n};\n","/*!\n * collection-visit <https://github.com/jonschlinkert/collection-visit>\n *\n * Copyright (c) 2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar visit = require('object-visit');\nvar mapVisit = require('map-visit');\n\nmodule.exports = function(collection, method, val) {\n var result;\n\n if (typeof val === 'string' && (method in collection)) {\n var args = [].slice.call(arguments, 2);\n result = collection[method].apply(collection, args);\n } else if (Array.isArray(val)) {\n result = mapVisit.apply(null, arguments);\n } else {\n result = visit.apply(null, arguments);\n }\n\n if (typeof result !== 'undefined') {\n return result;\n }\n\n return collection;\n};\n","/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n var args = [].slice.call(arguments, 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","/*!\n * copy-descriptor <https://github.com/jonschlinkert/copy-descriptor>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\n/**\n * Copy a descriptor from one object to another.\n *\n * ```js\n * function App() {\n * this.cache = {};\n * }\n * App.prototype.set = function(key, val) {\n * this.cache[key] = val;\n * return this;\n * };\n * Object.defineProperty(App.prototype, 'count', {\n * get: function() {\n * return Object.keys(this.cache).length;\n * }\n * });\n *\n * copy(App.prototype, 'count', 'len');\n *\n * // create an instance\n * var app = new App();\n *\n * app.set('a', true);\n * app.set('b', true);\n * app.set('c', true);\n *\n * console.log(app.count);\n * //=> 3\n * console.log(app.len);\n * //=> 3\n * ```\n * @name copy\n * @param {Object} `receiver` The target object\n * @param {Object} `provider` The provider object\n * @param {String} `from` The key to copy on provider.\n * @param {String} `to` Optionally specify a new key name to use.\n * @return {Object}\n * @api public\n */\n\nmodule.exports = function copyDescriptor(receiver, provider, from, to) {\n if (!isObject(provider) && typeof provider !== 'function') {\n to = from;\n from = provider;\n provider = receiver;\n }\n if (!isObject(receiver) && typeof receiver !== 'function') {\n throw new TypeError('expected the first argument to be an object');\n }\n if (!isObject(provider) && typeof provider !== 'function') {\n throw new TypeError('expected provider to be an object');\n }\n\n if (typeof to !== 'string') {\n to = from;\n }\n if (typeof from !== 'string') {\n throw new TypeError('expected key to be a string');\n }\n\n if (!(from in provider)) {\n throw new Error('property \"' + from + '\" does not exist');\n }\n\n var val = Object.getOwnPropertyDescriptor(provider, from);\n if (val) Object.defineProperty(receiver, to, val);\n};\n\nfunction isObject(val) {\n return {}.toString.call(val) === '[object Object]';\n}\n\n","/*!\n * define-property <https://github.com/jonschlinkert/define-property>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar isDescriptor = require('is-descriptor');\n\nmodule.exports = function defineProperty(obj, prop, val) {\n if (typeof obj !== 'object' && typeof obj !== 'function') {\n throw new TypeError('expected an object or function.');\n }\n\n if (typeof prop !== 'string') {\n throw new TypeError('expected `prop` to be a string.');\n }\n\n if (isDescriptor(val) && ('set' in val || 'get' in val)) {\n return Object.defineProperty(obj, prop, val);\n }\n\n return Object.defineProperty(obj, prop, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: val\n });\n};\n","/*!\n * is-accessor-descriptor <https://github.com/jonschlinkert/is-accessor-descriptor>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\n\n// accessor descriptor properties\nvar accessor = {\n get: 'function',\n set: 'function',\n configurable: 'boolean',\n enumerable: 'boolean'\n};\n\nfunction isAccessorDescriptor(obj, prop) {\n if (typeof prop === 'string') {\n var val = Object.getOwnPropertyDescriptor(obj, prop);\n return typeof val !== 'undefined';\n }\n\n if (typeOf(obj) !== 'object') {\n return false;\n }\n\n if (has(obj, 'value') || has(obj, 'writable')) {\n return false;\n }\n\n if (!has(obj, 'get') || typeof obj.get !== 'function') {\n return false;\n }\n\n // tldr: it's valid to have \"set\" be undefined\n // \"set\" might be undefined if `Object.getOwnPropertyDescriptor`\n // was used to get the value, and only `get` was defined by the user\n if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') {\n return false;\n }\n\n for (var key in obj) {\n if (!accessor.hasOwnProperty(key)) {\n continue;\n }\n\n if (typeOf(obj[key]) === accessor[key]) {\n continue;\n }\n\n if (typeof obj[key] !== 'undefined') {\n return false;\n }\n }\n return true;\n}\n\nfunction has(obj, key) {\n return {}.hasOwnProperty.call(obj, key);\n}\n\n/**\n * Expose `isAccessorDescriptor`\n */\n\nmodule.exports = isAccessorDescriptor;\n","var isBuffer = require('is-buffer');\nvar toString = Object.prototype.toString;\n\n/**\n * Get the native `typeof` a value.\n *\n * @param {*} `val`\n * @return {*} Native javascript type\n */\n\nmodule.exports = function kindOf(val) {\n // primitivies\n if (typeof val === 'undefined') {\n return 'undefined';\n }\n if (val === null) {\n return 'null';\n }\n if (val === true || val === false || val instanceof Boolean) {\n return 'boolean';\n }\n if (typeof val === 'string' || val instanceof String) {\n return 'string';\n }\n if (typeof val === 'number' || val instanceof Number) {\n return 'number';\n }\n\n // functions\n if (typeof val === 'function' || val instanceof Function) {\n return 'function';\n }\n\n // array\n if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {\n return 'array';\n }\n\n // check for instances of RegExp and Date before calling `toString`\n if (val instanceof RegExp) {\n return 'regexp';\n }\n if (val instanceof Date) {\n return 'date';\n }\n\n // other objects\n var type = toString.call(val);\n\n if (type === '[object RegExp]') {\n return 'regexp';\n }\n if (type === '[object Date]') {\n return 'date';\n }\n if (type === '[object Arguments]') {\n return 'arguments';\n }\n if (type === '[object Error]') {\n return 'error';\n }\n\n // buffer\n if (isBuffer(val)) {\n return 'buffer';\n }\n\n // es6: Map, WeakMap, Set, WeakSet\n if (type === '[object Set]') {\n return 'set';\n }\n if (type === '[object WeakSet]') {\n return 'weakset';\n }\n if (type === '[object Map]') {\n return 'map';\n }\n if (type === '[object WeakMap]') {\n return 'weakmap';\n }\n if (type === '[object Symbol]') {\n return 'symbol';\n }\n\n // typed arrays\n if (type === '[object Int8Array]') {\n return 'int8array';\n }\n if (type === '[object Uint8Array]') {\n return 'uint8array';\n }\n if (type === '[object Uint8ClampedArray]') {\n return 'uint8clampedarray';\n }\n if (type === '[object Int16Array]') {\n return 'int16array';\n }\n if (type === '[object Uint16Array]') {\n return 'uint16array';\n }\n if (type === '[object Int32Array]') {\n return 'int32array';\n }\n if (type === '[object Uint32Array]') {\n return 'uint32array';\n }\n if (type === '[object Float32Array]') {\n return 'float32array';\n }\n if (type === '[object Float64Array]') {\n return 'float64array';\n }\n\n // must be a plain object\n return 'object';\n};\n","/*!\n * is-data-descriptor <https://github.com/jonschlinkert/is-data-descriptor>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\n\n// data descriptor properties\nvar data = {\n configurable: 'boolean',\n enumerable: 'boolean',\n writable: 'boolean'\n};\n\nfunction isDataDescriptor(obj, prop) {\n if (typeOf(obj) !== 'object') {\n return false;\n }\n\n if (typeof prop === 'string') {\n var val = Object.getOwnPropertyDescriptor(obj, prop);\n return typeof val !== 'undefined';\n }\n\n if (!('value' in obj) && !('writable' in obj)) {\n return false;\n }\n\n for (var key in obj) {\n if (key === 'value') continue;\n\n if (!data.hasOwnProperty(key)) {\n continue;\n }\n\n if (typeOf(obj[key]) === data[key]) {\n continue;\n }\n\n if (typeof obj[key] !== 'undefined') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Expose `isDataDescriptor`\n */\n\nmodule.exports = isDataDescriptor;\n","var isBuffer = require('is-buffer');\nvar toString = Object.prototype.toString;\n\n/**\n * Get the native `typeof` a value.\n *\n * @param {*} `val`\n * @return {*} Native javascript type\n */\n\nmodule.exports = function kindOf(val) {\n // primitivies\n if (typeof val === 'undefined') {\n return 'undefined';\n }\n if (val === null) {\n return 'null';\n }\n if (val === true || val === false || val instanceof Boolean) {\n return 'boolean';\n }\n if (typeof val === 'string' || val instanceof String) {\n return 'string';\n }\n if (typeof val === 'number' || val instanceof Number) {\n return 'number';\n }\n\n // functions\n if (typeof val === 'function' || val instanceof Function) {\n return 'function';\n }\n\n // array\n if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {\n return 'array';\n }\n\n // check for instances of RegExp and Date before calling `toString`\n if (val instanceof RegExp) {\n return 'regexp';\n }\n if (val instanceof Date) {\n return 'date';\n }\n\n // other objects\n var type = toString.call(val);\n\n if (type === '[object RegExp]') {\n return 'regexp';\n }\n if (type === '[object Date]') {\n return 'date';\n }\n if (type === '[object Arguments]') {\n return 'arguments';\n }\n if (type === '[object Error]') {\n return 'error';\n }\n\n // buffer\n if (isBuffer(val)) {\n return 'buffer';\n }\n\n // es6: Map, WeakMap, Set, WeakSet\n if (type === '[object Set]') {\n return 'set';\n }\n if (type === '[object WeakSet]') {\n return 'weakset';\n }\n if (type === '[object Map]') {\n return 'map';\n }\n if (type === '[object WeakMap]') {\n return 'weakmap';\n }\n if (type === '[object Symbol]') {\n return 'symbol';\n }\n\n // typed arrays\n if (type === '[object Int8Array]') {\n return 'int8array';\n }\n if (type === '[object Uint8Array]') {\n return 'uint8array';\n }\n if (type === '[object Uint8ClampedArray]') {\n return 'uint8clampedarray';\n }\n if (type === '[object Int16Array]') {\n return 'int16array';\n }\n if (type === '[object Uint16Array]') {\n return 'uint16array';\n }\n if (type === '[object Int32Array]') {\n return 'int32array';\n }\n if (type === '[object Uint32Array]') {\n return 'uint32array';\n }\n if (type === '[object Float32Array]') {\n return 'float32array';\n }\n if (type === '[object Float64Array]') {\n return 'float64array';\n }\n\n // must be a plain object\n return 'object';\n};\n","/*!\n * is-descriptor <https://github.com/jonschlinkert/is-descriptor>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\nvar isAccessor = require('is-accessor-descriptor');\nvar isData = require('is-data-descriptor');\n\nmodule.exports = function isDescriptor(obj, key) {\n if (typeOf(obj) !== 'object') {\n return false;\n }\n if ('get' in obj) {\n return isAccessor(obj, key);\n }\n return isData(obj, key);\n};\n","var toString = Object.prototype.toString;\n\n/**\n * Get the native `typeof` a value.\n *\n * @param {*} `val`\n * @return {*} Native javascript type\n */\n\nmodule.exports = function kindOf(val) {\n var type = typeof val;\n\n // primitivies\n if (type === 'undefined') {\n return 'undefined';\n }\n if (val === null) {\n return 'null';\n }\n if (val === true || val === false || val instanceof Boolean) {\n return 'boolean';\n }\n if (type === 'string' || val instanceof String) {\n return 'string';\n }\n if (type === 'number' || val instanceof Number) {\n return 'number';\n }\n\n // functions\n if (type === 'function' || val instanceof Function) {\n if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') {\n return 'generatorfunction';\n }\n return 'function';\n }\n\n // array\n if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {\n return 'array';\n }\n\n // check for instances of RegExp and Date before calling `toString`\n if (val instanceof RegExp) {\n return 'regexp';\n }\n if (val instanceof Date) {\n return 'date';\n }\n\n // other objects\n type = toString.call(val);\n\n if (type === '[object RegExp]') {\n return 'regexp';\n }\n if (type === '[object Date]') {\n return 'date';\n }\n if (type === '[object Arguments]') {\n return 'arguments';\n }\n if (type === '[object Error]') {\n return 'error';\n }\n if (type === '[object Promise]') {\n return 'promise';\n }\n\n // buffer\n if (isBuffer(val)) {\n return 'buffer';\n }\n\n // es6: Map, WeakMap, Set, WeakSet\n if (type === '[object Set]') {\n return 'set';\n }\n if (type === '[object WeakSet]') {\n return 'weakset';\n }\n if (type === '[object Map]') {\n return 'map';\n }\n if (type === '[object WeakMap]') {\n return 'weakmap';\n }\n if (type === '[object Symbol]') {\n return 'symbol';\n }\n \n if (type === '[object Map Iterator]') {\n return 'mapiterator';\n }\n if (type === '[object Set Iterator]') {\n return 'setiterator';\n }\n if (type === '[object String Iterator]') {\n return 'stringiterator';\n }\n if (type === '[object Array Iterator]') {\n return 'arrayiterator';\n }\n \n // typed arrays\n if (type === '[object Int8Array]') {\n return 'int8array';\n }\n if (type === '[object Uint8Array]') {\n return 'uint8array';\n }\n if (type === '[object Uint8ClampedArray]') {\n return 'uint8clampedarray';\n }\n if (type === '[object Int16Array]') {\n return 'int16array';\n }\n if (type === '[object Uint16Array]') {\n return 'uint16array';\n }\n if (type === '[object Int32Array]') {\n return 'int32array';\n }\n if (type === '[object Uint32Array]') {\n return 'uint32array';\n }\n if (type === '[object Float32Array]') {\n return 'float32array';\n }\n if (type === '[object Float64Array]') {\n return 'float64array';\n }\n\n // must be a plain object\n return 'object';\n};\n\n/**\n * If you need to support Safari 5-7 (8-10 yr-old browser),\n * take a look at https://github.com/feross/is-buffer\n */\n\nfunction isBuffer(val) {\n return val.constructor\n && typeof val.constructor.isBuffer === 'function'\n && val.constructor.isBuffer(val);\n}\n","/*\n Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n(function () {\n 'use strict';\n\n function isExpression(node) {\n if (node == null) { return false; }\n switch (node.type) {\n case 'ArrayExpression':\n case 'AssignmentExpression':\n case 'BinaryExpression':\n case 'CallExpression':\n case 'ConditionalExpression':\n case 'FunctionExpression':\n case 'Identifier':\n case 'Literal':\n case 'LogicalExpression':\n case 'MemberExpression':\n case 'NewExpression':\n case 'ObjectExpression':\n case 'SequenceExpression':\n case 'ThisExpression':\n case 'UnaryExpression':\n case 'UpdateExpression':\n return true;\n }\n return false;\n }\n\n function isIterationStatement(node) {\n if (node == null) { return false; }\n switch (node.type) {\n case 'DoWhileStatement':\n case 'ForInStatement':\n case 'ForStatement':\n case 'WhileStatement':\n return true;\n }\n return false;\n }\n\n function isStatement(node) {\n if (node == null) { return false; }\n switch (node.type) {\n case 'BlockStatement':\n case 'BreakStatement':\n case 'ContinueStatement':\n case 'DebuggerStatement':\n case 'DoWhileStatement':\n case 'EmptyStatement':\n case 'ExpressionStatement':\n case 'ForInStatement':\n case 'ForStatement':\n case 'IfStatement':\n case 'LabeledStatement':\n case 'ReturnStatement':\n case 'SwitchStatement':\n case 'ThrowStatement':\n case 'TryStatement':\n case 'VariableDeclaration':\n case 'WhileStatement':\n case 'WithStatement':\n return true;\n }\n return false;\n }\n\n function isSourceElement(node) {\n return isStatement(node) || node != null && node.type === 'FunctionDeclaration';\n }\n\n function trailingStatement(node) {\n switch (node.type) {\n case 'IfStatement':\n if (node.alternate != null) {\n return node.alternate;\n }\n return node.consequent;\n\n case 'LabeledStatement':\n case 'ForStatement':\n case 'ForInStatement':\n case 'WhileStatement':\n case 'WithStatement':\n return node.body;\n }\n return null;\n }\n\n function isProblematicIfStatement(node) {\n var current;\n\n if (node.type !== 'IfStatement') {\n return false;\n }\n if (node.alternate == null) {\n return false;\n }\n current = node.consequent;\n do {\n if (current.type === 'IfStatement') {\n if (current.alternate == null) {\n return true;\n }\n }\n current = trailingStatement(current);\n } while (current);\n\n return false;\n }\n\n module.exports = {\n isExpression: isExpression,\n isStatement: isStatement,\n isIterationStatement: isIterationStatement,\n isSourceElement: isSourceElement,\n isProblematicIfStatement: isProblematicIfStatement,\n\n trailingStatement: trailingStatement\n };\n}());\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>\n Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n(function () {\n 'use strict';\n\n var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;\n\n // See `tools/generate-identifier-regex.js`.\n ES5Regex = {\n // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart:\n NonAsciiIdentifierStart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,\n // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart:\n NonAsciiIdentifierPart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\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\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/\n };\n\n ES6Regex = {\n // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart:\n NonAsciiIdentifierStart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30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u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9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39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF5D-\\uDF61]|\\uD805[\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDEC0-\\uDEF8]|\\uD808[\\uDC00-\\uDF98]|\\uD809[\\uDC00-\\uDC6E]|[\\uD80C\\uD840-\\uD868\\uD86A-\\uD86C][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F]|\\uD82C[\\uDC00\\uDC01]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D]|\\uD87E[\\uDC00-\\uDE1D]/,\n // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart:\n NonAsciiIdentifierPart: /[\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\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\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\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DF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/\n };\n\n function isDecimalDigit(ch) {\n return 0x30 <= ch && ch <= 0x39; // 0..9\n }\n\n function isHexDigit(ch) {\n return 0x30 <= ch && ch <= 0x39 || // 0..9\n 0x61 <= ch && ch <= 0x66 || // a..f\n 0x41 <= ch && ch <= 0x46; // A..F\n }\n\n function isOctalDigit(ch) {\n return ch >= 0x30 && ch <= 0x37; // 0..7\n }\n\n // 7.2 White Space\n\n NON_ASCII_WHITESPACES = [\n 0x1680, 0x180E,\n 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,\n 0x202F, 0x205F,\n 0x3000,\n 0xFEFF\n ];\n\n function isWhiteSpace(ch) {\n return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||\n ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;\n }\n\n // 7.3 Line Terminators\n\n function isLineTerminator(ch) {\n return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;\n }\n\n // 7.6 Identifier Names and Identifiers\n\n function fromCodePoint(cp) {\n if (cp <= 0xFFFF) { return String.fromCharCode(cp); }\n var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);\n var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);\n return cu1 + cu2;\n }\n\n IDENTIFIER_START = new Array(0x80);\n for(ch = 0; ch < 0x80; ++ch) {\n IDENTIFIER_START[ch] =\n ch >= 0x61 && ch <= 0x7A || // a..z\n ch >= 0x41 && ch <= 0x5A || // A..Z\n ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)\n }\n\n IDENTIFIER_PART = new Array(0x80);\n for(ch = 0; ch < 0x80; ++ch) {\n IDENTIFIER_PART[ch] =\n ch >= 0x61 && ch <= 0x7A || // a..z\n ch >= 0x41 && ch <= 0x5A || // A..Z\n ch >= 0x30 && ch <= 0x39 || // 0..9\n ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)\n }\n\n function isIdentifierStartES5(ch) {\n return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));\n }\n\n function isIdentifierPartES5(ch) {\n return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));\n }\n\n function isIdentifierStartES6(ch) {\n return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));\n }\n\n function isIdentifierPartES6(ch) {\n return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));\n }\n\n module.exports = {\n isDecimalDigit: isDecimalDigit,\n isHexDigit: isHexDigit,\n isOctalDigit: isOctalDigit,\n isWhiteSpace: isWhiteSpace,\n isLineTerminator: isLineTerminator,\n isIdentifierStartES5: isIdentifierStartES5,\n isIdentifierPartES5: isIdentifierPartES5,\n isIdentifierStartES6: isIdentifierStartES6,\n isIdentifierPartES6: isIdentifierPartES6\n };\n}());\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n(function () {\n 'use strict';\n\n var code = require('./code');\n\n function isStrictModeReservedWordES6(id) {\n switch (id) {\n case 'implements':\n case 'interface':\n case 'package':\n case 'private':\n case 'protected':\n case 'public':\n case 'static':\n case 'let':\n return true;\n default:\n return false;\n }\n }\n\n function isKeywordES5(id, strict) {\n // yield should not be treated as keyword under non-strict mode.\n if (!strict && id === 'yield') {\n return false;\n }\n return isKeywordES6(id, strict);\n }\n\n function isKeywordES6(id, strict) {\n if (strict && isStrictModeReservedWordES6(id)) {\n return true;\n }\n\n switch (id.length) {\n case 2:\n return (id === 'if') || (id === 'in') || (id === 'do');\n case 3:\n return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');\n case 4:\n return (id === 'this') || (id === 'else') || (id === 'case') ||\n (id === 'void') || (id === 'with') || (id === 'enum');\n case 5:\n return (id === 'while') || (id === 'break') || (id === 'catch') ||\n (id === 'throw') || (id === 'const') || (id === 'yield') ||\n (id === 'class') || (id === 'super');\n case 6:\n return (id === 'return') || (id === 'typeof') || (id === 'delete') ||\n (id === 'switch') || (id === 'export') || (id === 'import');\n case 7:\n return (id === 'default') || (id === 'finally') || (id === 'extends');\n case 8:\n return (id === 'function') || (id === 'continue') || (id === 'debugger');\n case 10:\n return (id === 'instanceof');\n default:\n return false;\n }\n }\n\n function isReservedWordES5(id, strict) {\n return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);\n }\n\n function isReservedWordES6(id, strict) {\n return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);\n }\n\n function isRestrictedWord(id) {\n return id === 'eval' || id === 'arguments';\n }\n\n function isIdentifierNameES5(id) {\n var i, iz, ch;\n\n if (id.length === 0) { return false; }\n\n ch = id.charCodeAt(0);\n if (!code.isIdentifierStartES5(ch)) {\n return false;\n }\n\n for (i = 1, iz = id.length; i < iz; ++i) {\n ch = id.charCodeAt(i);\n if (!code.isIdentifierPartES5(ch)) {\n return false;\n }\n }\n return true;\n }\n\n function decodeUtf16(lead, trail) {\n return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n }\n\n function isIdentifierNameES6(id) {\n var i, iz, ch, lowCh, check;\n\n if (id.length === 0) { return false; }\n\n check = code.isIdentifierStartES6;\n for (i = 0, iz = id.length; i < iz; ++i) {\n ch = id.charCodeAt(i);\n if (0xD800 <= ch && ch <= 0xDBFF) {\n ++i;\n if (i >= iz) { return false; }\n lowCh = id.charCodeAt(i);\n if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {\n return false;\n }\n ch = decodeUtf16(ch, lowCh);\n }\n if (!check(ch)) {\n return false;\n }\n check = code.isIdentifierPartES6;\n }\n return true;\n }\n\n function isIdentifierES5(id, strict) {\n return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);\n }\n\n function isIdentifierES6(id, strict) {\n return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);\n }\n\n module.exports = {\n isKeywordES5: isKeywordES5,\n isKeywordES6: isKeywordES6,\n isReservedWordES5: isReservedWordES5,\n isReservedWordES6: isReservedWordES6,\n isRestrictedWord: isRestrictedWord,\n isIdentifierNameES5: isIdentifierNameES5,\n isIdentifierNameES6: isIdentifierNameES6,\n isIdentifierES5: isIdentifierES5,\n isIdentifierES6: isIdentifierES6\n };\n}());\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n\n(function () {\n 'use strict';\n\n exports.ast = require('./ast');\n exports.code = require('./code');\n exports.keyword = require('./keyword');\n}());\n/* vim: set sw=4 ts=4 et tw=80 : */\n","'use strict';\n\n/**\n * Local dependencies\n */\n\nvar compilers = require('./lib/compilers');\nvar parsers = require('./lib/parsers');\n\n/**\n * Module dependencies\n */\n\nvar debug = require('debug')('expand-brackets');\nvar extend = require('extend-shallow');\nvar Snapdragon = require('snapdragon');\nvar toRegex = require('to-regex');\n\n/**\n * Parses the given POSIX character class `pattern` and returns a\n * string that can be used for creating regular expressions for matching.\n *\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object}\n * @api public\n */\n\nfunction brackets(pattern, options) {\n debug('initializing from <%s>', __filename);\n var res = brackets.create(pattern, options);\n return res.output;\n}\n\n/**\n * Takes an array of strings and a POSIX character class pattern, and returns a new\n * array with only the strings that matched the pattern.\n *\n * ```js\n * var brackets = require('expand-brackets');\n * console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]'));\n * //=> ['a']\n *\n * console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]+'));\n * //=> ['a', 'ab']\n * ```\n * @param {Array} `arr` Array of strings to match\n * @param {String} `pattern` POSIX character class pattern(s)\n * @param {Object} `options`\n * @return {Array}\n * @api public\n */\n\nbrackets.match = function(arr, pattern, options) {\n arr = [].concat(arr);\n var opts = extend({}, options);\n var isMatch = brackets.matcher(pattern, opts);\n var len = arr.length;\n var idx = -1;\n var res = [];\n\n while (++idx < len) {\n var ele = arr[idx];\n if (isMatch(ele)) {\n res.push(ele);\n }\n }\n\n if (res.length === 0) {\n if (opts.failglob === true) {\n throw new Error('no matches found for \"' + pattern + '\"');\n }\n\n if (opts.nonull === true || opts.nullglob === true) {\n return [pattern.split('\\\\').join('')];\n }\n }\n return res;\n};\n\n/**\n * Returns true if the specified `string` matches the given\n * brackets `pattern`.\n *\n * ```js\n * var brackets = require('expand-brackets');\n *\n * console.log(brackets.isMatch('a.a', '[[:alpha:]].[[:alpha:]]'));\n * //=> true\n * console.log(brackets.isMatch('1.2', '[[:alpha:]].[[:alpha:]]'));\n * //=> false\n * ```\n * @param {String} `string` String to match\n * @param {String} `pattern` Poxis pattern\n * @param {String} `options`\n * @return {Boolean}\n * @api public\n */\n\nbrackets.isMatch = function(str, pattern, options) {\n return brackets.matcher(pattern, options)(str);\n};\n\n/**\n * Takes a POSIX character class pattern and returns a matcher function. The returned\n * function takes the string to match as its only argument.\n *\n * ```js\n * var brackets = require('expand-brackets');\n * var isMatch = brackets.matcher('[[:lower:]].[[:upper:]]');\n *\n * console.log(isMatch('a.a'));\n * //=> false\n * console.log(isMatch('a.A'));\n * //=> true\n * ```\n * @param {String} `pattern` Poxis pattern\n * @param {String} `options`\n * @return {Boolean}\n * @api public\n */\n\nbrackets.matcher = function(pattern, options) {\n var re = brackets.makeRe(pattern, options);\n return function(str) {\n return re.test(str);\n };\n};\n\n/**\n * Create a regular expression from the given `pattern`.\n *\n * ```js\n * var brackets = require('expand-brackets');\n * var re = brackets.makeRe('[[:alpha:]]');\n * console.log(re);\n * //=> /^(?:[a-zA-Z])$/\n * ```\n * @param {String} `pattern` The pattern to convert to regex.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\nbrackets.makeRe = function(pattern, options) {\n var res = brackets.create(pattern, options);\n var opts = extend({strictErrors: false}, options);\n return toRegex(res.output, opts);\n};\n\n/**\n * Parses the given POSIX character class `pattern` and returns an object\n * with the compiled `output` and optional source `map`.\n *\n * ```js\n * var brackets = require('expand-brackets');\n * console.log(brackets('[[:alpha:]]'));\n * // { options: { source: 'string' },\n * // input: '[[:alpha:]]',\n * // state: {},\n * // compilers:\n * // { eos: [Function],\n * // noop: [Function],\n * // bos: [Function],\n * // not: [Function],\n * // escape: [Function],\n * // text: [Function],\n * // posix: [Function],\n * // bracket: [Function],\n * // 'bracket.open': [Function],\n * // 'bracket.inner': [Function],\n * // 'bracket.literal': [Function],\n * // 'bracket.close': [Function] },\n * // output: '[a-zA-Z]',\n * // ast:\n * // { type: 'root',\n * // errors: [],\n * // nodes: [ [Object], [Object], [Object] ] },\n * // parsingErrors: [] }\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object}\n * @api public\n */\n\nbrackets.create = function(pattern, options) {\n var snapdragon = (options && options.snapdragon) || new Snapdragon(options);\n compilers(snapdragon);\n parsers(snapdragon);\n\n var ast = snapdragon.parse(pattern, options);\n ast.input = pattern;\n var res = snapdragon.compile(ast, options);\n res.input = pattern;\n return res;\n};\n\n/**\n * Expose `brackets` constructor, parsers and compilers\n */\n\nbrackets.compilers = compilers;\nbrackets.parsers = parsers;\n\n/**\n * Expose `brackets`\n * @type {Function}\n */\n\nmodule.exports = brackets;\n","'use strict';\n\nvar posix = require('posix-character-classes');\n\nmodule.exports = function(brackets) {\n brackets.compiler\n\n /**\n * Escaped characters\n */\n\n .set('escape', function(node) {\n return this.emit('\\\\' + node.val.replace(/^\\\\/, ''), node);\n })\n\n /**\n * Text\n */\n\n .set('text', function(node) {\n return this.emit(node.val.replace(/([{}])/g, '\\\\$1'), node);\n })\n\n /**\n * POSIX character classes\n */\n\n .set('posix', function(node) {\n if (node.val === '[::]') {\n return this.emit('\\\\[::\\\\]', node);\n }\n\n var val = posix[node.inner];\n if (typeof val === 'undefined') {\n val = '[' + node.inner + ']';\n }\n return this.emit(val, node);\n })\n\n /**\n * Non-posix brackets\n */\n\n .set('bracket', function(node) {\n return this.mapVisit(node.nodes);\n })\n .set('bracket.open', function(node) {\n return this.emit(node.val, node);\n })\n .set('bracket.inner', function(node) {\n var inner = node.val;\n\n if (inner === '[' || inner === ']') {\n return this.emit('\\\\' + node.val, node);\n }\n if (inner === '^]') {\n return this.emit('^\\\\]', node);\n }\n if (inner === '^') {\n return this.emit('^', node);\n }\n\n if (/-/.test(inner) && !/(\\d-\\d|\\w-\\w)/.test(inner)) {\n inner = inner.split('-').join('\\\\-');\n }\n\n var isNegated = inner.charAt(0) === '^';\n // add slashes to negated brackets, per spec\n if (isNegated && inner.indexOf('/') === -1) {\n inner += '/';\n }\n if (isNegated && inner.indexOf('.') === -1) {\n inner += '.';\n }\n\n // don't unescape `0` (octal literal)\n inner = inner.replace(/\\\\([1-9])/g, '$1');\n return this.emit(inner, node);\n })\n .set('bracket.close', function(node) {\n var val = node.val.replace(/^\\\\/, '');\n if (node.parent.escaped === true) {\n return this.emit('\\\\' + val, node);\n }\n return this.emit(val, node);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar define = require('define-property');\n\n/**\n * Text regex\n */\n\nvar TEXT_REGEX = '(\\\\[(?=.*\\\\])|\\\\])+';\nvar not = utils.createRegex(TEXT_REGEX);\n\n/**\n * Brackets parsers\n */\n\nfunction parsers(brackets) {\n brackets.state = brackets.state || {};\n brackets.parser.sets.bracket = brackets.parser.sets.bracket || [];\n brackets.parser\n\n .capture('escape', function() {\n if (this.isInside('bracket')) return;\n var pos = this.position();\n var m = this.match(/^\\\\(.)/);\n if (!m) return;\n\n return pos({\n type: 'escape',\n val: m[0]\n });\n })\n\n /**\n * Text parser\n */\n\n .capture('text', function() {\n if (this.isInside('bracket')) return;\n var pos = this.position();\n var m = this.match(not);\n if (!m || !m[0]) return;\n\n return pos({\n type: 'text',\n val: m[0]\n });\n })\n\n /**\n * POSIX character classes: \"[[:alpha:][:digits:]]\"\n */\n\n .capture('posix', function() {\n var pos = this.position();\n var m = this.match(/^\\[:(.*?):\\](?=.*\\])/);\n if (!m) return;\n\n var inside = this.isInside('bracket');\n if (inside) {\n brackets.posix++;\n }\n\n return pos({\n type: 'posix',\n insideBracket: inside,\n inner: m[1],\n val: m[0]\n });\n })\n\n /**\n * Bracket (noop)\n */\n\n .capture('bracket', function() {})\n\n /**\n * Open: '['\n */\n\n .capture('bracket.open', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(/^\\[(?=.*\\])/);\n if (!m) return;\n\n var prev = this.prev();\n var last = utils.last(prev.nodes);\n\n if (parsed.slice(-1) === '\\\\' && !this.isInside('bracket')) {\n last.val = last.val.slice(0, last.val.length - 1);\n return pos({\n type: 'escape',\n val: m[0]\n });\n }\n\n var open = pos({\n type: 'bracket.open',\n val: m[0]\n });\n\n if (last.type === 'bracket.open' || this.isInside('bracket')) {\n open.val = '\\\\' + open.val;\n open.type = 'bracket.inner';\n open.escaped = true;\n return open;\n }\n\n var node = pos({\n type: 'bracket',\n nodes: [open]\n });\n\n define(node, 'parent', prev);\n define(open, 'parent', node);\n this.push('bracket', node);\n prev.nodes.push(node);\n })\n\n /**\n * Bracket text\n */\n\n .capture('bracket.inner', function() {\n if (!this.isInside('bracket')) return;\n var pos = this.position();\n var m = this.match(not);\n if (!m || !m[0]) return;\n\n var next = this.input.charAt(0);\n var val = m[0];\n\n var node = pos({\n type: 'bracket.inner',\n val: val\n });\n\n if (val === '\\\\\\\\') {\n return node;\n }\n\n var first = val.charAt(0);\n var last = val.slice(-1);\n\n if (first === '!') {\n val = '^' + val.slice(1);\n }\n\n if (last === '\\\\' || (val === '^' && next === ']')) {\n val += this.input[0];\n this.consume(1);\n }\n\n node.val = val;\n return node;\n })\n\n /**\n * Close: ']'\n */\n\n .capture('bracket.close', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(/^\\]/);\n if (!m) return;\n\n var prev = this.prev();\n var last = utils.last(prev.nodes);\n\n if (parsed.slice(-1) === '\\\\' && !this.isInside('bracket')) {\n last.val = last.val.slice(0, last.val.length - 1);\n\n return pos({\n type: 'escape',\n val: m[0]\n });\n }\n\n var node = pos({\n type: 'bracket.close',\n rest: this.input,\n val: m[0]\n });\n\n if (last.type === 'bracket.open') {\n node.type = 'bracket.inner';\n node.escaped = true;\n return node;\n }\n\n var bracket = this.pop('bracket');\n if (!this.isType(bracket, 'bracket')) {\n if (this.options.strict) {\n throw new Error('missing opening \"[\"');\n }\n node.type = 'bracket.inner';\n node.escaped = true;\n return node;\n }\n\n bracket.nodes.push(node);\n define(node, 'parent', bracket);\n });\n}\n\n/**\n * Brackets parsers\n */\n\nmodule.exports = parsers;\n\n/**\n * Expose text regex\n */\n\nmodule.exports.TEXT_REGEX = TEXT_REGEX;\n","'use strict';\n\nvar toRegex = require('to-regex');\nvar regexNot = require('regex-not');\nvar cached;\n\n/**\n * Get the last element from `array`\n * @param {Array} `array`\n * @return {*}\n */\n\nexports.last = function(arr) {\n return arr[arr.length - 1];\n};\n\n/**\n * Create and cache regex to use for text nodes\n */\n\nexports.createRegex = function(pattern, include) {\n if (cached) return cached;\n var opts = {contains: true, strictClose: false};\n var not = regexNot.create(pattern, opts);\n var re;\n\n if (typeof include === 'string') {\n re = toRegex('^(?:' + include + '|' + not + ')', opts);\n } else {\n re = toRegex(not, opts);\n }\n\n return (cached = re);\n};\n","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","'use strict';\n\nvar isObject = require('is-extendable');\n\nmodule.exports = function extend(o/*, objects*/) {\n if (!isObject(o)) { o = {}; }\n\n var len = arguments.length;\n for (var i = 1; i < len; i++) {\n var obj = arguments[i];\n\n if (isObject(obj)) {\n assign(o, obj);\n }\n }\n return o;\n};\n\nfunction assign(a, b) {\n for (var key in b) {\n if (hasOwn(b, key)) {\n a[key] = b[key];\n }\n }\n}\n\n/**\n * Returns true if the given `key` is an own property of `obj`.\n */\n\nfunction hasOwn(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n","'use strict';\n\n/**\n * Module dependencies\n */\n\nvar extend = require('extend-shallow');\nvar unique = require('array-unique');\nvar toRegex = require('to-regex');\n\n/**\n * Local dependencies\n */\n\nvar compilers = require('./lib/compilers');\nvar parsers = require('./lib/parsers');\nvar Extglob = require('./lib/extglob');\nvar utils = require('./lib/utils');\nvar MAX_LENGTH = 1024 * 64;\n\n/**\n * Convert the given `extglob` pattern into a regex-compatible string. Returns\n * an object with the compiled result and the parsed AST.\n *\n * ```js\n * var extglob = require('extglob');\n * console.log(extglob('*.!(*a)'));\n * //=> '(?!\\\\.)[^/]*?\\\\.(?!(?!\\\\.)[^/]*?a\\\\b).*?'\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\nfunction extglob(pattern, options) {\n return extglob.create(pattern, options).output;\n}\n\n/**\n * Takes an array of strings and an extglob pattern and returns a new\n * array that contains only the strings that match the pattern.\n *\n * ```js\n * var extglob = require('extglob');\n * console.log(extglob.match(['a.a', 'a.b', 'a.c'], '*.!(*a)'));\n * //=> ['a.b', 'a.c']\n * ```\n * @param {Array} `list` Array of strings to match\n * @param {String} `pattern` Extglob pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of matches\n * @api public\n */\n\nextglob.match = function(list, pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected pattern to be a string');\n }\n\n list = utils.arrayify(list);\n var isMatch = extglob.matcher(pattern, options);\n var len = list.length;\n var idx = -1;\n var matches = [];\n\n while (++idx < len) {\n var ele = list[idx];\n\n if (isMatch(ele)) {\n matches.push(ele);\n }\n }\n\n // if no options were passed, uniquify results and return\n if (typeof options === 'undefined') {\n return unique(matches);\n }\n\n if (matches.length === 0) {\n if (options.failglob === true) {\n throw new Error('no matches found for \"' + pattern + '\"');\n }\n if (options.nonull === true || options.nullglob === true) {\n return [pattern.split('\\\\').join('')];\n }\n }\n\n return options.nodupes !== false ? unique(matches) : matches;\n};\n\n/**\n * Returns true if the specified `string` matches the given\n * extglob `pattern`.\n *\n * ```js\n * var extglob = require('extglob');\n *\n * console.log(extglob.isMatch('a.a', '*.!(*a)'));\n * //=> false\n * console.log(extglob.isMatch('a.b', '*.!(*a)'));\n * //=> true\n * ```\n * @param {String} `string` String to match\n * @param {String} `pattern` Extglob pattern\n * @param {String} `options`\n * @return {Boolean}\n * @api public\n */\n\nextglob.isMatch = function(str, pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected pattern to be a string');\n }\n\n if (typeof str !== 'string') {\n throw new TypeError('expected a string');\n }\n\n if (pattern === str) {\n return true;\n }\n\n if (pattern === '' || pattern === ' ' || pattern === '.') {\n return pattern === str;\n }\n\n var isMatch = utils.memoize('isMatch', pattern, options, extglob.matcher);\n return isMatch(str);\n};\n\n/**\n * Returns true if the given `string` contains the given pattern. Similar to `.isMatch` but\n * the pattern can match any part of the string.\n *\n * ```js\n * var extglob = require('extglob');\n * console.log(extglob.contains('aa/bb/cc', '*b'));\n * //=> true\n * console.log(extglob.contains('aa/bb/cc', '*d'));\n * //=> false\n * ```\n * @param {String} `str` The string to match.\n * @param {String} `pattern` Glob pattern to use for matching.\n * @param {Object} `options`\n * @return {Boolean} Returns true if the patter matches any part of `str`.\n * @api public\n */\n\nextglob.contains = function(str, pattern, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string');\n }\n\n if (pattern === '' || pattern === ' ' || pattern === '.') {\n return pattern === str;\n }\n\n var opts = extend({}, options, {contains: true});\n opts.strictClose = false;\n opts.strictOpen = false;\n return extglob.isMatch(str, pattern, opts);\n};\n\n/**\n * Takes an extglob pattern and returns a matcher function. The returned\n * function takes the string to match as its only argument.\n *\n * ```js\n * var extglob = require('extglob');\n * var isMatch = extglob.matcher('*.!(*a)');\n *\n * console.log(isMatch('a.a'));\n * //=> false\n * console.log(isMatch('a.b'));\n * //=> true\n * ```\n * @param {String} `pattern` Extglob pattern\n * @param {String} `options`\n * @return {Boolean}\n * @api public\n */\n\nextglob.matcher = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected pattern to be a string');\n }\n\n function matcher() {\n var re = extglob.makeRe(pattern, options);\n return function(str) {\n return re.test(str);\n };\n }\n\n return utils.memoize('matcher', pattern, options, matcher);\n};\n\n/**\n * Convert the given `extglob` pattern into a regex-compatible string. Returns\n * an object with the compiled result and the parsed AST.\n *\n * ```js\n * var extglob = require('extglob');\n * console.log(extglob.create('*.!(*a)').output);\n * //=> '(?!\\\\.)[^/]*?\\\\.(?!(?!\\\\.)[^/]*?a\\\\b).*?'\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\nextglob.create = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected pattern to be a string');\n }\n\n function create() {\n var ext = new Extglob(options);\n var ast = ext.parse(pattern, options);\n return ext.compile(ast, options);\n }\n\n return utils.memoize('create', pattern, options, create);\n};\n\n/**\n * Returns an array of matches captured by `pattern` in `string`, or `null`\n * if the pattern did not match.\n *\n * ```js\n * var extglob = require('extglob');\n * extglob.capture(pattern, string[, options]);\n *\n * console.log(extglob.capture('test/*.js', 'test/foo.js'));\n * //=> ['foo']\n * console.log(extglob.capture('test/*.js', 'foo/bar.css'));\n * //=> null\n * ```\n * @param {String} `pattern` Glob pattern to use for matching.\n * @param {String} `string` String to match\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`.\n * @api public\n */\n\nextglob.capture = function(pattern, str, options) {\n var re = extglob.makeRe(pattern, extend({capture: true}, options));\n\n function match() {\n return function(string) {\n var match = re.exec(string);\n if (!match) {\n return null;\n }\n\n return match.slice(1);\n };\n }\n\n var capture = utils.memoize('capture', pattern, options, match);\n return capture(str);\n};\n\n/**\n * Create a regular expression from the given `pattern` and `options`.\n *\n * ```js\n * var extglob = require('extglob');\n * var re = extglob.makeRe('*.!(*a)');\n * console.log(re);\n * //=> /^[^\\/]*?\\.(?![^\\/]*?a)[^\\/]*?$/\n * ```\n * @param {String} `pattern` The pattern to convert to regex.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\nextglob.makeRe = function(pattern, options) {\n if (pattern instanceof RegExp) {\n return pattern;\n }\n\n if (typeof pattern !== 'string') {\n throw new TypeError('expected pattern to be a string');\n }\n\n if (pattern.length > MAX_LENGTH) {\n throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters');\n }\n\n function makeRe() {\n var opts = extend({strictErrors: false}, options);\n if (opts.strictErrors === true) opts.strict = true;\n var res = extglob.create(pattern, opts);\n return toRegex(res.output, opts);\n }\n\n var regex = utils.memoize('makeRe', pattern, options, makeRe);\n if (regex.source.length > MAX_LENGTH) {\n throw new SyntaxError('potentially malicious regex detected');\n }\n\n return regex;\n};\n\n/**\n * Cache\n */\n\nextglob.cache = utils.cache;\nextglob.clearCache = function() {\n extglob.cache.__data__ = {};\n};\n\n/**\n * Expose `Extglob` constructor, parsers and compilers\n */\n\nextglob.Extglob = Extglob;\nextglob.compilers = compilers;\nextglob.parsers = parsers;\n\n/**\n * Expose `extglob`\n * @type {Function}\n */\n\nmodule.exports = extglob;\n","'use strict';\n\nvar brackets = require('expand-brackets');\n\n/**\n * Extglob compilers\n */\n\nmodule.exports = function(extglob) {\n function star() {\n if (typeof extglob.options.star === 'function') {\n return extglob.options.star.apply(this, arguments);\n }\n if (typeof extglob.options.star === 'string') {\n return extglob.options.star;\n }\n return '.*?';\n }\n\n /**\n * Use `expand-brackets` compilers\n */\n\n extglob.use(brackets.compilers);\n extglob.compiler\n\n /**\n * Escaped: \"\\\\*\"\n */\n\n .set('escape', function(node) {\n return this.emit(node.val, node);\n })\n\n /**\n * Dot: \".\"\n */\n\n .set('dot', function(node) {\n return this.emit('\\\\' + node.val, node);\n })\n\n /**\n * Question mark: \"?\"\n */\n\n .set('qmark', function(node) {\n var val = '[^\\\\\\\\/.]';\n var prev = this.prev();\n\n if (node.parsed.slice(-1) === '(') {\n var ch = node.rest.charAt(0);\n if (ch !== '!' && ch !== '=' && ch !== ':') {\n return this.emit(val, node);\n }\n return this.emit(node.val, node);\n }\n\n if (prev.type === 'text' && prev.val) {\n return this.emit(val, node);\n }\n\n if (node.val.length > 1) {\n val += '{' + node.val.length + '}';\n }\n return this.emit(val, node);\n })\n\n /**\n * Plus: \"+\"\n */\n\n .set('plus', function(node) {\n var prev = node.parsed.slice(-1);\n if (prev === ']' || prev === ')') {\n return this.emit(node.val, node);\n }\n var ch = this.output.slice(-1);\n if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) {\n return this.emit('\\\\+', node);\n }\n if (/\\w/.test(ch) && !node.inside) {\n return this.emit('+\\\\+?', node);\n }\n return this.emit('+', node);\n })\n\n /**\n * Star: \"*\"\n */\n\n .set('star', function(node) {\n var prev = this.prev();\n var prefix = prev.type !== 'text' && prev.type !== 'escape'\n ? '(?!\\\\.)'\n : '';\n\n return this.emit(prefix + star.call(this, node), node);\n })\n\n /**\n * Parens\n */\n\n .set('paren', function(node) {\n return this.mapVisit(node.nodes);\n })\n .set('paren.open', function(node) {\n var capture = this.options.capture ? '(' : '';\n\n switch (node.parent.prefix) {\n case '!':\n case '^':\n return this.emit(capture + '(?:(?!(?:', node);\n case '*':\n case '+':\n case '?':\n case '@':\n return this.emit(capture + '(?:', node);\n default: {\n var val = node.val;\n if (this.options.bash === true) {\n val = '\\\\' + val;\n } else if (!this.options.capture && val === '(' && node.parent.rest[0] !== '?') {\n val += '?:';\n }\n\n return this.emit(val, node);\n }\n }\n })\n .set('paren.close', function(node) {\n var capture = this.options.capture ? ')' : '';\n\n switch (node.prefix) {\n case '!':\n case '^':\n var prefix = /^(\\)|$)/.test(node.rest) ? '$' : '';\n var str = star.call(this, node);\n\n // if the extglob has a slash explicitly defined, we know the user wants\n // to match slashes, so we need to ensure the \"star\" regex allows for it\n if (node.parent.hasSlash && !this.options.star && this.options.slash !== false) {\n str = '.*?';\n }\n\n return this.emit(prefix + ('))' + str + ')') + capture, node);\n case '*':\n case '+':\n case '?':\n return this.emit(')' + node.prefix + capture, node);\n case '@':\n return this.emit(')' + capture, node);\n default: {\n var val = (this.options.bash === true ? '\\\\' : '') + ')';\n return this.emit(val, node);\n }\n }\n })\n\n /**\n * Text\n */\n\n .set('text', function(node) {\n var val = node.val.replace(/[\\[\\]]/g, '\\\\$&');\n return this.emit(val, node);\n });\n};\n","'use strict';\n\n/**\n * Module dependencies\n */\n\nvar Snapdragon = require('snapdragon');\nvar define = require('define-property');\nvar extend = require('extend-shallow');\n\n/**\n * Local dependencies\n */\n\nvar compilers = require('./compilers');\nvar parsers = require('./parsers');\n\n/**\n * Customize Snapdragon parser and renderer\n */\n\nfunction Extglob(options) {\n this.options = extend({source: 'extglob'}, options);\n this.snapdragon = this.options.snapdragon || new Snapdragon(this.options);\n this.snapdragon.patterns = this.snapdragon.patterns || {};\n this.compiler = this.snapdragon.compiler;\n this.parser = this.snapdragon.parser;\n\n compilers(this.snapdragon);\n parsers(this.snapdragon);\n\n /**\n * Override Snapdragon `.parse` method\n */\n\n define(this.snapdragon, 'parse', function(str, options) {\n var parsed = Snapdragon.prototype.parse.apply(this, arguments);\n parsed.input = str;\n\n // escape unmatched brace/bracket/parens\n var last = this.parser.stack.pop();\n if (last && this.options.strict !== true) {\n var node = last.nodes[0];\n node.val = '\\\\' + node.val;\n var sibling = node.parent.nodes[1];\n if (sibling.type === 'star') {\n sibling.loose = true;\n }\n }\n\n // add non-enumerable parser reference\n define(parsed, 'parser', this.parser);\n return parsed;\n });\n\n /**\n * Decorate `.parse` method\n */\n\n define(this, 'parse', function(ast, options) {\n return this.snapdragon.parse.apply(this.snapdragon, arguments);\n });\n\n /**\n * Decorate `.compile` method\n */\n\n define(this, 'compile', function(ast, options) {\n return this.snapdragon.compile.apply(this.snapdragon, arguments);\n });\n\n}\n\n/**\n * Expose `Extglob`\n */\n\nmodule.exports = Extglob;\n","'use strict';\n\nvar brackets = require('expand-brackets');\nvar define = require('define-property');\nvar utils = require('./utils');\n\n/**\n * Characters to use in text regex (we want to \"not\" match\n * characters that are matched by other parsers)\n */\n\nvar TEXT_REGEX = '([!@*?+]?\\\\(|\\\\)|[*?.+\\\\\\\\]|\\\\[:?(?=.*\\\\])|:?\\\\])+';\nvar not = utils.createRegex(TEXT_REGEX);\n\n/**\n * Extglob parsers\n */\n\nfunction parsers(extglob) {\n extglob.state = extglob.state || {};\n\n /**\n * Use `expand-brackets` parsers\n */\n\n extglob.use(brackets.parsers);\n extglob.parser.sets.paren = extglob.parser.sets.paren || [];\n extglob.parser\n\n /**\n * Extglob open: \"*(\"\n */\n\n .capture('paren.open', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(/^([!@*?+])?\\(/);\n if (!m) return;\n\n var prev = this.prev();\n var prefix = m[1];\n var val = m[0];\n\n var open = pos({\n type: 'paren.open',\n parsed: parsed,\n val: val\n });\n\n var node = pos({\n type: 'paren',\n prefix: prefix,\n nodes: [open]\n });\n\n // if nested negation extglobs, just cancel them out to simplify\n if (prefix === '!' && prev.type === 'paren' && prev.prefix === '!') {\n prev.prefix = '@';\n node.prefix = '@';\n }\n\n define(node, 'rest', this.input);\n define(node, 'parsed', parsed);\n define(node, 'parent', prev);\n define(open, 'parent', node);\n\n this.push('paren', node);\n prev.nodes.push(node);\n })\n\n /**\n * Extglob close: \")\"\n */\n\n .capture('paren.close', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(/^\\)/);\n if (!m) return;\n\n var parent = this.pop('paren');\n var node = pos({\n type: 'paren.close',\n rest: this.input,\n parsed: parsed,\n val: m[0]\n });\n\n if (!this.isType(parent, 'paren')) {\n if (this.options.strict) {\n throw new Error('missing opening paren: \"(\"');\n }\n node.escaped = true;\n return node;\n }\n\n node.prefix = parent.prefix;\n parent.nodes.push(node);\n define(node, 'parent', parent);\n })\n\n /**\n * Escape: \"\\\\.\"\n */\n\n .capture('escape', function() {\n var pos = this.position();\n var m = this.match(/^\\\\(.)/);\n if (!m) return;\n\n return pos({\n type: 'escape',\n val: m[0],\n ch: m[1]\n });\n })\n\n /**\n * Question marks: \"?\"\n */\n\n .capture('qmark', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(/^\\?+(?!\\()/);\n if (!m) return;\n extglob.state.metachar = true;\n return pos({\n type: 'qmark',\n rest: this.input,\n parsed: parsed,\n val: m[0]\n });\n })\n\n /**\n * Character parsers\n */\n\n .capture('star', /^\\*(?!\\()/)\n .capture('plus', /^\\+(?!\\()/)\n .capture('dot', /^\\./)\n .capture('text', not);\n};\n\n/**\n * Expose text regex string\n */\n\nmodule.exports.TEXT_REGEX = TEXT_REGEX;\n\n/**\n * Extglob parsers\n */\n\nmodule.exports = parsers;\n","'use strict';\n\nvar regex = require('regex-not');\nvar Cache = require('fragment-cache');\n\n/**\n * Utils\n */\n\nvar utils = module.exports;\nvar cache = utils.cache = new Cache();\n\n/**\n * Cast `val` to an array\n * @return {Array}\n */\n\nutils.arrayify = function(val) {\n if (!Array.isArray(val)) {\n return [val];\n }\n return val;\n};\n\n/**\n * Memoize a generated regex or function\n */\n\nutils.memoize = function(type, pattern, options, fn) {\n var key = utils.createKey(type + pattern, options);\n\n if (cache.has(type, key)) {\n return cache.get(type, key);\n }\n\n var val = fn(pattern, options);\n if (options && options.cache === false) {\n return val;\n }\n\n cache.set(type, key, val);\n return val;\n};\n\n/**\n * Create the key to use for memoization. The key is generated\n * by iterating over the options and concatenating key-value pairs\n * to the pattern string.\n */\n\nutils.createKey = function(pattern, options) {\n var key = pattern;\n if (typeof options === 'undefined') {\n return key;\n }\n for (var prop in options) {\n key += ';' + prop + '=' + String(options[prop]);\n }\n return key;\n};\n\n/**\n * Create the regex to use for matching text\n */\n\nutils.createRegex = function(str) {\n var opts = {contains: true, strictClose: false};\n return regex(str, opts);\n};\n","/*!\n * define-property <https://github.com/jonschlinkert/define-property>\n *\n * Copyright (c) 2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isDescriptor = require('is-descriptor');\n\nmodule.exports = function defineProperty(obj, prop, val) {\n if (typeof obj !== 'object' && typeof obj !== 'function') {\n throw new TypeError('expected an object or function.');\n }\n\n if (typeof prop !== 'string') {\n throw new TypeError('expected `prop` to be a string.');\n }\n\n if (isDescriptor(val) && ('set' in val || 'get' in val)) {\n return Object.defineProperty(obj, prop, val);\n }\n\n return Object.defineProperty(obj, prop, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: val\n });\n};\n","/*!\n * fill-range <https://github.com/jonschlinkert/fill-range>\n *\n * Copyright (c) 2014-2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar util = require('util');\nvar isNumber = require('is-number');\nvar extend = require('extend-shallow');\nvar repeat = require('repeat-string');\nvar toRegex = require('to-regex-range');\n\n/**\n * Return a range of numbers or letters.\n *\n * @param {String} `start` Start of the range\n * @param {String} `stop` End of the range\n * @param {String} `step` Increment or decrement to use.\n * @param {Function} `fn` Custom function to modify each element in the range.\n * @return {Array}\n */\n\nfunction fillRange(start, stop, step, options) {\n if (typeof start === 'undefined') {\n return [];\n }\n\n if (typeof stop === 'undefined' || start === stop) {\n // special case, for handling negative zero\n var isString = typeof start === 'string';\n if (isNumber(start) && !toNumber(start)) {\n return [isString ? '0' : 0];\n }\n return [start];\n }\n\n if (typeof step !== 'number' && typeof step !== 'string') {\n options = step;\n step = undefined;\n }\n\n if (typeof options === 'function') {\n options = { transform: options };\n }\n\n var opts = extend({step: step}, options);\n if (opts.step && !isValidNumber(opts.step)) {\n if (opts.strictRanges === true) {\n throw new TypeError('expected options.step to be a number');\n }\n return [];\n }\n\n opts.isNumber = isValidNumber(start) && isValidNumber(stop);\n if (!opts.isNumber && !isValid(start, stop)) {\n if (opts.strictRanges === true) {\n throw new RangeError('invalid range arguments: ' + util.inspect([start, stop]));\n }\n return [];\n }\n\n opts.isPadded = isPadded(start) || isPadded(stop);\n opts.toString = opts.stringify\n || typeof opts.step === 'string'\n || typeof start === 'string'\n || typeof stop === 'string'\n || !opts.isNumber;\n\n if (opts.isPadded) {\n opts.maxLength = Math.max(String(start).length, String(stop).length);\n }\n\n // support legacy minimatch/fill-range options\n if (typeof opts.optimize === 'boolean') opts.toRegex = opts.optimize;\n if (typeof opts.makeRe === 'boolean') opts.toRegex = opts.makeRe;\n return expand(start, stop, opts);\n}\n\nfunction expand(start, stop, options) {\n var a = options.isNumber ? toNumber(start) : start.charCodeAt(0);\n var b = options.isNumber ? toNumber(stop) : stop.charCodeAt(0);\n\n var step = Math.abs(toNumber(options.step)) || 1;\n if (options.toRegex && step === 1) {\n return toRange(a, b, start, stop, options);\n }\n\n var zero = {greater: [], lesser: []};\n var asc = a < b;\n var arr = new Array(Math.round((asc ? b - a : a - b) / step));\n var idx = 0;\n\n while (asc ? a <= b : a >= b) {\n var val = options.isNumber ? a : String.fromCharCode(a);\n if (options.toRegex && (val >= 0 || !options.isNumber)) {\n zero.greater.push(val);\n } else {\n zero.lesser.push(Math.abs(val));\n }\n\n if (options.isPadded) {\n val = zeros(val, options);\n }\n\n if (options.toString) {\n val = String(val);\n }\n\n if (typeof options.transform === 'function') {\n arr[idx++] = options.transform(val, a, b, step, idx, arr, options);\n } else {\n arr[idx++] = val;\n }\n\n if (asc) {\n a += step;\n } else {\n a -= step;\n }\n }\n\n if (options.toRegex === true) {\n return toSequence(arr, zero, options);\n }\n return arr;\n}\n\nfunction toRange(a, b, start, stop, options) {\n if (options.isPadded) {\n return toRegex(start, stop, options);\n }\n\n if (options.isNumber) {\n return toRegex(Math.min(a, b), Math.max(a, b), options);\n }\n\n var start = String.fromCharCode(Math.min(a, b));\n var stop = String.fromCharCode(Math.max(a, b));\n return '[' + start + '-' + stop + ']';\n}\n\nfunction toSequence(arr, zeros, options) {\n var greater = '', lesser = '';\n if (zeros.greater.length) {\n greater = zeros.greater.join('|');\n }\n if (zeros.lesser.length) {\n lesser = '-(' + zeros.lesser.join('|') + ')';\n }\n var res = greater && lesser\n ? greater + '|' + lesser\n : greater || lesser;\n\n if (options.capture) {\n return '(' + res + ')';\n }\n return res;\n}\n\nfunction zeros(val, options) {\n if (options.isPadded) {\n var str = String(val);\n var len = str.length;\n var dash = '';\n if (str.charAt(0) === '-') {\n dash = '-';\n str = str.slice(1);\n }\n var diff = options.maxLength - len;\n var pad = repeat('0', diff);\n val = (dash + pad + str);\n }\n if (options.stringify) {\n return String(val);\n }\n return val;\n}\n\nfunction toNumber(val) {\n return Number(val) || 0;\n}\n\nfunction isPadded(str) {\n return /^-?0\\d/.test(str);\n}\n\nfunction isValid(min, max) {\n return (isValidNumber(min) || isValidLetter(min))\n && (isValidNumber(max) || isValidLetter(max));\n}\n\nfunction isValidLetter(ch) {\n return typeof ch === 'string' && ch.length === 1 && /^\\w+$/.test(ch);\n}\n\nfunction isValidNumber(n) {\n return isNumber(n) && !/\\./.test(n);\n}\n\n/**\n * Expose `fillRange`\n * @type {Function}\n */\n\nmodule.exports = fillRange;\n","/*!\n * for-in <https://github.com/jonschlinkert/for-in>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function forIn(obj, fn, thisArg) {\n for (var key in obj) {\n if (fn.call(thisArg, obj[key], key, obj) === false) {\n break;\n }\n }\n};\n","/*!\n * fragment-cache <https://github.com/jonschlinkert/fragment-cache>\n *\n * Copyright (c) 2016-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar MapCache = require('map-cache');\n\n/**\n * Create a new `FragmentCache` with an optional object to use for `caches`.\n *\n * ```js\n * var fragment = new FragmentCache();\n * ```\n * @name FragmentCache\n * @param {String} `cacheName`\n * @return {Object} Returns the [map-cache][] instance.\n * @api public\n */\n\nfunction FragmentCache(caches) {\n this.caches = caches || {};\n}\n\n/**\n * Prototype\n */\n\nFragmentCache.prototype = {\n\n /**\n * Get cache `name` from the `fragment.caches` object. Creates a new\n * `MapCache` if it doesn't already exist.\n *\n * ```js\n * var cache = fragment.cache('files');\n * console.log(fragment.caches.hasOwnProperty('files'));\n * //=> true\n * ```\n * @name .cache\n * @param {String} `cacheName`\n * @return {Object} Returns the [map-cache][] instance.\n * @api public\n */\n\n cache: function(cacheName) {\n return this.caches[cacheName] || (this.caches[cacheName] = new MapCache());\n },\n\n /**\n * Set a value for property `key` on cache `name`\n *\n * ```js\n * fragment.set('files', 'somefile.js', new File({path: 'somefile.js'}));\n * ```\n * @name .set\n * @param {String} `name`\n * @param {String} `key` Property name to set\n * @param {any} `val` The value of `key`\n * @return {Object} The cache instance for chaining\n * @api public\n */\n\n set: function(cacheName, key, val) {\n var cache = this.cache(cacheName);\n cache.set(key, val);\n return cache;\n },\n\n /**\n * Returns true if a non-undefined value is set for `key` on fragment cache `name`.\n *\n * ```js\n * var cache = fragment.cache('files');\n * cache.set('somefile.js');\n *\n * console.log(cache.has('somefile.js'));\n * //=> true\n *\n * console.log(cache.has('some-other-file.js'));\n * //=> false\n * ```\n * @name .has\n * @param {String} `name` Cache name\n * @param {String} `key` Optionally specify a property to check for on cache `name`\n * @return {Boolean}\n * @api public\n */\n\n has: function(cacheName, key) {\n return typeof this.get(cacheName, key) !== 'undefined';\n },\n\n /**\n * Get `name`, or if specified, the value of `key`. Invokes the [cache]() method,\n * so that cache `name` will be created it doesn't already exist. If `key` is not passed,\n * the entire cache (`name`) is returned.\n *\n * ```js\n * var Vinyl = require('vinyl');\n * var cache = fragment.cache('files');\n * cache.set('somefile.js', new Vinyl({path: 'somefile.js'}));\n * console.log(cache.get('somefile.js'));\n * //=> <File \"somefile.js\">\n * ```\n * @name .get\n * @param {String} `name`\n * @return {Object} Returns cache `name`, or the value of `key` if specified\n * @api public\n */\n\n get: function(name, key) {\n var cache = this.cache(name);\n if (typeof key === 'string') {\n return cache.get(key);\n }\n return cache;\n }\n};\n\n/**\n * Expose `FragmentCache`\n */\n\nexports = module.exports = FragmentCache;\n","/*!\n * get-value <https://github.com/jonschlinkert/get-value>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\nmodule.exports = function(obj, prop, a, b, c) {\n if (!isObject(obj) || !prop) {\n return obj;\n }\n\n prop = toString(prop);\n\n // allowing for multiple properties to be passed as\n // a string or array, but much faster (3-4x) than doing\n // `[].slice.call(arguments)`\n if (a) prop += '.' + toString(a);\n if (b) prop += '.' + toString(b);\n if (c) prop += '.' + toString(c);\n\n if (prop in obj) {\n return obj[prop];\n }\n\n var segs = prop.split('.');\n var len = segs.length;\n var i = -1;\n\n while (obj && (++i < len)) {\n var key = segs[i];\n while (key[key.length - 1] === '\\\\') {\n key = key.slice(0, -1) + '.' + segs[++i];\n }\n obj = obj[key];\n }\n return obj;\n};\n\nfunction isObject(val) {\n return val !== null && (typeof val === 'object' || typeof val === 'function');\n}\n\nfunction toString(val) {\n if (!val) return '';\n if (Array.isArray(val)) {\n return val.join('.');\n }\n return val;\n}\n","/*!\n * has-value <https://github.com/jonschlinkert/has-value>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\nvar hasValues = require('has-values');\nvar get = require('get-value');\n\nmodule.exports = function(val, prop) {\n return hasValues(isObject(val) && prop ? get(val, prop) : val);\n};\n","/*!\n * has-values <https://github.com/jonschlinkert/has-values>\n *\n * Copyright (c) 2014-2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\nvar isNumber = require('is-number');\n\nmodule.exports = function hasValue(val) {\n // is-number checks for NaN and other edge cases\n if (isNumber(val)) {\n return true;\n }\n\n switch (typeOf(val)) {\n case 'null':\n case 'boolean':\n case 'function':\n return true;\n case 'string':\n case 'arguments':\n return val.length !== 0;\n case 'error':\n return val.message !== '';\n case 'array':\n var len = val.length;\n if (len === 0) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n if (hasValue(val[i])) {\n return true;\n }\n }\n return false;\n case 'file':\n case 'map':\n case 'set':\n return val.size !== 0;\n case 'object':\n var keys = Object.keys(val);\n if (keys.length === 0) {\n return false;\n }\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (hasValue(val[key])) {\n return true;\n }\n }\n return false;\n default: {\n return false;\n }\n }\n};\n","var isBuffer = require('is-buffer');\nvar toString = Object.prototype.toString;\n\n/**\n * Get the native `typeof` a value.\n *\n * @param {*} `val`\n * @return {*} Native javascript type\n */\n\nmodule.exports = function kindOf(val) {\n // primitivies\n if (typeof val === 'undefined') {\n return 'undefined';\n }\n if (val === null) {\n return 'null';\n }\n if (val === true || val === false || val instanceof Boolean) {\n return 'boolean';\n }\n if (typeof val === 'string' || val instanceof String) {\n return 'string';\n }\n if (typeof val === 'number' || val instanceof Number) {\n return 'number';\n }\n\n // functions\n if (typeof val === 'function' || val instanceof Function) {\n return 'function';\n }\n\n // array\n if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {\n return 'array';\n }\n\n // check for instances of RegExp and Date before calling `toString`\n if (val instanceof RegExp) {\n return 'regexp';\n }\n if (val instanceof Date) {\n return 'date';\n }\n\n // other objects\n var type = toString.call(val);\n\n if (type === '[object RegExp]') {\n return 'regexp';\n }\n if (type === '[object Date]') {\n return 'date';\n }\n if (type === '[object Arguments]') {\n return 'arguments';\n }\n if (type === '[object Error]') {\n return 'error';\n }\n if (type === '[object Promise]') {\n return 'promise';\n }\n\n // buffer\n if (isBuffer(val)) {\n return 'buffer';\n }\n\n // es6: Map, WeakMap, Set, WeakSet\n if (type === '[object Set]') {\n return 'set';\n }\n if (type === '[object WeakSet]') {\n return 'weakset';\n }\n if (type === '[object Map]') {\n return 'map';\n }\n if (type === '[object WeakMap]') {\n return 'weakmap';\n }\n if (type === '[object Symbol]') {\n return 'symbol';\n }\n\n // typed arrays\n if (type === '[object Int8Array]') {\n return 'int8array';\n }\n if (type === '[object Uint8Array]') {\n return 'uint8array';\n }\n if (type === '[object Uint8ClampedArray]') {\n return 'uint8clampedarray';\n }\n if (type === '[object Int16Array]') {\n return 'int16array';\n }\n if (type === '[object Uint16Array]') {\n return 'uint16array';\n }\n if (type === '[object Int32Array]') {\n return 'int32array';\n }\n if (type === '[object Uint32Array]') {\n return 'uint32array';\n }\n if (type === '[object Float32Array]') {\n return 'float32array';\n }\n if (type === '[object Float64Array]') {\n return 'float64array';\n }\n\n // must be a plain object\n return 'object';\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","/*!\n * is-accessor-descriptor <https://github.com/jonschlinkert/is-accessor-descriptor>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\n\n// accessor descriptor properties\nvar accessor = {\n get: 'function',\n set: 'function',\n configurable: 'boolean',\n enumerable: 'boolean'\n};\n\nfunction isAccessorDescriptor(obj, prop) {\n if (typeof prop === 'string') {\n var val = Object.getOwnPropertyDescriptor(obj, prop);\n return typeof val !== 'undefined';\n }\n\n if (typeOf(obj) !== 'object') {\n return false;\n }\n\n if (has(obj, 'value') || has(obj, 'writable')) {\n return false;\n }\n\n if (!has(obj, 'get') || typeof obj.get !== 'function') {\n return false;\n }\n\n // tldr: it's valid to have \"set\" be undefined\n // \"set\" might be undefined if `Object.getOwnPropertyDescriptor`\n // was used to get the value, and only `get` was defined by the user\n if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') {\n return false;\n }\n\n for (var key in obj) {\n if (!accessor.hasOwnProperty(key)) {\n continue;\n }\n\n if (typeOf(obj[key]) === accessor[key]) {\n continue;\n }\n\n if (typeof obj[key] !== 'undefined') {\n return false;\n }\n }\n return true;\n}\n\nfunction has(obj, key) {\n return {}.hasOwnProperty.call(obj, key);\n}\n\n/**\n * Expose `isAccessorDescriptor`\n */\n\nmodule.exports = isAccessorDescriptor;\n","var toString = Object.prototype.toString;\n\nmodule.exports = function kindOf(val) {\n if (val === void 0) return 'undefined';\n if (val === null) return 'null';\n\n var type = typeof val;\n if (type === 'boolean') return 'boolean';\n if (type === 'string') return 'string';\n if (type === 'number') return 'number';\n if (type === 'symbol') return 'symbol';\n if (type === 'function') {\n return isGeneratorFn(val) ? 'generatorfunction' : 'function';\n }\n\n if (isArray(val)) return 'array';\n if (isBuffer(val)) return 'buffer';\n if (isArguments(val)) return 'arguments';\n if (isDate(val)) return 'date';\n if (isError(val)) return 'error';\n if (isRegexp(val)) return 'regexp';\n\n switch (ctorName(val)) {\n case 'Symbol': return 'symbol';\n case 'Promise': return 'promise';\n\n // Set, Map, WeakSet, WeakMap\n case 'WeakMap': return 'weakmap';\n case 'WeakSet': return 'weakset';\n case 'Map': return 'map';\n case 'Set': return 'set';\n\n // 8-bit typed arrays\n case 'Int8Array': return 'int8array';\n case 'Uint8Array': return 'uint8array';\n case 'Uint8ClampedArray': return 'uint8clampedarray';\n\n // 16-bit typed arrays\n case 'Int16Array': return 'int16array';\n case 'Uint16Array': return 'uint16array';\n\n // 32-bit typed arrays\n case 'Int32Array': return 'int32array';\n case 'Uint32Array': return 'uint32array';\n case 'Float32Array': return 'float32array';\n case 'Float64Array': return 'float64array';\n }\n\n if (isGeneratorObj(val)) {\n return 'generator';\n }\n\n // Non-plain objects\n type = toString.call(val);\n switch (type) {\n case '[object Object]': return 'object';\n // iterators\n case '[object Map Iterator]': return 'mapiterator';\n case '[object Set Iterator]': return 'setiterator';\n case '[object String Iterator]': return 'stringiterator';\n case '[object Array Iterator]': return 'arrayiterator';\n }\n\n // other\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, '');\n};\n\nfunction ctorName(val) {\n return val.constructor ? val.constructor.name : null;\n}\n\nfunction isArray(val) {\n if (Array.isArray) return Array.isArray(val);\n return val instanceof Array;\n}\n\nfunction isError(val) {\n return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === 'function'\n && typeof val.getDate === 'function'\n && typeof val.setDate === 'function';\n}\n\nfunction isRegexp(val) {\n if (val instanceof RegExp) return true;\n return typeof val.flags === 'string'\n && typeof val.ignoreCase === 'boolean'\n && typeof val.multiline === 'boolean'\n && typeof val.global === 'boolean';\n}\n\nfunction isGeneratorFn(name, val) {\n return ctorName(name) === 'GeneratorFunction';\n}\n\nfunction isGeneratorObj(val) {\n return typeof val.throw === 'function'\n && typeof val.return === 'function'\n && typeof val.next === 'function';\n}\n\nfunction isArguments(val) {\n try {\n if (typeof val.length === 'number' && typeof val.callee === 'function') {\n return true;\n }\n } catch (err) {\n if (err.message.indexOf('callee') !== -1) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * If you need to support Safari 5-7 (8-10 yr-old browser),\n * take a look at https://github.com/feross/is-buffer\n */\n\nfunction isBuffer(val) {\n if (val.constructor && typeof val.constructor.isBuffer === 'function') {\n return val.constructor.isBuffer(val);\n }\n return false;\n}\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","/*!\n * is-data-descriptor <https://github.com/jonschlinkert/is-data-descriptor>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\n\nmodule.exports = function isDataDescriptor(obj, prop) {\n // data descriptor properties\n var data = {\n configurable: 'boolean',\n enumerable: 'boolean',\n writable: 'boolean'\n };\n\n if (typeOf(obj) !== 'object') {\n return false;\n }\n\n if (typeof prop === 'string') {\n var val = Object.getOwnPropertyDescriptor(obj, prop);\n return typeof val !== 'undefined';\n }\n\n if (!('value' in obj) && !('writable' in obj)) {\n return false;\n }\n\n for (var key in obj) {\n if (key === 'value') continue;\n\n if (!data.hasOwnProperty(key)) {\n continue;\n }\n\n if (typeOf(obj[key]) === data[key]) {\n continue;\n }\n\n if (typeof obj[key] !== 'undefined') {\n return false;\n }\n }\n return true;\n};\n","var toString = Object.prototype.toString;\n\nmodule.exports = function kindOf(val) {\n if (val === void 0) return 'undefined';\n if (val === null) return 'null';\n\n var type = typeof val;\n if (type === 'boolean') return 'boolean';\n if (type === 'string') return 'string';\n if (type === 'number') return 'number';\n if (type === 'symbol') return 'symbol';\n if (type === 'function') {\n return isGeneratorFn(val) ? 'generatorfunction' : 'function';\n }\n\n if (isArray(val)) return 'array';\n if (isBuffer(val)) return 'buffer';\n if (isArguments(val)) return 'arguments';\n if (isDate(val)) return 'date';\n if (isError(val)) return 'error';\n if (isRegexp(val)) return 'regexp';\n\n switch (ctorName(val)) {\n case 'Symbol': return 'symbol';\n case 'Promise': return 'promise';\n\n // Set, Map, WeakSet, WeakMap\n case 'WeakMap': return 'weakmap';\n case 'WeakSet': return 'weakset';\n case 'Map': return 'map';\n case 'Set': return 'set';\n\n // 8-bit typed arrays\n case 'Int8Array': return 'int8array';\n case 'Uint8Array': return 'uint8array';\n case 'Uint8ClampedArray': return 'uint8clampedarray';\n\n // 16-bit typed arrays\n case 'Int16Array': return 'int16array';\n case 'Uint16Array': return 'uint16array';\n\n // 32-bit typed arrays\n case 'Int32Array': return 'int32array';\n case 'Uint32Array': return 'uint32array';\n case 'Float32Array': return 'float32array';\n case 'Float64Array': return 'float64array';\n }\n\n if (isGeneratorObj(val)) {\n return 'generator';\n }\n\n // Non-plain objects\n type = toString.call(val);\n switch (type) {\n case '[object Object]': return 'object';\n // iterators\n case '[object Map Iterator]': return 'mapiterator';\n case '[object Set Iterator]': return 'setiterator';\n case '[object String Iterator]': return 'stringiterator';\n case '[object Array Iterator]': return 'arrayiterator';\n }\n\n // other\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, '');\n};\n\nfunction ctorName(val) {\n return val.constructor ? val.constructor.name : null;\n}\n\nfunction isArray(val) {\n if (Array.isArray) return Array.isArray(val);\n return val instanceof Array;\n}\n\nfunction isError(val) {\n return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === 'function'\n && typeof val.getDate === 'function'\n && typeof val.setDate === 'function';\n}\n\nfunction isRegexp(val) {\n if (val instanceof RegExp) return true;\n return typeof val.flags === 'string'\n && typeof val.ignoreCase === 'boolean'\n && typeof val.multiline === 'boolean'\n && typeof val.global === 'boolean';\n}\n\nfunction isGeneratorFn(name, val) {\n return ctorName(name) === 'GeneratorFunction';\n}\n\nfunction isGeneratorObj(val) {\n return typeof val.throw === 'function'\n && typeof val.return === 'function'\n && typeof val.next === 'function';\n}\n\nfunction isArguments(val) {\n try {\n if (typeof val.length === 'number' && typeof val.callee === 'function') {\n return true;\n }\n } catch (err) {\n if (err.message.indexOf('callee') !== -1) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * If you need to support Safari 5-7 (8-10 yr-old browser),\n * take a look at https://github.com/feross/is-buffer\n */\n\nfunction isBuffer(val) {\n if (val.constructor && typeof val.constructor.isBuffer === 'function') {\n return val.constructor.isBuffer(val);\n }\n return false;\n}\n","/*!\n * is-descriptor <https://github.com/jonschlinkert/is-descriptor>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\nvar isAccessor = require('is-accessor-descriptor');\nvar isData = require('is-data-descriptor');\n\nmodule.exports = function isDescriptor(obj, key) {\n if (typeOf(obj) !== 'object') {\n return false;\n }\n if ('get' in obj) {\n return isAccessor(obj, key);\n }\n return isData(obj, key);\n};\n","var toString = Object.prototype.toString;\n\nmodule.exports = function kindOf(val) {\n if (val === void 0) return 'undefined';\n if (val === null) return 'null';\n\n var type = typeof val;\n if (type === 'boolean') return 'boolean';\n if (type === 'string') return 'string';\n if (type === 'number') return 'number';\n if (type === 'symbol') return 'symbol';\n if (type === 'function') {\n return isGeneratorFn(val) ? 'generatorfunction' : 'function';\n }\n\n if (isArray(val)) return 'array';\n if (isBuffer(val)) return 'buffer';\n if (isArguments(val)) return 'arguments';\n if (isDate(val)) return 'date';\n if (isError(val)) return 'error';\n if (isRegexp(val)) return 'regexp';\n\n switch (ctorName(val)) {\n case 'Symbol': return 'symbol';\n case 'Promise': return 'promise';\n\n // Set, Map, WeakSet, WeakMap\n case 'WeakMap': return 'weakmap';\n case 'WeakSet': return 'weakset';\n case 'Map': return 'map';\n case 'Set': return 'set';\n\n // 8-bit typed arrays\n case 'Int8Array': return 'int8array';\n case 'Uint8Array': return 'uint8array';\n case 'Uint8ClampedArray': return 'uint8clampedarray';\n\n // 16-bit typed arrays\n case 'Int16Array': return 'int16array';\n case 'Uint16Array': return 'uint16array';\n\n // 32-bit typed arrays\n case 'Int32Array': return 'int32array';\n case 'Uint32Array': return 'uint32array';\n case 'Float32Array': return 'float32array';\n case 'Float64Array': return 'float64array';\n }\n\n if (isGeneratorObj(val)) {\n return 'generator';\n }\n\n // Non-plain objects\n type = toString.call(val);\n switch (type) {\n case '[object Object]': return 'object';\n // iterators\n case '[object Map Iterator]': return 'mapiterator';\n case '[object Set Iterator]': return 'setiterator';\n case '[object String Iterator]': return 'stringiterator';\n case '[object Array Iterator]': return 'arrayiterator';\n }\n\n // other\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, '');\n};\n\nfunction ctorName(val) {\n return val.constructor ? val.constructor.name : null;\n}\n\nfunction isArray(val) {\n if (Array.isArray) return Array.isArray(val);\n return val instanceof Array;\n}\n\nfunction isError(val) {\n return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === 'function'\n && typeof val.getDate === 'function'\n && typeof val.setDate === 'function';\n}\n\nfunction isRegexp(val) {\n if (val instanceof RegExp) return true;\n return typeof val.flags === 'string'\n && typeof val.ignoreCase === 'boolean'\n && typeof val.multiline === 'boolean'\n && typeof val.global === 'boolean';\n}\n\nfunction isGeneratorFn(name, val) {\n return ctorName(name) === 'GeneratorFunction';\n}\n\nfunction isGeneratorObj(val) {\n return typeof val.throw === 'function'\n && typeof val.return === 'function'\n && typeof val.next === 'function';\n}\n\nfunction isArguments(val) {\n try {\n if (typeof val.length === 'number' && typeof val.callee === 'function') {\n return true;\n }\n } catch (err) {\n if (err.message.indexOf('callee') !== -1) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * If you need to support Safari 5-7 (8-10 yr-old browser),\n * take a look at https://github.com/feross/is-buffer\n */\n\nfunction isBuffer(val) {\n if (val.constructor && typeof val.constructor.isBuffer === 'function') {\n return val.constructor.isBuffer(val);\n }\n return false;\n}\n","/*!\n * is-extendable <https://github.com/jonschlinkert/is-extendable>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function isExtendable(val) {\n return typeof val !== 'undefined' && val !== null\n && (typeof val === 'object' || typeof val === 'function');\n};\n","/*!\n * is-number <https://github.com/jonschlinkert/is-number>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\n\nmodule.exports = function isNumber(num) {\n var type = typeOf(num);\n\n if (type === 'string') {\n if (!num.trim()) return false;\n } else if (type !== 'number') {\n return false;\n }\n\n return (num - num + 1) >= 0;\n};\n","/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\n\nfunction isObjectObject(o) {\n return isObject(o) === true\n && Object.prototype.toString.call(o) === '[object Object]';\n}\n\nmodule.exports = function isPlainObject(o) {\n var ctor,prot;\n\n if (isObjectObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (typeof ctor !== 'function') return false;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObjectObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n","/*!\n * is-windows <https://github.com/jonschlinkert/is-windows>\n *\n * Copyright © 2015-2018, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n(function(factory) {\n if (exports && typeof exports === 'object' && typeof module !== 'undefined') {\n module.exports = factory();\n } else if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof window !== 'undefined') {\n window.isWindows = factory();\n } else if (typeof global !== 'undefined') {\n global.isWindows = factory();\n } else if (typeof self !== 'undefined') {\n self.isWindows = factory();\n } else {\n this.isWindows = factory();\n }\n})(function() {\n 'use strict';\n return function isWindows() {\n return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE));\n };\n});\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n};\n","// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell\n// License: MIT. (See LICENSE.)\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n})\n\n// This regex comes from regex.coffee, and is inserted here by generate-index.js\n// (run `npm run build`).\nexports.default = /((['\"])(?:(?!\\2|\\\\).|\\\\(?:\\r\\n|[\\s\\S]))*(\\2)?|`(?:[^`\\\\$]|\\\\[\\s\\S]|\\$(?!\\{)|\\$\\{(?:[^{}]|\\{[^}]*\\}?)*\\}?)*(`)?)|(\\/\\/.*)|(\\/\\*(?:[^*]|\\*(?!\\/))*(\\*\\/)?)|(\\/(?!\\*)(?:\\[(?:(?![\\]\\\\]).|\\\\.)*\\]|(?![\\/\\]\\\\]).|\\\\.)+\\/(?:(?!\\s*(?:\\b|[\\u0080-\\uFFFF$\\\\'\"~({]|[+\\-!](?!=)|\\.?\\d))|[gmiyus]{1,6}\\b(?![\\u0080-\\uFFFF$\\\\]|\\s*(?:[+\\-*%&|^<>!=?({]|\\/(?![\\/*])))))|(0[xX][\\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][+-]?\\d+)?)|((?!\\d)(?:(?!\\s)[$\\w\\u0080-\\uFFFF]|\\\\u[\\da-fA-F]{4}|\\\\u\\{[\\da-fA-F]+\\})+)|(--|\\+\\+|&&|\\|\\||=>|\\.{3}|(?:[+\\-\\/%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\\](){}])|(\\s+)|(^$|[\\s\\S])/g\n\nexports.matchToToken = function(match) {\n var token = {type: \"invalid\", value: match[0], closed: undefined}\n if (match[ 1]) token.type = \"string\" , token.closed = !!(match[3] || match[4])\n else if (match[ 5]) token.type = \"comment\"\n else if (match[ 6]) token.type = \"comment\", token.closed = !!match[7]\n else if (match[ 8]) token.type = \"regex\"\n else if (match[ 9]) token.type = \"number\"\n else if (match[10]) token.type = \"name\"\n else if (match[11]) token.type = \"punctuator\"\n else if (match[12]) token.type = \"whitespace\"\n return token\n}\n","var isBuffer = require('is-buffer');\nvar toString = Object.prototype.toString;\n\n/**\n * Get the native `typeof` a value.\n *\n * @param {*} `val`\n * @return {*} Native javascript type\n */\n\nmodule.exports = function kindOf(val) {\n // primitivies\n if (typeof val === 'undefined') {\n return 'undefined';\n }\n if (val === null) {\n return 'null';\n }\n if (val === true || val === false || val instanceof Boolean) {\n return 'boolean';\n }\n if (typeof val === 'string' || val instanceof String) {\n return 'string';\n }\n if (typeof val === 'number' || val instanceof Number) {\n return 'number';\n }\n\n // functions\n if (typeof val === 'function' || val instanceof Function) {\n return 'function';\n }\n\n // array\n if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {\n return 'array';\n }\n\n // check for instances of RegExp and Date before calling `toString`\n if (val instanceof RegExp) {\n return 'regexp';\n }\n if (val instanceof Date) {\n return 'date';\n }\n\n // other objects\n var type = toString.call(val);\n\n if (type === '[object RegExp]') {\n return 'regexp';\n }\n if (type === '[object Date]') {\n return 'date';\n }\n if (type === '[object Arguments]') {\n return 'arguments';\n }\n if (type === '[object Error]') {\n return 'error';\n }\n\n // buffer\n if (isBuffer(val)) {\n return 'buffer';\n }\n\n // es6: Map, WeakMap, Set, WeakSet\n if (type === '[object Set]') {\n return 'set';\n }\n if (type === '[object WeakSet]') {\n return 'weakset';\n }\n if (type === '[object Map]') {\n return 'map';\n }\n if (type === '[object WeakMap]') {\n return 'weakmap';\n }\n if (type === '[object Symbol]') {\n return 'symbol';\n }\n\n // typed arrays\n if (type === '[object Int8Array]') {\n return 'int8array';\n }\n if (type === '[object Uint8Array]') {\n return 'uint8array';\n }\n if (type === '[object Uint8ClampedArray]') {\n return 'uint8clampedarray';\n }\n if (type === '[object Int16Array]') {\n return 'int16array';\n }\n if (type === '[object Uint16Array]') {\n return 'uint16array';\n }\n if (type === '[object Int32Array]') {\n return 'int32array';\n }\n if (type === '[object Uint32Array]') {\n return 'uint32array';\n }\n if (type === '[object Float32Array]') {\n return 'float32array';\n }\n if (type === '[object Float64Array]') {\n return 'float64array';\n }\n\n // must be a plain object\n return 'object';\n};\n","/*!\n * map-cache <https://github.com/jonschlinkert/map-cache>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\n/**\n * Expose `MapCache`\n */\n\nmodule.exports = MapCache;\n\n/**\n * Creates a cache object to store key/value pairs.\n *\n * ```js\n * var cache = new MapCache();\n * ```\n *\n * @api public\n */\n\nfunction MapCache(data) {\n this.__data__ = data || {};\n}\n\n/**\n * Adds `value` to `key` on the cache.\n *\n * ```js\n * cache.set('foo', 'bar');\n * ```\n *\n * @param {String} `key` The key of the value to cache.\n * @param {*} `value` The value to cache.\n * @returns {Object} Returns the `Cache` object for chaining.\n * @api public\n */\n\nMapCache.prototype.set = function mapSet(key, value) {\n if (key !== '__proto__') {\n this.__data__[key] = value;\n }\n return this;\n};\n\n/**\n * Gets the cached value for `key`.\n *\n * ```js\n * cache.get('foo');\n * //=> 'bar'\n * ```\n *\n * @param {String} `key` The key of the value to get.\n * @returns {*} Returns the cached value.\n * @api public\n */\n\nMapCache.prototype.get = function mapGet(key) {\n return key === '__proto__' ? undefined : this.__data__[key];\n};\n\n/**\n * Checks if a cached value for `key` exists.\n *\n * ```js\n * cache.has('foo');\n * //=> true\n * ```\n *\n * @param {String} `key` The key of the entry to check.\n * @returns {Boolean} Returns `true` if an entry for `key` exists, else `false`.\n * @api public\n */\n\nMapCache.prototype.has = function mapHas(key) {\n return key !== '__proto__' && hasOwn.call(this.__data__, key);\n};\n\n/**\n * Removes `key` and its value from the cache.\n *\n * ```js\n * cache.del('foo');\n * ```\n * @title .del\n * @param {String} `key` The key of the value to remove.\n * @returns {Boolean} Returns `true` if the entry was removed successfully, else `false`.\n * @api public\n */\n\nMapCache.prototype.del = function mapDelete(key) {\n return this.has(key) && delete this.__data__[key];\n};\n","'use strict';\n\nvar util = require('util');\nvar visit = require('object-visit');\n\n/**\n * Map `visit` over an array of objects.\n *\n * @param {Object} `collection` The context in which to invoke `method`\n * @param {String} `method` Name of the method to call on `collection`\n * @param {Object} `arr` Array of objects.\n */\n\nmodule.exports = function mapVisit(collection, method, val) {\n if (isObject(val)) {\n return visit.apply(null, arguments);\n }\n\n if (!Array.isArray(val)) {\n throw new TypeError('expected an array: ' + util.inspect(val));\n }\n\n var args = [].slice.call(arguments, 3);\n\n for (var i = 0; i < val.length; i++) {\n var ele = val[i];\n if (isObject(ele)) {\n visit.apply(null, [collection, method, ele].concat(args));\n } else {\n collection[method].apply(collection, [ele].concat(args));\n }\n }\n};\n\nfunction isObject(val) {\n return val && (typeof val === 'function' || (!Array.isArray(val) && typeof val === 'object'));\n}\n","'use strict';\n\n/**\n * Module dependencies\n */\n\nvar util = require('util');\nvar braces = require('braces');\nvar toRegex = require('to-regex');\nvar extend = require('extend-shallow');\n\n/**\n * Local dependencies\n */\n\nvar compilers = require('./lib/compilers');\nvar parsers = require('./lib/parsers');\nvar cache = require('./lib/cache');\nvar utils = require('./lib/utils');\nvar MAX_LENGTH = 1024 * 64;\n\n/**\n * The main function takes a list of strings and one or more\n * glob patterns to use for matching.\n *\n * ```js\n * var mm = require('micromatch');\n * mm(list, patterns[, options]);\n *\n * console.log(mm(['a.js', 'a.txt'], ['*.js']));\n * //=> [ 'a.js' ]\n * ```\n * @param {Array} `list` A list of strings to match\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of matches\n * @summary false\n * @api public\n */\n\nfunction micromatch(list, patterns, options) {\n patterns = utils.arrayify(patterns);\n list = utils.arrayify(list);\n\n var len = patterns.length;\n if (list.length === 0 || len === 0) {\n return [];\n }\n\n if (len === 1) {\n return micromatch.match(list, patterns[0], options);\n }\n\n var omit = [];\n var keep = [];\n var idx = -1;\n\n while (++idx < len) {\n var pattern = patterns[idx];\n\n if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) {\n omit.push.apply(omit, micromatch.match(list, pattern.slice(1), options));\n } else {\n keep.push.apply(keep, micromatch.match(list, pattern, options));\n }\n }\n\n var matches = utils.diff(keep, omit);\n if (!options || options.nodupes !== false) {\n return utils.unique(matches);\n }\n\n return matches;\n}\n\n/**\n * Similar to the main function, but `pattern` must be a string.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.match(list, pattern[, options]);\n *\n * console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a'));\n * //=> ['a.a', 'a.aa']\n * ```\n * @param {Array} `list` Array of strings to match\n * @param {String} `pattern` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of matches\n * @api public\n */\n\nmicromatch.match = function(list, pattern, options) {\n if (Array.isArray(pattern)) {\n throw new TypeError('expected pattern to be a string');\n }\n\n var unixify = utils.unixify(options);\n var isMatch = memoize('match', pattern, options, micromatch.matcher);\n var matches = [];\n\n list = utils.arrayify(list);\n var len = list.length;\n var idx = -1;\n\n while (++idx < len) {\n var ele = list[idx];\n if (ele === pattern || isMatch(ele)) {\n matches.push(utils.value(ele, unixify, options));\n }\n }\n\n // if no options were passed, uniquify results and return\n if (typeof options === 'undefined') {\n return utils.unique(matches);\n }\n\n if (matches.length === 0) {\n if (options.failglob === true) {\n throw new Error('no matches found for \"' + pattern + '\"');\n }\n if (options.nonull === true || options.nullglob === true) {\n return [options.unescape ? utils.unescape(pattern) : pattern];\n }\n }\n\n // if `opts.ignore` was defined, diff ignored list\n if (options.ignore) {\n matches = micromatch.not(matches, options.ignore, options);\n }\n\n return options.nodupes !== false ? utils.unique(matches) : matches;\n};\n\n/**\n * Returns true if the specified `string` matches the given glob `pattern`.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.isMatch(string, pattern[, options]);\n *\n * console.log(mm.isMatch('a.a', '*.a'));\n * //=> true\n * console.log(mm.isMatch('a.b', '*.a'));\n * //=> false\n * ```\n * @param {String} `string` String to match\n * @param {String} `pattern` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if the string matches the glob pattern.\n * @api public\n */\n\nmicromatch.isMatch = function(str, pattern, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string: \"' + util.inspect(str) + '\"');\n }\n\n if (isEmptyString(str) || isEmptyString(pattern)) {\n return false;\n }\n\n var equals = utils.equalsPattern(options);\n if (equals(str)) {\n return true;\n }\n\n var isMatch = memoize('isMatch', pattern, options, micromatch.matcher);\n return isMatch(str);\n};\n\n/**\n * Returns true if some of the strings in the given `list` match any of the\n * given glob `patterns`.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.some(list, patterns[, options]);\n *\n * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // true\n * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.some = function(list, patterns, options) {\n if (typeof list === 'string') {\n list = [list];\n }\n for (var i = 0; i < list.length; i++) {\n if (micromatch(list[i], patterns, options).length === 1) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Returns true if every string in the given `list` matches\n * any of the given glob `patterns`.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.every(list, patterns[, options]);\n *\n * console.log(mm.every('foo.js', ['foo.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // false\n * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.every = function(list, patterns, options) {\n if (typeof list === 'string') {\n list = [list];\n }\n for (var i = 0; i < list.length; i++) {\n if (micromatch(list[i], patterns, options).length !== 1) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Returns true if **any** of the given glob `patterns`\n * match the specified `string`.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.any(string, patterns[, options]);\n *\n * console.log(mm.any('a.a', ['b.*', '*.a']));\n * //=> true\n * console.log(mm.any('a.a', 'b.*'));\n * //=> false\n * ```\n * @param {String|Array} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.any = function(str, patterns, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string: \"' + util.inspect(str) + '\"');\n }\n\n if (isEmptyString(str) || isEmptyString(patterns)) {\n return false;\n }\n\n if (typeof patterns === 'string') {\n patterns = [patterns];\n }\n\n for (var i = 0; i < patterns.length; i++) {\n if (micromatch.isMatch(str, patterns[i], options)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Returns true if **all** of the given `patterns` match\n * the specified string.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.all(string, patterns[, options]);\n *\n * console.log(mm.all('foo.js', ['foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', '!foo.js']));\n * // false\n *\n * console.log(mm.all('foo.js', ['*.js', 'foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));\n * // true\n * ```\n * @param {String|Array} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.all = function(str, patterns, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string: \"' + util.inspect(str) + '\"');\n }\n if (typeof patterns === 'string') {\n patterns = [patterns];\n }\n for (var i = 0; i < patterns.length; i++) {\n if (!micromatch.isMatch(str, patterns[i], options)) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Returns a list of strings that _**do not match any**_ of the given `patterns`.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.not(list, patterns[, options]);\n *\n * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));\n * //=> ['b.b', 'c.c']\n * ```\n * @param {Array} `list` Array of strings to match.\n * @param {String|Array} `patterns` One or more glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of strings that **do not match** the given patterns.\n * @api public\n */\n\nmicromatch.not = function(list, patterns, options) {\n var opts = extend({}, options);\n var ignore = opts.ignore;\n delete opts.ignore;\n\n var unixify = utils.unixify(opts);\n list = utils.arrayify(list).map(unixify);\n\n var matches = utils.diff(list, micromatch(list, patterns, opts));\n if (ignore) {\n matches = utils.diff(matches, micromatch(list, ignore));\n }\n\n return opts.nodupes !== false ? utils.unique(matches) : matches;\n};\n\n/**\n * Returns true if the given `string` contains the given pattern. Similar\n * to [.isMatch](#isMatch) but the pattern can match any part of the string.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.contains(string, pattern[, options]);\n *\n * console.log(mm.contains('aa/bb/cc', '*b'));\n * //=> true\n * console.log(mm.contains('aa/bb/cc', '*d'));\n * //=> false\n * ```\n * @param {String} `str` The string to match.\n * @param {String|Array} `patterns` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if the patter matches any part of `str`.\n * @api public\n */\n\nmicromatch.contains = function(str, patterns, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string: \"' + util.inspect(str) + '\"');\n }\n\n if (typeof patterns === 'string') {\n if (isEmptyString(str) || isEmptyString(patterns)) {\n return false;\n }\n\n var equals = utils.equalsPattern(patterns, options);\n if (equals(str)) {\n return true;\n }\n var contains = utils.containsPattern(patterns, options);\n if (contains(str)) {\n return true;\n }\n }\n\n var opts = extend({}, options, {contains: true});\n return micromatch.any(str, patterns, opts);\n};\n\n/**\n * Returns true if the given pattern and options should enable\n * the `matchBase` option.\n * @return {Boolean}\n * @api private\n */\n\nmicromatch.matchBase = function(pattern, options) {\n if (pattern && pattern.indexOf('/') !== -1 || !options) return false;\n return options.basename === true || options.matchBase === true;\n};\n\n/**\n * Filter the keys of the given object with the given `glob` pattern\n * and `options`. Does not attempt to match nested keys. If you need this feature,\n * use [glob-object][] instead.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.matchKeys(object, patterns[, options]);\n *\n * var obj = { aa: 'a', ab: 'b', ac: 'c' };\n * console.log(mm.matchKeys(obj, '*b'));\n * //=> { ab: 'b' }\n * ```\n * @param {Object} `object` The object with keys to filter.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Object} Returns an object with only keys that match the given patterns.\n * @api public\n */\n\nmicromatch.matchKeys = function(obj, patterns, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('expected the first argument to be an object');\n }\n var keys = micromatch(Object.keys(obj), patterns, options);\n return utils.pick(obj, keys);\n};\n\n/**\n * Returns a memoized matcher function from the given glob `pattern` and `options`.\n * The returned function takes a string to match as its only argument and returns\n * true if the string is a match.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.matcher(pattern[, options]);\n *\n * var isMatch = mm.matcher('*.!(*a)');\n * console.log(isMatch('a.a'));\n * //=> false\n * console.log(isMatch('a.b'));\n * //=> true\n * ```\n * @param {String} `pattern` Glob pattern\n * @param {Object} `options` See available [options](#options) for changing how matches are performed.\n * @return {Function} Returns a matcher function.\n * @api public\n */\n\nmicromatch.matcher = function matcher(pattern, options) {\n if (Array.isArray(pattern)) {\n return compose(pattern, options, matcher);\n }\n\n // if pattern is a regex\n if (pattern instanceof RegExp) {\n return test(pattern);\n }\n\n // if pattern is invalid\n if (!utils.isString(pattern)) {\n throw new TypeError('expected pattern to be an array, string or regex');\n }\n\n // if pattern is a non-glob string\n if (!utils.hasSpecialChars(pattern)) {\n if (options && options.nocase === true) {\n pattern = pattern.toLowerCase();\n }\n return utils.matchPath(pattern, options);\n }\n\n // if pattern is a glob string\n var re = micromatch.makeRe(pattern, options);\n\n // if `options.matchBase` or `options.basename` is defined\n if (micromatch.matchBase(pattern, options)) {\n return utils.matchBasename(re, options);\n }\n\n function test(regex) {\n var equals = utils.equalsPattern(options);\n var unixify = utils.unixify(options);\n\n return function(str) {\n if (equals(str)) {\n return true;\n }\n\n if (regex.test(unixify(str))) {\n return true;\n }\n return false;\n };\n }\n\n var fn = test(re);\n Object.defineProperty(fn, 'result', {\n configurable: true,\n enumerable: false,\n value: re.result\n });\n return fn;\n};\n\n/**\n * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.capture(pattern, string[, options]);\n *\n * console.log(mm.capture('test/*.js', 'test/foo.js'));\n * //=> ['foo']\n * console.log(mm.capture('test/*.js', 'foo/bar.css'));\n * //=> null\n * ```\n * @param {String} `pattern` Glob pattern to use for matching.\n * @param {String} `string` String to match\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`.\n * @api public\n */\n\nmicromatch.capture = function(pattern, str, options) {\n var re = micromatch.makeRe(pattern, extend({capture: true}, options));\n var unixify = utils.unixify(options);\n\n function match() {\n return function(string) {\n var match = re.exec(unixify(string));\n if (!match) {\n return null;\n }\n\n return match.slice(1);\n };\n }\n\n var capture = memoize('capture', pattern, options, match);\n return capture(str);\n};\n\n/**\n * Create a regular expression from the given glob `pattern`.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.makeRe(pattern[, options]);\n *\n * console.log(mm.makeRe('*.js'));\n * //=> /^(?:(\\.[\\\\\\/])?(?!\\.)(?=.)[^\\/]*?\\.js)$/\n * ```\n * @param {String} `pattern` A glob pattern to convert to regex.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\nmicromatch.makeRe = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected pattern to be a string');\n }\n\n if (pattern.length > MAX_LENGTH) {\n throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters');\n }\n\n function makeRe() {\n var result = micromatch.create(pattern, options);\n var ast_array = [];\n var output = result.map(function(obj) {\n obj.ast.state = obj.state;\n ast_array.push(obj.ast);\n return obj.output;\n });\n\n var regex = toRegex(output.join('|'), options);\n Object.defineProperty(regex, 'result', {\n configurable: true,\n enumerable: false,\n value: ast_array\n });\n return regex;\n }\n\n return memoize('makeRe', pattern, options, makeRe);\n};\n\n/**\n * Expand the given brace `pattern`.\n *\n * ```js\n * var mm = require('micromatch');\n * console.log(mm.braces('foo/{a,b}/bar'));\n * //=> ['foo/(a|b)/bar']\n *\n * console.log(mm.braces('foo/{a,b}/bar', {expand: true}));\n * //=> ['foo/(a|b)/bar']\n * ```\n * @param {String} `pattern` String with brace pattern to expand.\n * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.\n * @return {Array}\n * @api public\n */\n\nmicromatch.braces = function(pattern, options) {\n if (typeof pattern !== 'string' && !Array.isArray(pattern)) {\n throw new TypeError('expected pattern to be an array or string');\n }\n\n function expand() {\n if (options && options.nobrace === true || !/\\{.*\\}/.test(pattern)) {\n return utils.arrayify(pattern);\n }\n return braces(pattern, options);\n }\n\n return memoize('braces', pattern, options, expand);\n};\n\n/**\n * Proxy to the [micromatch.braces](#method), for parity with\n * minimatch.\n */\n\nmicromatch.braceExpand = function(pattern, options) {\n var opts = extend({}, options, {expand: true});\n return micromatch.braces(pattern, opts);\n};\n\n/**\n * Parses the given glob `pattern` and returns an array of abstract syntax\n * trees (ASTs), with the compiled `output` and optional source `map` on\n * each AST.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.create(pattern[, options]);\n *\n * console.log(mm.create('abc/*.js'));\n * // [{ options: { source: 'string', sourcemap: true },\n * // state: {},\n * // compilers:\n * // { ... },\n * // output: '(\\\\.[\\\\\\\\\\\\/])?abc\\\\/(?!\\\\.)(?=.)[^\\\\/]*?\\\\.js',\n * // ast:\n * // { type: 'root',\n * // errors: [],\n * // nodes:\n * // [ ... ],\n * // dot: false,\n * // input: 'abc/*.js' },\n * // parsingErrors: [],\n * // map:\n * // { version: 3,\n * // sources: [ 'string' ],\n * // names: [],\n * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE',\n * // sourcesContent: [ 'abc/*.js' ] },\n * // position: { line: 1, column: 28 },\n * // content: {},\n * // files: {},\n * // idx: 6 }]\n * ```\n * @param {String} `pattern` Glob pattern to parse and compile.\n * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed.\n * @return {Object} Returns an object with the parsed AST, compiled string and optional source map.\n * @api public\n */\n\nmicromatch.create = function(pattern, options) {\n return memoize('create', pattern, options, function() {\n function create(str, opts) {\n return micromatch.compile(micromatch.parse(str, opts), opts);\n }\n\n pattern = micromatch.braces(pattern, options);\n var len = pattern.length;\n var idx = -1;\n var res = [];\n\n while (++idx < len) {\n res.push(create(pattern[idx], options));\n }\n return res;\n });\n};\n\n/**\n * Parse the given `str` with the given `options`.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.parse(pattern[, options]);\n *\n * var ast = mm.parse('a/{b,c}/d');\n * console.log(ast);\n * // { type: 'root',\n * // errors: [],\n * // input: 'a/{b,c}/d',\n * // nodes:\n * // [ { type: 'bos', val: '' },\n * // { type: 'text', val: 'a/' },\n * // { type: 'brace',\n * // nodes:\n * // [ { type: 'brace.open', val: '{' },\n * // { type: 'text', val: 'b,c' },\n * // { type: 'brace.close', val: '}' } ] },\n * // { type: 'text', val: '/d' },\n * // { type: 'eos', val: '' } ] }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an AST\n * @api public\n */\n\nmicromatch.parse = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected a string');\n }\n\n function parse() {\n var snapdragon = utils.instantiate(null, options);\n parsers(snapdragon, options);\n\n var ast = snapdragon.parse(pattern, options);\n utils.define(ast, 'snapdragon', snapdragon);\n ast.input = pattern;\n return ast;\n }\n\n return memoize('parse', pattern, options, parse);\n};\n\n/**\n * Compile the given `ast` or string with the given `options`.\n *\n * ```js\n * var mm = require('micromatch');\n * mm.compile(ast[, options]);\n *\n * var ast = mm.parse('a/{b,c}/d');\n * console.log(mm.compile(ast));\n * // { options: { source: 'string' },\n * // state: {},\n * // compilers:\n * // { eos: [Function],\n * // noop: [Function],\n * // bos: [Function],\n * // brace: [Function],\n * // 'brace.open': [Function],\n * // text: [Function],\n * // 'brace.close': [Function] },\n * // output: [ 'a/(b|c)/d' ],\n * // ast:\n * // { ... },\n * // parsingErrors: [] }\n * ```\n * @param {Object|String} `ast`\n * @param {Object} `options`\n * @return {Object} Returns an object that has an `output` property with the compiled string.\n * @api public\n */\n\nmicromatch.compile = function(ast, options) {\n if (typeof ast === 'string') {\n ast = micromatch.parse(ast, options);\n }\n\n return memoize('compile', ast.input, options, function() {\n var snapdragon = utils.instantiate(ast, options);\n compilers(snapdragon, options);\n return snapdragon.compile(ast, options);\n });\n};\n\n/**\n * Clear the regex cache.\n *\n * ```js\n * mm.clearCache();\n * ```\n * @api public\n */\n\nmicromatch.clearCache = function() {\n micromatch.cache.caches = {};\n};\n\n/**\n * Returns true if the given value is effectively an empty string\n */\n\nfunction isEmptyString(val) {\n return String(val) === '' || String(val) === './';\n}\n\n/**\n * Compose a matcher function with the given patterns.\n * This allows matcher functions to be compiled once and\n * called multiple times.\n */\n\nfunction compose(patterns, options, matcher) {\n var matchers;\n\n return memoize('compose', String(patterns), options, function() {\n return function(file) {\n // delay composition until it's invoked the first time,\n // after that it won't be called again\n if (!matchers) {\n matchers = [];\n for (var i = 0; i < patterns.length; i++) {\n matchers.push(matcher(patterns[i], options));\n }\n }\n\n var len = matchers.length;\n while (len--) {\n if (matchers[len](file) === true) {\n return true;\n }\n }\n return false;\n };\n });\n}\n\n/**\n * Memoize a generated regex or function. A unique key is generated\n * from the `type` (usually method name), the `pattern`, and\n * user-defined options.\n */\n\nfunction memoize(type, pattern, options, fn) {\n var key = utils.createKey(type + '=' + pattern, options);\n\n if (options && options.cache === false) {\n return fn(pattern, options);\n }\n\n if (cache.has(type, key)) {\n return cache.get(type, key);\n }\n\n var val = fn(pattern, options);\n cache.set(type, key, val);\n return val;\n}\n\n/**\n * Expose compiler, parser and cache on `micromatch`\n */\n\nmicromatch.compilers = compilers;\nmicromatch.parsers = parsers;\nmicromatch.caches = cache.caches;\n\n/**\n * Expose `micromatch`\n * @type {Function}\n */\n\nmodule.exports = micromatch;\n","module.exports = new (require('fragment-cache'))();\n","'use strict';\n\nvar nanomatch = require('nanomatch');\nvar extglob = require('extglob');\n\nmodule.exports = function(snapdragon) {\n var compilers = snapdragon.compiler.compilers;\n var opts = snapdragon.options;\n\n // register nanomatch compilers\n snapdragon.use(nanomatch.compilers);\n\n // get references to some specific nanomatch compilers before they\n // are overridden by the extglob and/or custom compilers\n var escape = compilers.escape;\n var qmark = compilers.qmark;\n var slash = compilers.slash;\n var star = compilers.star;\n var text = compilers.text;\n var plus = compilers.plus;\n var dot = compilers.dot;\n\n // register extglob compilers or escape exglobs if disabled\n if (opts.extglob === false || opts.noext === true) {\n snapdragon.compiler.use(escapeExtglobs);\n } else {\n snapdragon.use(extglob.compilers);\n }\n\n snapdragon.use(function() {\n this.options.star = this.options.star || function(/*node*/) {\n return '[^\\\\\\\\/]*?';\n };\n });\n\n // custom micromatch compilers\n snapdragon.compiler\n\n // reset referenced compiler\n .set('dot', dot)\n .set('escape', escape)\n .set('plus', plus)\n .set('slash', slash)\n .set('qmark', qmark)\n .set('star', star)\n .set('text', text);\n};\n\nfunction escapeExtglobs(compiler) {\n compiler.set('paren', function(node) {\n var val = '';\n visit(node, function(tok) {\n if (tok.val) val += (/^\\W/.test(tok.val) ? '\\\\' : '') + tok.val;\n });\n return this.emit(val, node);\n });\n\n /**\n * Visit `node` with the given `fn`\n */\n\n function visit(node, fn) {\n return node.nodes ? mapVisit(node.nodes, fn) : fn(node);\n }\n\n /**\n * Map visit over array of `nodes`.\n */\n\n function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n }\n}\n","'use strict';\n\nvar extglob = require('extglob');\nvar nanomatch = require('nanomatch');\nvar regexNot = require('regex-not');\nvar toRegex = require('to-regex');\nvar not;\n\n/**\n * Characters to use in negation regex (we want to \"not\" match\n * characters that are matched by other parsers)\n */\n\nvar TEXT = '([!@*?+]?\\\\(|\\\\)|\\\\[:?(?=.*?:?\\\\])|:?\\\\]|[*+?!^$.\\\\\\\\/])+';\nvar createNotRegex = function(opts) {\n return not || (not = textRegex(TEXT));\n};\n\n/**\n * Parsers\n */\n\nmodule.exports = function(snapdragon) {\n var parsers = snapdragon.parser.parsers;\n\n // register nanomatch parsers\n snapdragon.use(nanomatch.parsers);\n\n // get references to some specific nanomatch parsers before they\n // are overridden by the extglob and/or parsers\n var escape = parsers.escape;\n var slash = parsers.slash;\n var qmark = parsers.qmark;\n var plus = parsers.plus;\n var star = parsers.star;\n var dot = parsers.dot;\n\n // register extglob parsers\n snapdragon.use(extglob.parsers);\n\n // custom micromatch parsers\n snapdragon.parser\n .use(function() {\n // override \"notRegex\" created in nanomatch parser\n this.notRegex = /^\\!+(?!\\()/;\n })\n // reset the referenced parsers\n .capture('escape', escape)\n .capture('slash', slash)\n .capture('qmark', qmark)\n .capture('star', star)\n .capture('plus', plus)\n .capture('dot', dot)\n\n /**\n * Override `text` parser\n */\n\n .capture('text', function() {\n if (this.isInside('bracket')) return;\n var pos = this.position();\n var m = this.match(createNotRegex(this.options));\n if (!m || !m[0]) return;\n\n // escape regex boundary characters and simple brackets\n var val = m[0].replace(/([[\\]^$])/g, '\\\\$1');\n\n return pos({\n type: 'text',\n val: val\n });\n });\n};\n\n/**\n * Create text regex\n */\n\nfunction textRegex(pattern) {\n var notStr = regexNot.create(pattern, {contains: true, strictClose: false});\n var prefix = '(?:[\\\\^]|\\\\\\\\|';\n return toRegex(prefix + notStr + ')', {strictClose: false});\n}\n","'use strict';\n\nvar utils = module.exports;\nvar path = require('path');\n\n/**\n * Module dependencies\n */\n\nvar Snapdragon = require('snapdragon');\nutils.define = require('define-property');\nutils.diff = require('arr-diff');\nutils.extend = require('extend-shallow');\nutils.pick = require('object.pick');\nutils.typeOf = require('kind-of');\nutils.unique = require('array-unique');\n\n/**\n * Returns true if the platform is windows, or `path.sep` is `\\\\`.\n * This is defined as a function to allow `path.sep` to be set in unit tests,\n * or by the user, if there is a reason to do so.\n * @return {Boolean}\n */\n\nutils.isWindows = function() {\n return path.sep === '\\\\' || process.platform === 'win32';\n};\n\n/**\n * Get the `Snapdragon` instance to use\n */\n\nutils.instantiate = function(ast, options) {\n var snapdragon;\n // if an instance was created by `.parse`, use that instance\n if (utils.typeOf(ast) === 'object' && ast.snapdragon) {\n snapdragon = ast.snapdragon;\n // if the user supplies an instance on options, use that instance\n } else if (utils.typeOf(options) === 'object' && options.snapdragon) {\n snapdragon = options.snapdragon;\n // create a new instance\n } else {\n snapdragon = new Snapdragon(options);\n }\n\n utils.define(snapdragon, 'parse', function(str, options) {\n var parsed = Snapdragon.prototype.parse.apply(this, arguments);\n parsed.input = str;\n\n // escape unmatched brace/bracket/parens\n var last = this.parser.stack.pop();\n if (last && this.options.strictErrors !== true) {\n var open = last.nodes[0];\n var inner = last.nodes[1];\n if (last.type === 'bracket') {\n if (inner.val.charAt(0) === '[') {\n inner.val = '\\\\' + inner.val;\n }\n\n } else {\n open.val = '\\\\' + open.val;\n var sibling = open.parent.nodes[1];\n if (sibling.type === 'star') {\n sibling.loose = true;\n }\n }\n }\n\n // add non-enumerable parser reference\n utils.define(parsed, 'parser', this.parser);\n return parsed;\n });\n\n return snapdragon;\n};\n\n/**\n * Create the key to use for memoization. The key is generated\n * by iterating over the options and concatenating key-value pairs\n * to the pattern string.\n */\n\nutils.createKey = function(pattern, options) {\n if (utils.typeOf(options) !== 'object') {\n return pattern;\n }\n var val = pattern;\n var keys = Object.keys(options);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n val += ';' + key + '=' + String(options[key]);\n }\n return val;\n};\n\n/**\n * Cast `val` to an array\n * @return {Array}\n */\n\nutils.arrayify = function(val) {\n if (typeof val === 'string') return [val];\n return val ? (Array.isArray(val) ? val : [val]) : [];\n};\n\n/**\n * Return true if `val` is a non-empty string\n */\n\nutils.isString = function(val) {\n return typeof val === 'string';\n};\n\n/**\n * Return true if `val` is a non-empty string\n */\n\nutils.isObject = function(val) {\n return utils.typeOf(val) === 'object';\n};\n\n/**\n * Returns true if the given `str` has special characters\n */\n\nutils.hasSpecialChars = function(str) {\n return /(?:(?:(^|\\/)[!.])|[*?+()|\\[\\]{}]|[+@]\\()/.test(str);\n};\n\n/**\n * Escape regex characters in the given string\n */\n\nutils.escapeRegex = function(str) {\n return str.replace(/[-[\\]{}()^$|*+?.\\\\\\/\\s]/g, '\\\\$&');\n};\n\n/**\n * Normalize slashes in the given filepath.\n *\n * @param {String} `filepath`\n * @return {String}\n */\n\nutils.toPosixPath = function(str) {\n return str.replace(/\\\\+/g, '/');\n};\n\n/**\n * Strip backslashes before special characters in a string.\n *\n * @param {String} `str`\n * @return {String}\n */\n\nutils.unescape = function(str) {\n return utils.toPosixPath(str.replace(/\\\\(?=[*+?!.])/g, ''));\n};\n\n/**\n * Strip the prefix from a filepath\n * @param {String} `fp`\n * @return {String}\n */\n\nutils.stripPrefix = function(str) {\n if (str.charAt(0) !== '.') {\n return str;\n }\n var ch = str.charAt(1);\n if (utils.isSlash(ch)) {\n return str.slice(2);\n }\n return str;\n};\n\n/**\n * Returns true if the given str is an escaped or\n * unescaped path character\n */\n\nutils.isSlash = function(str) {\n return str === '/' || str === '\\\\/' || str === '\\\\' || str === '\\\\\\\\';\n};\n\n/**\n * Returns a function that returns true if the given\n * pattern matches or contains a `filepath`\n *\n * @param {String} `pattern`\n * @return {Function}\n */\n\nutils.matchPath = function(pattern, options) {\n return (options && options.contains)\n ? utils.containsPattern(pattern, options)\n : utils.equalsPattern(pattern, options);\n};\n\n/**\n * Returns true if the given (original) filepath or unixified path are equal\n * to the given pattern.\n */\n\nutils._equals = function(filepath, unixPath, pattern) {\n return pattern === filepath || pattern === unixPath;\n};\n\n/**\n * Returns true if the given (original) filepath or unixified path contain\n * the given pattern.\n */\n\nutils._contains = function(filepath, unixPath, pattern) {\n return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1;\n};\n\n/**\n * Returns a function that returns true if the given\n * pattern is the same as a given `filepath`\n *\n * @param {String} `pattern`\n * @return {Function}\n */\n\nutils.equalsPattern = function(pattern, options) {\n var unixify = utils.unixify(options);\n options = options || {};\n\n return function fn(filepath) {\n var equal = utils._equals(filepath, unixify(filepath), pattern);\n if (equal === true || options.nocase !== true) {\n return equal;\n }\n var lower = filepath.toLowerCase();\n return utils._equals(lower, unixify(lower), pattern);\n };\n};\n\n/**\n * Returns a function that returns true if the given\n * pattern contains a `filepath`\n *\n * @param {String} `pattern`\n * @return {Function}\n */\n\nutils.containsPattern = function(pattern, options) {\n var unixify = utils.unixify(options);\n options = options || {};\n\n return function(filepath) {\n var contains = utils._contains(filepath, unixify(filepath), pattern);\n if (contains === true || options.nocase !== true) {\n return contains;\n }\n var lower = filepath.toLowerCase();\n return utils._contains(lower, unixify(lower), pattern);\n };\n};\n\n/**\n * Returns a function that returns true if the given\n * regex matches the `filename` of a file path.\n *\n * @param {RegExp} `re` Matching regex\n * @return {Function}\n */\n\nutils.matchBasename = function(re) {\n return function(filepath) {\n return re.test(path.basename(filepath));\n };\n};\n\n/**\n * Determines the filepath to return based on the provided options.\n * @return {any}\n */\n\nutils.value = function(str, unixify, options) {\n if (options && options.unixify === false) {\n return str;\n }\n return unixify(str);\n};\n\n/**\n * Returns a function that normalizes slashes in a string to forward\n * slashes, strips `./` from beginning of paths, and optionally unescapes\n * special characters.\n * @return {Function}\n */\n\nutils.unixify = function(options) {\n options = options || {};\n return function(filepath) {\n if (utils.isWindows() || options.unixify === true) {\n filepath = utils.toPosixPath(filepath);\n }\n if (options.stripPrefix !== false) {\n filepath = utils.stripPrefix(filepath);\n }\n if (options.unescape === true) {\n filepath = utils.unescape(filepath);\n }\n return filepath;\n };\n};\n","/*!\n * define-property <https://github.com/jonschlinkert/define-property>\n *\n * Copyright (c) 2015-2018, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isobject = require('isobject');\nvar isDescriptor = require('is-descriptor');\nvar define = (typeof Reflect !== 'undefined' && Reflect.defineProperty)\n ? Reflect.defineProperty\n : Object.defineProperty;\n\nmodule.exports = function defineProperty(obj, key, val) {\n if (!isobject(obj) && typeof obj !== 'function' && !Array.isArray(obj)) {\n throw new TypeError('expected an object, function, or array');\n }\n\n if (typeof key !== 'string') {\n throw new TypeError('expected \"key\" to be a string');\n }\n\n if (isDescriptor(val)) {\n define(obj, key, val);\n return obj;\n }\n\n define(obj, key, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: val\n });\n\n return obj;\n};\n","'use strict';\n\nvar isExtendable = require('is-extendable');\nvar assignSymbols = require('assign-symbols');\n\nmodule.exports = Object.assign || function(obj/*, objects*/) {\n if (obj === null || typeof obj === 'undefined') {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n if (!isObject(obj)) {\n obj = {};\n }\n for (var i = 1; i < arguments.length; i++) {\n var val = arguments[i];\n if (isString(val)) {\n val = toObject(val);\n }\n if (isObject(val)) {\n assign(obj, val);\n assignSymbols(obj, val);\n }\n }\n return obj;\n};\n\nfunction assign(a, b) {\n for (var key in b) {\n if (hasOwn(b, key)) {\n a[key] = b[key];\n }\n }\n}\n\nfunction isString(val) {\n return (val && typeof val === 'string');\n}\n\nfunction toObject(str) {\n var obj = {};\n for (var i in str) {\n obj[i] = str[i];\n }\n return obj;\n}\n\nfunction isObject(val) {\n return (val && typeof val === 'object') || isExtendable(val);\n}\n\n/**\n * Returns true if the given `key` is an own property of `obj`.\n */\n\nfunction hasOwn(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction isEnum(obj, key) {\n return Object.prototype.propertyIsEnumerable.call(obj, key);\n}\n","/*!\n * is-extendable <https://github.com/jonschlinkert/is-extendable>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isPlainObject = require('is-plain-object');\n\nmodule.exports = function isExtendable(val) {\n return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);\n};\n","var toString = Object.prototype.toString;\n\nmodule.exports = function kindOf(val) {\n if (val === void 0) return 'undefined';\n if (val === null) return 'null';\n\n var type = typeof val;\n if (type === 'boolean') return 'boolean';\n if (type === 'string') return 'string';\n if (type === 'number') return 'number';\n if (type === 'symbol') return 'symbol';\n if (type === 'function') {\n return isGeneratorFn(val) ? 'generatorfunction' : 'function';\n }\n\n if (isArray(val)) return 'array';\n if (isBuffer(val)) return 'buffer';\n if (isArguments(val)) return 'arguments';\n if (isDate(val)) return 'date';\n if (isError(val)) return 'error';\n if (isRegexp(val)) return 'regexp';\n\n switch (ctorName(val)) {\n case 'Symbol': return 'symbol';\n case 'Promise': return 'promise';\n\n // Set, Map, WeakSet, WeakMap\n case 'WeakMap': return 'weakmap';\n case 'WeakSet': return 'weakset';\n case 'Map': return 'map';\n case 'Set': return 'set';\n\n // 8-bit typed arrays\n case 'Int8Array': return 'int8array';\n case 'Uint8Array': return 'uint8array';\n case 'Uint8ClampedArray': return 'uint8clampedarray';\n\n // 16-bit typed arrays\n case 'Int16Array': return 'int16array';\n case 'Uint16Array': return 'uint16array';\n\n // 32-bit typed arrays\n case 'Int32Array': return 'int32array';\n case 'Uint32Array': return 'uint32array';\n case 'Float32Array': return 'float32array';\n case 'Float64Array': return 'float64array';\n }\n\n if (isGeneratorObj(val)) {\n return 'generator';\n }\n\n // Non-plain objects\n type = toString.call(val);\n switch (type) {\n case '[object Object]': return 'object';\n // iterators\n case '[object Map Iterator]': return 'mapiterator';\n case '[object Set Iterator]': return 'setiterator';\n case '[object String Iterator]': return 'stringiterator';\n case '[object Array Iterator]': return 'arrayiterator';\n }\n\n // other\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, '');\n};\n\nfunction ctorName(val) {\n return val.constructor ? val.constructor.name : null;\n}\n\nfunction isArray(val) {\n if (Array.isArray) return Array.isArray(val);\n return val instanceof Array;\n}\n\nfunction isError(val) {\n return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === 'function'\n && typeof val.getDate === 'function'\n && typeof val.setDate === 'function';\n}\n\nfunction isRegexp(val) {\n if (val instanceof RegExp) return true;\n return typeof val.flags === 'string'\n && typeof val.ignoreCase === 'boolean'\n && typeof val.multiline === 'boolean'\n && typeof val.global === 'boolean';\n}\n\nfunction isGeneratorFn(name, val) {\n return ctorName(name) === 'GeneratorFunction';\n}\n\nfunction isGeneratorObj(val) {\n return typeof val.throw === 'function'\n && typeof val.return === 'function'\n && typeof val.next === 'function';\n}\n\nfunction isArguments(val) {\n try {\n if (typeof val.length === 'number' && typeof val.callee === 'function') {\n return true;\n }\n } catch (err) {\n if (err.message.indexOf('callee') !== -1) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * If you need to support Safari 5-7 (8-10 yr-old browser),\n * take a look at https://github.com/feross/is-buffer\n */\n\nfunction isBuffer(val) {\n if (val.constructor && typeof val.constructor.isBuffer === 'function') {\n return val.constructor.isBuffer(val);\n }\n return false;\n}\n","'use strict';\n\nvar isExtendable = require('is-extendable');\nvar forIn = require('for-in');\n\nfunction mixinDeep(target, objects) {\n var len = arguments.length, i = 0;\n while (++i < len) {\n var obj = arguments[i];\n if (isObject(obj)) {\n forIn(obj, copy, target);\n }\n }\n return target;\n}\n\n/**\n * Copy properties from the source object to the\n * target object.\n *\n * @param {*} `val`\n * @param {String} `key`\n */\n\nfunction copy(val, key) {\n if (key === '__proto__') {\n return;\n }\n\n var obj = this[key];\n if (isObject(val) && isObject(obj)) {\n mixinDeep(obj, val);\n } else {\n this[key] = val;\n }\n}\n\n/**\n * Returns true if `val` is an object or function.\n *\n * @param {any} val\n * @return {Boolean}\n */\n\nfunction isObject(val) {\n return isExtendable(val) && !Array.isArray(val);\n}\n\n/**\n * Expose `mixinDeep`\n */\n\nmodule.exports = mixinDeep;\n","/*!\n * is-extendable <https://github.com/jonschlinkert/is-extendable>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isPlainObject = require('is-plain-object');\n\nmodule.exports = function isExtendable(val) {\n return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);\n};\n","'use strict';\n\n/**\n * Module dependencies\n */\n\nvar util = require('util');\nvar toRegex = require('to-regex');\nvar extend = require('extend-shallow');\n\n/**\n * Local dependencies\n */\n\nvar compilers = require('./lib/compilers');\nvar parsers = require('./lib/parsers');\nvar cache = require('./lib/cache');\nvar utils = require('./lib/utils');\nvar MAX_LENGTH = 1024 * 64;\n\n/**\n * The main function takes a list of strings and one or more\n * glob patterns to use for matching.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm(list, patterns[, options]);\n *\n * console.log(nm(['a.js', 'a.txt'], ['*.js']));\n * //=> [ 'a.js' ]\n * ```\n * @param {Array} `list` A list of strings to match\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of matches\n * @summary false\n * @api public\n */\n\nfunction nanomatch(list, patterns, options) {\n patterns = utils.arrayify(patterns);\n list = utils.arrayify(list);\n\n var len = patterns.length;\n if (list.length === 0 || len === 0) {\n return [];\n }\n\n if (len === 1) {\n return nanomatch.match(list, patterns[0], options);\n }\n\n var negated = false;\n var omit = [];\n var keep = [];\n var idx = -1;\n\n while (++idx < len) {\n var pattern = patterns[idx];\n\n if (typeof pattern === 'string' && pattern.charCodeAt(0) === 33 /* ! */) {\n omit.push.apply(omit, nanomatch.match(list, pattern.slice(1), options));\n negated = true;\n } else {\n keep.push.apply(keep, nanomatch.match(list, pattern, options));\n }\n }\n\n // minimatch.match parity\n if (negated && keep.length === 0) {\n if (options && options.unixify === false) {\n keep = list.slice();\n } else {\n var unixify = utils.unixify(options);\n for (var i = 0; i < list.length; i++) {\n keep.push(unixify(list[i]));\n }\n }\n }\n\n var matches = utils.diff(keep, omit);\n if (!options || options.nodupes !== false) {\n return utils.unique(matches);\n }\n\n return matches;\n}\n\n/**\n * Similar to the main function, but `pattern` must be a string.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.match(list, pattern[, options]);\n *\n * console.log(nm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a'));\n * //=> ['a.a', 'a.aa']\n * ```\n * @param {Array} `list` Array of strings to match\n * @param {String} `pattern` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of matches\n * @api public\n */\n\nnanomatch.match = function(list, pattern, options) {\n if (Array.isArray(pattern)) {\n throw new TypeError('expected pattern to be a string');\n }\n\n var unixify = utils.unixify(options);\n var isMatch = memoize('match', pattern, options, nanomatch.matcher);\n var matches = [];\n\n list = utils.arrayify(list);\n var len = list.length;\n var idx = -1;\n\n while (++idx < len) {\n var ele = list[idx];\n if (ele === pattern || isMatch(ele)) {\n matches.push(utils.value(ele, unixify, options));\n }\n }\n\n // if no options were passed, uniquify results and return\n if (typeof options === 'undefined') {\n return utils.unique(matches);\n }\n\n if (matches.length === 0) {\n if (options.failglob === true) {\n throw new Error('no matches found for \"' + pattern + '\"');\n }\n if (options.nonull === true || options.nullglob === true) {\n return [options.unescape ? utils.unescape(pattern) : pattern];\n }\n }\n\n // if `opts.ignore` was defined, diff ignored list\n if (options.ignore) {\n matches = nanomatch.not(matches, options.ignore, options);\n }\n\n return options.nodupes !== false ? utils.unique(matches) : matches;\n};\n\n/**\n * Returns true if the specified `string` matches the given glob `pattern`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.isMatch(string, pattern[, options]);\n *\n * console.log(nm.isMatch('a.a', '*.a'));\n * //=> true\n * console.log(nm.isMatch('a.b', '*.a'));\n * //=> false\n * ```\n * @param {String} `string` String to match\n * @param {String} `pattern` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if the string matches the glob pattern.\n * @api public\n */\n\nnanomatch.isMatch = function(str, pattern, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string: \"' + util.inspect(str) + '\"');\n }\n\n if (utils.isEmptyString(str) || utils.isEmptyString(pattern)) {\n return false;\n }\n\n var equals = utils.equalsPattern(options);\n if (equals(str)) {\n return true;\n }\n\n var isMatch = memoize('isMatch', pattern, options, nanomatch.matcher);\n return isMatch(str);\n};\n\n/**\n * Returns true if some of the elements in the given `list` match any of the\n * given glob `patterns`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.some(list, patterns[, options]);\n *\n * console.log(nm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // true\n * console.log(nm.some(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nnanomatch.some = function(list, patterns, options) {\n if (typeof list === 'string') {\n list = [list];\n }\n\n for (var i = 0; i < list.length; i++) {\n if (nanomatch(list[i], patterns, options).length === 1) {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * Returns true if every element in the given `list` matches\n * at least one of the given glob `patterns`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.every(list, patterns[, options]);\n *\n * console.log(nm.every('foo.js', ['foo.js']));\n * // true\n * console.log(nm.every(['foo.js', 'bar.js'], ['*.js']));\n * // true\n * console.log(nm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // false\n * console.log(nm.every(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nnanomatch.every = function(list, patterns, options) {\n if (typeof list === 'string') {\n list = [list];\n }\n\n for (var i = 0; i < list.length; i++) {\n if (nanomatch(list[i], patterns, options).length !== 1) {\n return false;\n }\n }\n\n return true;\n};\n\n/**\n * Returns true if **any** of the given glob `patterns`\n * match the specified `string`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.any(string, patterns[, options]);\n *\n * console.log(nm.any('a.a', ['b.*', '*.a']));\n * //=> true\n * console.log(nm.any('a.a', 'b.*'));\n * //=> false\n * ```\n * @param {String|Array} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nnanomatch.any = function(str, patterns, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string: \"' + util.inspect(str) + '\"');\n }\n\n if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) {\n return false;\n }\n\n if (typeof patterns === 'string') {\n patterns = [patterns];\n }\n\n for (var i = 0; i < patterns.length; i++) {\n if (nanomatch.isMatch(str, patterns[i], options)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Returns true if **all** of the given `patterns`\n * match the specified string.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.all(string, patterns[, options]);\n *\n * console.log(nm.all('foo.js', ['foo.js']));\n * // true\n *\n * console.log(nm.all('foo.js', ['*.js', '!foo.js']));\n * // false\n *\n * console.log(nm.all('foo.js', ['*.js', 'foo.js']));\n * // true\n *\n * console.log(nm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));\n * // true\n * ```\n * @param {String|Array} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nnanomatch.all = function(str, patterns, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string: \"' + util.inspect(str) + '\"');\n }\n\n if (typeof patterns === 'string') {\n patterns = [patterns];\n }\n\n for (var i = 0; i < patterns.length; i++) {\n if (!nanomatch.isMatch(str, patterns[i], options)) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Returns a list of strings that _**do not match any**_ of the given `patterns`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.not(list, patterns[, options]);\n *\n * console.log(nm.not(['a.a', 'b.b', 'c.c'], '*.a'));\n * //=> ['b.b', 'c.c']\n * ```\n * @param {Array} `list` Array of strings to match.\n * @param {String|Array} `patterns` One or more glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of strings that **do not match** the given patterns.\n * @api public\n */\n\nnanomatch.not = function(list, patterns, options) {\n var opts = extend({}, options);\n var ignore = opts.ignore;\n delete opts.ignore;\n\n list = utils.arrayify(list);\n\n var matches = utils.diff(list, nanomatch(list, patterns, opts));\n if (ignore) {\n matches = utils.diff(matches, nanomatch(list, ignore));\n }\n\n return opts.nodupes !== false ? utils.unique(matches) : matches;\n};\n\n/**\n * Returns true if the given `string` contains the given pattern. Similar\n * to [.isMatch](#isMatch) but the pattern can match any part of the string.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.contains(string, pattern[, options]);\n *\n * console.log(nm.contains('aa/bb/cc', '*b'));\n * //=> true\n * console.log(nm.contains('aa/bb/cc', '*d'));\n * //=> false\n * ```\n * @param {String} `str` The string to match.\n * @param {String|Array} `patterns` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if the patter matches any part of `str`.\n * @api public\n */\n\nnanomatch.contains = function(str, patterns, options) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string: \"' + util.inspect(str) + '\"');\n }\n\n if (typeof patterns === 'string') {\n if (utils.isEmptyString(str) || utils.isEmptyString(patterns)) {\n return false;\n }\n\n var equals = utils.equalsPattern(patterns, options);\n if (equals(str)) {\n return true;\n }\n var contains = utils.containsPattern(patterns, options);\n if (contains(str)) {\n return true;\n }\n }\n\n var opts = extend({}, options, {contains: true});\n return nanomatch.any(str, patterns, opts);\n};\n\n/**\n * Returns true if the given pattern and options should enable\n * the `matchBase` option.\n * @return {Boolean}\n * @api private\n */\n\nnanomatch.matchBase = function(pattern, options) {\n if (pattern && pattern.indexOf('/') !== -1 || !options) return false;\n return options.basename === true || options.matchBase === true;\n};\n\n/**\n * Filter the keys of the given object with the given `glob` pattern\n * and `options`. Does not attempt to match nested keys. If you need this feature,\n * use [glob-object][] instead.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.matchKeys(object, patterns[, options]);\n *\n * var obj = { aa: 'a', ab: 'b', ac: 'c' };\n * console.log(nm.matchKeys(obj, '*b'));\n * //=> { ab: 'b' }\n * ```\n * @param {Object} `object` The object with keys to filter.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Object} Returns an object with only keys that match the given patterns.\n * @api public\n */\n\nnanomatch.matchKeys = function(obj, patterns, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('expected the first argument to be an object');\n }\n var keys = nanomatch(Object.keys(obj), patterns, options);\n return utils.pick(obj, keys);\n};\n\n/**\n * Returns a memoized matcher function from the given glob `pattern` and `options`.\n * The returned function takes a string to match as its only argument and returns\n * true if the string is a match.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.matcher(pattern[, options]);\n *\n * var isMatch = nm.matcher('*.!(*a)');\n * console.log(isMatch('a.a'));\n * //=> false\n * console.log(isMatch('a.b'));\n * //=> true\n * ```\n * @param {String} `pattern` Glob pattern\n * @param {Object} `options` See available [options](#options) for changing how matches are performed.\n * @return {Function} Returns a matcher function.\n * @api public\n */\n\nnanomatch.matcher = function matcher(pattern, options) {\n if (utils.isEmptyString(pattern)) {\n return function() {\n return false;\n };\n }\n\n if (Array.isArray(pattern)) {\n return compose(pattern, options, matcher);\n }\n\n // if pattern is a regex\n if (pattern instanceof RegExp) {\n return test(pattern);\n }\n\n // if pattern is invalid\n if (!utils.isString(pattern)) {\n throw new TypeError('expected pattern to be an array, string or regex');\n }\n\n // if pattern is a non-glob string\n if (!utils.hasSpecialChars(pattern)) {\n if (options && options.nocase === true) {\n pattern = pattern.toLowerCase();\n }\n return utils.matchPath(pattern, options);\n }\n\n // if pattern is a glob string\n var re = nanomatch.makeRe(pattern, options);\n\n // if `options.matchBase` or `options.basename` is defined\n if (nanomatch.matchBase(pattern, options)) {\n return utils.matchBasename(re, options);\n }\n\n function test(regex) {\n var equals = utils.equalsPattern(options);\n var unixify = utils.unixify(options);\n\n return function(str) {\n if (equals(str)) {\n return true;\n }\n\n if (regex.test(unixify(str))) {\n return true;\n }\n return false;\n };\n }\n\n // create matcher function\n var matcherFn = test(re);\n // set result object from compiler on matcher function,\n // as a non-enumerable property. useful for debugging\n utils.define(matcherFn, 'result', re.result);\n return matcherFn;\n};\n\n/**\n * Returns an array of matches captured by `pattern` in `string, or\n * `null` if the pattern did not match.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.capture(pattern, string[, options]);\n *\n * console.log(nm.capture('test/*.js', 'test/foo.js'));\n * //=> ['foo']\n * console.log(nm.capture('test/*.js', 'foo/bar.css'));\n * //=> null\n * ```\n * @param {String} `pattern` Glob pattern to use for matching.\n * @param {String} `string` String to match\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`.\n * @api public\n */\n\nnanomatch.capture = function(pattern, str, options) {\n var re = nanomatch.makeRe(pattern, extend({capture: true}, options));\n var unixify = utils.unixify(options);\n\n function match() {\n return function(string) {\n var match = re.exec(unixify(string));\n if (!match) {\n return null;\n }\n\n return match.slice(1);\n };\n }\n\n var capture = memoize('capture', pattern, options, match);\n return capture(str);\n};\n\n/**\n * Create a regular expression from the given glob `pattern`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.makeRe(pattern[, options]);\n *\n * console.log(nm.makeRe('*.js'));\n * //=> /^(?:(\\.[\\\\\\/])?(?!\\.)(?=.)[^\\/]*?\\.js)$/\n * ```\n * @param {String} `pattern` A glob pattern to convert to regex.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\nnanomatch.makeRe = function(pattern, options) {\n if (pattern instanceof RegExp) {\n return pattern;\n }\n\n if (typeof pattern !== 'string') {\n throw new TypeError('expected pattern to be a string');\n }\n\n if (pattern.length > MAX_LENGTH) {\n throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters');\n }\n\n function makeRe() {\n var opts = utils.extend({wrap: false}, options);\n var result = nanomatch.create(pattern, opts);\n var regex = toRegex(result.output, opts);\n utils.define(regex, 'result', result);\n return regex;\n }\n\n return memoize('makeRe', pattern, options, makeRe);\n};\n\n/**\n * Parses the given glob `pattern` and returns an object with the compiled `output`\n * and optional source `map`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.create(pattern[, options]);\n *\n * console.log(nm.create('abc/*.js'));\n * // { options: { source: 'string', sourcemap: true },\n * // state: {},\n * // compilers:\n * // { ... },\n * // output: '(\\\\.[\\\\\\\\\\\\/])?abc\\\\/(?!\\\\.)(?=.)[^\\\\/]*?\\\\.js',\n * // ast:\n * // { type: 'root',\n * // errors: [],\n * // nodes:\n * // [ ... ],\n * // dot: false,\n * // input: 'abc/*.js' },\n * // parsingErrors: [],\n * // map:\n * // { version: 3,\n * // sources: [ 'string' ],\n * // names: [],\n * // mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE',\n * // sourcesContent: [ 'abc/*.js' ] },\n * // position: { line: 1, column: 28 },\n * // content: {},\n * // files: {},\n * // idx: 6 }\n * ```\n * @param {String} `pattern` Glob pattern to parse and compile.\n * @param {Object} `options` Any [options](#options) to change how parsing and compiling is performed.\n * @return {Object} Returns an object with the parsed AST, compiled string and optional source map.\n * @api public\n */\n\nnanomatch.create = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected a string');\n }\n function create() {\n return nanomatch.compile(nanomatch.parse(pattern, options), options);\n }\n return memoize('create', pattern, options, create);\n};\n\n/**\n * Parse the given `str` with the given `options`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.parse(pattern[, options]);\n *\n * var ast = nm.parse('a/{b,c}/d');\n * console.log(ast);\n * // { type: 'root',\n * // errors: [],\n * // input: 'a/{b,c}/d',\n * // nodes:\n * // [ { type: 'bos', val: '' },\n * // { type: 'text', val: 'a/' },\n * // { type: 'brace',\n * // nodes:\n * // [ { type: 'brace.open', val: '{' },\n * // { type: 'text', val: 'b,c' },\n * // { type: 'brace.close', val: '}' } ] },\n * // { type: 'text', val: '/d' },\n * // { type: 'eos', val: '' } ] }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an AST\n * @api public\n */\n\nnanomatch.parse = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected a string');\n }\n\n function parse() {\n var snapdragon = utils.instantiate(null, options);\n parsers(snapdragon, options);\n\n var ast = snapdragon.parse(pattern, options);\n utils.define(ast, 'snapdragon', snapdragon);\n ast.input = pattern;\n return ast;\n }\n\n return memoize('parse', pattern, options, parse);\n};\n\n/**\n * Compile the given `ast` or string with the given `options`.\n *\n * ```js\n * var nm = require('nanomatch');\n * nm.compile(ast[, options]);\n *\n * var ast = nm.parse('a/{b,c}/d');\n * console.log(nm.compile(ast));\n * // { options: { source: 'string' },\n * // state: {},\n * // compilers:\n * // { eos: [Function],\n * // noop: [Function],\n * // bos: [Function],\n * // brace: [Function],\n * // 'brace.open': [Function],\n * // text: [Function],\n * // 'brace.close': [Function] },\n * // output: [ 'a/(b|c)/d' ],\n * // ast:\n * // { ... },\n * // parsingErrors: [] }\n * ```\n * @param {Object|String} `ast`\n * @param {Object} `options`\n * @return {Object} Returns an object that has an `output` property with the compiled string.\n * @api public\n */\n\nnanomatch.compile = function(ast, options) {\n if (typeof ast === 'string') {\n ast = nanomatch.parse(ast, options);\n }\n\n function compile() {\n var snapdragon = utils.instantiate(ast, options);\n compilers(snapdragon, options);\n return snapdragon.compile(ast, options);\n }\n\n return memoize('compile', ast.input, options, compile);\n};\n\n/**\n * Clear the regex cache.\n *\n * ```js\n * nm.clearCache();\n * ```\n * @api public\n */\n\nnanomatch.clearCache = function() {\n nanomatch.cache.__data__ = {};\n};\n\n/**\n * Compose a matcher function with the given patterns.\n * This allows matcher functions to be compiled once and\n * called multiple times.\n */\n\nfunction compose(patterns, options, matcher) {\n var matchers;\n\n return memoize('compose', String(patterns), options, function() {\n return function(file) {\n // delay composition until it's invoked the first time,\n // after that it won't be called again\n if (!matchers) {\n matchers = [];\n for (var i = 0; i < patterns.length; i++) {\n matchers.push(matcher(patterns[i], options));\n }\n }\n\n var len = matchers.length;\n while (len--) {\n if (matchers[len](file) === true) {\n return true;\n }\n }\n return false;\n };\n });\n}\n\n/**\n * Memoize a generated regex or function. A unique key is generated\n * from the `type` (usually method name), the `pattern`, and\n * user-defined options.\n */\n\nfunction memoize(type, pattern, options, fn) {\n var key = utils.createKey(type + '=' + pattern, options);\n\n if (options && options.cache === false) {\n return fn(pattern, options);\n }\n\n if (cache.has(type, key)) {\n return cache.get(type, key);\n }\n\n var val = fn(pattern, options);\n cache.set(type, key, val);\n return val;\n}\n\n/**\n * Expose compiler, parser and cache on `nanomatch`\n */\n\nnanomatch.compilers = compilers;\nnanomatch.parsers = parsers;\nnanomatch.cache = cache;\n\n/**\n * Expose `nanomatch`\n * @type {Function}\n */\n\nmodule.exports = nanomatch;\n","module.exports = new (require('fragment-cache'))();\n","'use strict';\n\n/**\n* Nanomatch compilers\n*/\n\nmodule.exports = function(nanomatch, options) {\n function slash() {\n if (options && typeof options.slash === 'string') {\n return options.slash;\n }\n if (options && typeof options.slash === 'function') {\n return options.slash.call(nanomatch);\n }\n return '\\\\\\\\/';\n }\n\n function star() {\n if (options && typeof options.star === 'string') {\n return options.star;\n }\n if (options && typeof options.star === 'function') {\n return options.star.call(nanomatch);\n }\n return '[^' + slash() + ']*?';\n }\n\n var ast = nanomatch.ast = nanomatch.parser.ast;\n ast.state = nanomatch.parser.state;\n nanomatch.compiler.state = ast.state;\n nanomatch.compiler\n\n /**\n * Negation / escaping\n */\n\n .set('not', function(node) {\n var prev = this.prev();\n if (this.options.nonegate === true || prev.type !== 'bos') {\n return this.emit('\\\\' + node.val, node);\n }\n return this.emit(node.val, node);\n })\n .set('escape', function(node) {\n if (this.options.unescape && /^[-\\w_.]/.test(node.val)) {\n return this.emit(node.val, node);\n }\n return this.emit('\\\\' + node.val, node);\n })\n .set('quoted', function(node) {\n return this.emit(node.val, node);\n })\n\n /**\n * Regex\n */\n\n .set('dollar', function(node) {\n if (node.parent.type === 'bracket') {\n return this.emit(node.val, node);\n }\n return this.emit('\\\\' + node.val, node);\n })\n\n /**\n * Dot: \".\"\n */\n\n .set('dot', function(node) {\n if (node.dotfiles === true) this.dotfiles = true;\n return this.emit('\\\\' + node.val, node);\n })\n\n /**\n * Slashes: \"/\" and \"\\\"\n */\n\n .set('backslash', function(node) {\n return this.emit(node.val, node);\n })\n .set('slash', function(node, nodes, i) {\n var val = '[' + slash() + ']';\n var parent = node.parent;\n var prev = this.prev();\n\n // set \"node.hasSlash\" to true on all ancestor parens nodes\n while (parent.type === 'paren' && !parent.hasSlash) {\n parent.hasSlash = true;\n parent = parent.parent;\n }\n\n if (prev.addQmark) {\n val += '?';\n }\n\n // word boundary\n if (node.rest.slice(0, 2) === '\\\\b') {\n return this.emit(val, node);\n }\n\n // globstars\n if (node.parsed === '**' || node.parsed === './**') {\n this.output = '(?:' + this.output;\n return this.emit(val + ')?', node);\n }\n\n // negation\n if (node.parsed === '!**' && this.options.nonegate !== true) {\n return this.emit(val + '?\\\\b', node);\n }\n return this.emit(val, node);\n })\n\n /**\n * Square brackets\n */\n\n .set('bracket', function(node) {\n var close = node.close;\n var open = !node.escaped ? '[' : '\\\\[';\n var negated = node.negated;\n var inner = node.inner;\n var val = node.val;\n\n if (node.escaped === true) {\n inner = inner.replace(/\\\\?(\\W)/g, '\\\\$1');\n negated = '';\n }\n\n if (inner === ']-') {\n inner = '\\\\]\\\\-';\n }\n\n if (negated && inner.indexOf('.') === -1) {\n inner += '.';\n }\n if (negated && inner.indexOf('/') === -1) {\n inner += '/';\n }\n\n val = open + negated + inner + close;\n return this.emit(val, node);\n })\n\n /**\n * Square: \"[.]\" (only matches a single character in brackets)\n */\n\n .set('square', function(node) {\n var val = (/^\\W/.test(node.val) ? '\\\\' : '') + node.val;\n return this.emit(val, node);\n })\n\n /**\n * Question mark: \"?\"\n */\n\n .set('qmark', function(node) {\n var prev = this.prev();\n // don't use \"slash\" variable so that we always avoid\n // matching backslashes and slashes with a qmark\n var val = '[^.\\\\\\\\/]';\n if (this.options.dot || (prev.type !== 'bos' && prev.type !== 'slash')) {\n val = '[^\\\\\\\\/]';\n }\n\n if (node.parsed.slice(-1) === '(') {\n var ch = node.rest.charAt(0);\n if (ch === '!' || ch === '=' || ch === ':') {\n return this.emit(node.val, node);\n }\n }\n\n if (node.val.length > 1) {\n val += '{' + node.val.length + '}';\n }\n return this.emit(val, node);\n })\n\n /**\n * Plus\n */\n\n .set('plus', function(node) {\n var prev = node.parsed.slice(-1);\n if (prev === ']' || prev === ')') {\n return this.emit(node.val, node);\n }\n if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) {\n return this.emit('\\\\+', node);\n }\n var ch = this.output.slice(-1);\n if (/\\w/.test(ch) && !node.inside) {\n return this.emit('+\\\\+?', node);\n }\n return this.emit('+', node);\n })\n\n /**\n * globstar: '**'\n */\n\n .set('globstar', function(node, nodes, i) {\n if (!this.output) {\n this.state.leadingGlobstar = true;\n }\n\n var prev = this.prev();\n var before = this.prev(2);\n var next = this.next();\n var after = this.next(2);\n var type = prev.type;\n var val = node.val;\n\n if (prev.type === 'slash' && next.type === 'slash') {\n if (before.type === 'text') {\n this.output += '?';\n\n if (after.type !== 'text') {\n this.output += '\\\\b';\n }\n }\n }\n\n var parsed = node.parsed;\n if (parsed.charAt(0) === '!') {\n parsed = parsed.slice(1);\n }\n\n var isInside = node.isInside.paren || node.isInside.brace;\n if (parsed && type !== 'slash' && type !== 'bos' && !isInside) {\n val = star();\n } else {\n val = this.options.dot !== true\n ? '(?:(?!(?:[' + slash() + ']|^)\\\\.).)*?'\n : '(?:(?!(?:[' + slash() + ']|^)(?:\\\\.{1,2})($|[' + slash() + ']))(?!\\\\.{2}).)*?';\n }\n\n if ((type === 'slash' || type === 'bos') && this.options.dot !== true) {\n val = '(?!\\\\.)' + val;\n }\n\n if (prev.type === 'slash' && next.type === 'slash' && before.type !== 'text') {\n if (after.type === 'text' || after.type === 'star') {\n node.addQmark = true;\n }\n }\n\n if (this.options.capture) {\n val = '(' + val + ')';\n }\n\n return this.emit(val, node);\n })\n\n /**\n * Star: \"*\"\n */\n\n .set('star', function(node, nodes, i) {\n var prior = nodes[i - 2] || {};\n var prev = this.prev();\n var next = this.next();\n var type = prev.type;\n\n function isStart(n) {\n return n.type === 'bos' || n.type === 'slash';\n }\n\n if (this.output === '' && this.options.contains !== true) {\n this.output = '(?![' + slash() + '])';\n }\n\n if (type === 'bracket' && this.options.bash === false) {\n var str = next && next.type === 'bracket' ? star() : '*?';\n if (!prev.nodes || prev.nodes[1].type !== 'posix') {\n return this.emit(str, node);\n }\n }\n\n var prefix = !this.dotfiles && type !== 'text' && type !== 'escape'\n ? (this.options.dot ? '(?!(?:^|[' + slash() + '])\\\\.{1,2}(?:$|[' + slash() + ']))' : '(?!\\\\.)')\n : '';\n\n if (isStart(prev) || (isStart(prior) && type === 'not')) {\n if (prefix !== '(?!\\\\.)') {\n prefix += '(?!(\\\\.{2}|\\\\.[' + slash() + ']))(?=.)';\n } else {\n prefix += '(?=.)';\n }\n } else if (prefix === '(?!\\\\.)') {\n prefix = '';\n }\n\n if (prev.type === 'not' && prior.type === 'bos' && this.options.dot === true) {\n this.output = '(?!\\\\.)' + this.output;\n }\n\n var output = prefix + star();\n if (this.options.capture) {\n output = '(' + output + ')';\n }\n\n return this.emit(output, node);\n })\n\n /**\n * Text\n */\n\n .set('text', function(node) {\n return this.emit(node.val, node);\n })\n\n /**\n * End-of-string\n */\n\n .set('eos', function(node) {\n var prev = this.prev();\n var val = node.val;\n\n this.output = '(?:\\\\.[' + slash() + '](?=.))?' + this.output;\n if (this.state.metachar && prev.type !== 'qmark' && prev.type !== 'slash') {\n val += (this.options.contains ? '[' + slash() + ']?' : '(?:[' + slash() + ']|$)');\n }\n\n return this.emit(val, node);\n });\n\n /**\n * Allow custom compilers to be passed on options\n */\n\n if (options && typeof options.compilers === 'function') {\n options.compilers(nanomatch.compiler);\n }\n};\n\n","'use strict';\n\nvar regexNot = require('regex-not');\nvar toRegex = require('to-regex');\n\n/**\n * Characters to use in negation regex (we want to \"not\" match\n * characters that are matched by other parsers)\n */\n\nvar cached;\nvar NOT_REGEX = '[\\\\[!*+?$^\"\\'.\\\\\\\\/]+';\nvar not = createTextRegex(NOT_REGEX);\n\n/**\n * Nanomatch parsers\n */\n\nmodule.exports = function(nanomatch, options) {\n var parser = nanomatch.parser;\n var opts = parser.options;\n\n parser.state = {\n slashes: 0,\n paths: []\n };\n\n parser.ast.state = parser.state;\n parser\n\n /**\n * Beginning-of-string\n */\n\n .capture('prefix', function() {\n if (this.parsed) return;\n var m = this.match(/^\\.[\\\\/]/);\n if (!m) return;\n this.state.strictOpen = !!this.options.strictOpen;\n this.state.addPrefix = true;\n })\n\n /**\n * Escape: \"\\\\.\"\n */\n\n .capture('escape', function() {\n if (this.isInside('bracket')) return;\n var pos = this.position();\n var m = this.match(/^(?:\\\\(.)|([$^]))/);\n if (!m) return;\n\n return pos({\n type: 'escape',\n val: m[2] || m[1]\n });\n })\n\n /**\n * Quoted strings\n */\n\n .capture('quoted', function() {\n var pos = this.position();\n var m = this.match(/^[\"']/);\n if (!m) return;\n\n var quote = m[0];\n if (this.input.indexOf(quote) === -1) {\n return pos({\n type: 'escape',\n val: quote\n });\n }\n\n var tok = advanceTo(this.input, quote);\n this.consume(tok.len);\n\n return pos({\n type: 'quoted',\n val: tok.esc\n });\n })\n\n /**\n * Negations: \"!\"\n */\n\n .capture('not', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(this.notRegex || /^!+/);\n if (!m) return;\n var val = m[0];\n\n var isNegated = (val.length % 2) === 1;\n if (parsed === '' && !isNegated) {\n val = '';\n }\n\n // if nothing has been parsed, we know `!` is at the start,\n // so we need to wrap the result in a negation regex\n if (parsed === '' && isNegated && this.options.nonegate !== true) {\n this.bos.val = '(?!^(?:';\n this.append = ')$).*';\n val = '';\n }\n return pos({\n type: 'not',\n val: val\n });\n })\n\n /**\n * Dot: \".\"\n */\n\n .capture('dot', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(/^\\.+/);\n if (!m) return;\n\n var val = m[0];\n this.state.dot = val === '.' && (parsed === '' || parsed.slice(-1) === '/');\n\n return pos({\n type: 'dot',\n dotfiles: this.state.dot,\n val: val\n });\n })\n\n /**\n * Plus: \"+\"\n */\n\n .capture('plus', /^\\+(?!\\()/)\n\n /**\n * Question mark: \"?\"\n */\n\n .capture('qmark', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(/^\\?+(?!\\()/);\n if (!m) return;\n\n this.state.metachar = true;\n this.state.qmark = true;\n\n return pos({\n type: 'qmark',\n parsed: parsed,\n val: m[0]\n });\n })\n\n /**\n * Globstar: \"**\"\n */\n\n .capture('globstar', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(/^\\*{2}(?![*(])(?=[,)/]|$)/);\n if (!m) return;\n\n var type = opts.noglobstar !== true ? 'globstar' : 'star';\n var node = pos({type: type, parsed: parsed});\n this.state.metachar = true;\n\n while (this.input.slice(0, 4) === '/**/') {\n this.input = this.input.slice(3);\n }\n\n node.isInside = {\n brace: this.isInside('brace'),\n paren: this.isInside('paren')\n };\n\n if (type === 'globstar') {\n this.state.globstar = true;\n node.val = '**';\n\n } else {\n this.state.star = true;\n node.val = '*';\n }\n\n return node;\n })\n\n /**\n * Star: \"*\"\n */\n\n .capture('star', function() {\n var pos = this.position();\n var starRe = /^(?:\\*(?![*(])|[*]{3,}(?!\\()|[*]{2}(?![(/]|$)|\\*(?=\\*\\())/;\n var m = this.match(starRe);\n if (!m) return;\n\n this.state.metachar = true;\n this.state.star = true;\n return pos({\n type: 'star',\n val: m[0]\n });\n })\n\n /**\n * Slash: \"/\"\n */\n\n .capture('slash', function() {\n var pos = this.position();\n var m = this.match(/^\\//);\n if (!m) return;\n\n this.state.slashes++;\n return pos({\n type: 'slash',\n val: m[0]\n });\n })\n\n /**\n * Backslash: \"\\\\\"\n */\n\n .capture('backslash', function() {\n var pos = this.position();\n var m = this.match(/^\\\\(?![*+?(){}[\\]'\"])/);\n if (!m) return;\n\n var val = m[0];\n\n if (this.isInside('bracket')) {\n val = '\\\\';\n } else if (val.length > 1) {\n val = '\\\\\\\\';\n }\n\n return pos({\n type: 'backslash',\n val: val\n });\n })\n\n /**\n * Square: \"[.]\"\n */\n\n .capture('square', function() {\n if (this.isInside('bracket')) return;\n var pos = this.position();\n var m = this.match(/^\\[([^!^\\\\])\\]/);\n if (!m) return;\n\n return pos({\n type: 'square',\n val: m[1]\n });\n })\n\n /**\n * Brackets: \"[...]\" (basic, this can be overridden by other parsers)\n */\n\n .capture('bracket', function() {\n var pos = this.position();\n var m = this.match(/^(?:\\[([!^]?)([^\\]]+|\\]-)(\\]|[^*+?]+)|\\[)/);\n if (!m) return;\n\n var val = m[0];\n var negated = m[1] ? '^' : '';\n var inner = (m[2] || '').replace(/\\\\\\\\+/, '\\\\\\\\');\n var close = m[3] || '';\n\n if (m[2] && inner.length < m[2].length) {\n val = val.replace(/\\\\\\\\+/, '\\\\\\\\');\n }\n\n var esc = this.input.slice(0, 2);\n if (inner === '' && esc === '\\\\]') {\n inner += esc;\n this.consume(2);\n\n var str = this.input;\n var idx = -1;\n var ch;\n\n while ((ch = str[++idx])) {\n this.consume(1);\n if (ch === ']') {\n close = ch;\n break;\n }\n inner += ch;\n }\n }\n\n return pos({\n type: 'bracket',\n val: val,\n escaped: close !== ']',\n negated: negated,\n inner: inner,\n close: close\n });\n })\n\n /**\n * Text\n */\n\n .capture('text', function() {\n if (this.isInside('bracket')) return;\n var pos = this.position();\n var m = this.match(not);\n if (!m || !m[0]) return;\n\n return pos({\n type: 'text',\n val: m[0]\n });\n });\n\n /**\n * Allow custom parsers to be passed on options\n */\n\n if (options && typeof options.parsers === 'function') {\n options.parsers(nanomatch.parser);\n }\n};\n\n/**\n * Advance to the next non-escaped character\n */\n\nfunction advanceTo(input, endChar) {\n var ch = input.charAt(0);\n var tok = { len: 1, val: '', esc: '' };\n var idx = 0;\n\n function advance() {\n if (ch !== '\\\\') {\n tok.esc += '\\\\' + ch;\n tok.val += ch;\n }\n\n ch = input.charAt(++idx);\n tok.len++;\n\n if (ch === '\\\\') {\n advance();\n advance();\n }\n }\n\n while (ch && ch !== endChar) {\n advance();\n }\n return tok;\n}\n\n/**\n * Create text regex\n */\n\nfunction createTextRegex(pattern) {\n if (cached) return cached;\n var opts = {contains: true, strictClose: false};\n var not = regexNot.create(pattern, opts);\n var re = toRegex('^(?:[*]\\\\((?=.)|' + not + ')', opts);\n return (cached = re);\n}\n\n/**\n * Expose negation string\n */\n\nmodule.exports.not = NOT_REGEX;\n","'use strict';\n\nvar utils = module.exports;\nvar path = require('path');\n\n/**\n * Module dependencies\n */\n\nvar isWindows = require('is-windows')();\nvar Snapdragon = require('snapdragon');\nutils.define = require('define-property');\nutils.diff = require('arr-diff');\nutils.extend = require('extend-shallow');\nutils.pick = require('object.pick');\nutils.typeOf = require('kind-of');\nutils.unique = require('array-unique');\n\n/**\n * Returns true if the given value is effectively an empty string\n */\n\nutils.isEmptyString = function(val) {\n return String(val) === '' || String(val) === './';\n};\n\n/**\n * Returns true if the platform is windows, or `path.sep` is `\\\\`.\n * This is defined as a function to allow `path.sep` to be set in unit tests,\n * or by the user, if there is a reason to do so.\n * @return {Boolean}\n */\n\nutils.isWindows = function() {\n return path.sep === '\\\\' || isWindows === true;\n};\n\n/**\n * Return the last element from an array\n */\n\nutils.last = function(arr, n) {\n return arr[arr.length - (n || 1)];\n};\n\n/**\n * Get the `Snapdragon` instance to use\n */\n\nutils.instantiate = function(ast, options) {\n var snapdragon;\n // if an instance was created by `.parse`, use that instance\n if (utils.typeOf(ast) === 'object' && ast.snapdragon) {\n snapdragon = ast.snapdragon;\n // if the user supplies an instance on options, use that instance\n } else if (utils.typeOf(options) === 'object' && options.snapdragon) {\n snapdragon = options.snapdragon;\n // create a new instance\n } else {\n snapdragon = new Snapdragon(options);\n }\n\n utils.define(snapdragon, 'parse', function(str, options) {\n var parsed = Snapdragon.prototype.parse.call(this, str, options);\n parsed.input = str;\n\n // escape unmatched brace/bracket/parens\n var last = this.parser.stack.pop();\n if (last && this.options.strictErrors !== true) {\n var open = last.nodes[0];\n var inner = last.nodes[1];\n if (last.type === 'bracket') {\n if (inner.val.charAt(0) === '[') {\n inner.val = '\\\\' + inner.val;\n }\n\n } else {\n open.val = '\\\\' + open.val;\n var sibling = open.parent.nodes[1];\n if (sibling.type === 'star') {\n sibling.loose = true;\n }\n }\n }\n\n // add non-enumerable parser reference\n utils.define(parsed, 'parser', this.parser);\n return parsed;\n });\n\n return snapdragon;\n};\n\n/**\n * Create the key to use for memoization. The key is generated\n * by iterating over the options and concatenating key-value pairs\n * to the pattern string.\n */\n\nutils.createKey = function(pattern, options) {\n if (typeof options === 'undefined') {\n return pattern;\n }\n var key = pattern;\n for (var prop in options) {\n if (options.hasOwnProperty(prop)) {\n key += ';' + prop + '=' + String(options[prop]);\n }\n }\n return key;\n};\n\n/**\n * Cast `val` to an array\n * @return {Array}\n */\n\nutils.arrayify = function(val) {\n if (typeof val === 'string') return [val];\n return val ? (Array.isArray(val) ? val : [val]) : [];\n};\n\n/**\n * Return true if `val` is a non-empty string\n */\n\nutils.isString = function(val) {\n return typeof val === 'string';\n};\n\n/**\n * Return true if `val` is a non-empty string\n */\n\nutils.isRegex = function(val) {\n return utils.typeOf(val) === 'regexp';\n};\n\n/**\n * Return true if `val` is a non-empty string\n */\n\nutils.isObject = function(val) {\n return utils.typeOf(val) === 'object';\n};\n\n/**\n * Escape regex characters in the given string\n */\n\nutils.escapeRegex = function(str) {\n return str.replace(/[-[\\]{}()^$|*+?.\\\\/\\s]/g, '\\\\$&');\n};\n\n/**\n * Combines duplicate characters in the provided `input` string.\n * @param {String} `input`\n * @returns {String}\n */\n\nutils.combineDupes = function(input, patterns) {\n patterns = utils.arrayify(patterns).join('|').split('|');\n patterns = patterns.map(function(s) {\n return s.replace(/\\\\?([+*\\\\/])/g, '\\\\$1');\n });\n var substr = patterns.join('|');\n var regex = new RegExp('(' + substr + ')(?=\\\\1)', 'g');\n return input.replace(regex, '');\n};\n\n/**\n * Returns true if the given `str` has special characters\n */\n\nutils.hasSpecialChars = function(str) {\n return /(?:(?:(^|\\/)[!.])|[*?+()|[\\]{}]|[+@]\\()/.test(str);\n};\n\n/**\n * Normalize slashes in the given filepath.\n *\n * @param {String} `filepath`\n * @return {String}\n */\n\nutils.toPosixPath = function(str) {\n return str.replace(/\\\\+/g, '/');\n};\n\n/**\n * Strip backslashes before special characters in a string.\n *\n * @param {String} `str`\n * @return {String}\n */\n\nutils.unescape = function(str) {\n return utils.toPosixPath(str.replace(/\\\\(?=[*+?!.])/g, ''));\n};\n\n/**\n * Strip the drive letter from a windows filepath\n * @param {String} `fp`\n * @return {String}\n */\n\nutils.stripDrive = function(fp) {\n return utils.isWindows() ? fp.replace(/^[a-z]:[\\\\/]+?/i, '/') : fp;\n};\n\n/**\n * Strip the prefix from a filepath\n * @param {String} `fp`\n * @return {String}\n */\n\nutils.stripPrefix = function(str) {\n if (str.charAt(0) === '.' && (str.charAt(1) === '/' || str.charAt(1) === '\\\\')) {\n return str.slice(2);\n }\n return str;\n};\n\n/**\n * Returns true if `str` is a common character that doesn't need\n * to be processed to be used for matching.\n * @param {String} `str`\n * @return {Boolean}\n */\n\nutils.isSimpleChar = function(str) {\n return str.trim() === '' || str === '.';\n};\n\n/**\n * Returns true if the given str is an escaped or\n * unescaped path character\n */\n\nutils.isSlash = function(str) {\n return str === '/' || str === '\\\\/' || str === '\\\\' || str === '\\\\\\\\';\n};\n\n/**\n * Returns a function that returns true if the given\n * pattern matches or contains a `filepath`\n *\n * @param {String} `pattern`\n * @return {Function}\n */\n\nutils.matchPath = function(pattern, options) {\n return (options && options.contains)\n ? utils.containsPattern(pattern, options)\n : utils.equalsPattern(pattern, options);\n};\n\n/**\n * Returns true if the given (original) filepath or unixified path are equal\n * to the given pattern.\n */\n\nutils._equals = function(filepath, unixPath, pattern) {\n return pattern === filepath || pattern === unixPath;\n};\n\n/**\n * Returns true if the given (original) filepath or unixified path contain\n * the given pattern.\n */\n\nutils._contains = function(filepath, unixPath, pattern) {\n return filepath.indexOf(pattern) !== -1 || unixPath.indexOf(pattern) !== -1;\n};\n\n/**\n * Returns a function that returns true if the given\n * pattern is the same as a given `filepath`\n *\n * @param {String} `pattern`\n * @return {Function}\n */\n\nutils.equalsPattern = function(pattern, options) {\n var unixify = utils.unixify(options);\n options = options || {};\n\n return function fn(filepath) {\n var equal = utils._equals(filepath, unixify(filepath), pattern);\n if (equal === true || options.nocase !== true) {\n return equal;\n }\n var lower = filepath.toLowerCase();\n return utils._equals(lower, unixify(lower), pattern);\n };\n};\n\n/**\n * Returns a function that returns true if the given\n * pattern contains a `filepath`\n *\n * @param {String} `pattern`\n * @return {Function}\n */\n\nutils.containsPattern = function(pattern, options) {\n var unixify = utils.unixify(options);\n options = options || {};\n\n return function(filepath) {\n var contains = utils._contains(filepath, unixify(filepath), pattern);\n if (contains === true || options.nocase !== true) {\n return contains;\n }\n var lower = filepath.toLowerCase();\n return utils._contains(lower, unixify(lower), pattern);\n };\n};\n\n/**\n * Returns a function that returns true if the given\n * regex matches the `filename` of a file path.\n *\n * @param {RegExp} `re` Matching regex\n * @return {Function}\n */\n\nutils.matchBasename = function(re) {\n return function(filepath) {\n return re.test(filepath) || re.test(path.basename(filepath));\n };\n};\n\n/**\n * Returns the given value unchanced.\n * @return {any}\n */\n\nutils.identity = function(val) {\n return val;\n};\n\n/**\n * Determines the filepath to return based on the provided options.\n * @return {any}\n */\n\nutils.value = function(str, unixify, options) {\n if (options && options.unixify === false) {\n return str;\n }\n if (options && typeof options.unixify === 'function') {\n return options.unixify(str);\n }\n return unixify(str);\n};\n\n/**\n * Returns a function that normalizes slashes in a string to forward\n * slashes, strips `./` from beginning of paths, and optionally unescapes\n * special characters.\n * @return {Function}\n */\n\nutils.unixify = function(options) {\n var opts = options || {};\n return function(filepath) {\n if (opts.stripPrefix !== false) {\n filepath = utils.stripPrefix(filepath);\n }\n if (opts.unescape === true) {\n filepath = utils.unescape(filepath);\n }\n if (opts.unixify === true || utils.isWindows()) {\n filepath = utils.toPosixPath(filepath);\n }\n return filepath;\n };\n};\n","/*!\n * define-property <https://github.com/jonschlinkert/define-property>\n *\n * Copyright (c) 2015-2018, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isobject = require('isobject');\nvar isDescriptor = require('is-descriptor');\nvar define = (typeof Reflect !== 'undefined' && Reflect.defineProperty)\n ? Reflect.defineProperty\n : Object.defineProperty;\n\nmodule.exports = function defineProperty(obj, key, val) {\n if (!isobject(obj) && typeof obj !== 'function' && !Array.isArray(obj)) {\n throw new TypeError('expected an object, function, or array');\n }\n\n if (typeof key !== 'string') {\n throw new TypeError('expected \"key\" to be a string');\n }\n\n if (isDescriptor(val)) {\n define(obj, key, val);\n return obj;\n }\n\n define(obj, key, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: val\n });\n\n return obj;\n};\n","'use strict';\n\nvar isExtendable = require('is-extendable');\nvar assignSymbols = require('assign-symbols');\n\nmodule.exports = Object.assign || function(obj/*, objects*/) {\n if (obj === null || typeof obj === 'undefined') {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n if (!isObject(obj)) {\n obj = {};\n }\n for (var i = 1; i < arguments.length; i++) {\n var val = arguments[i];\n if (isString(val)) {\n val = toObject(val);\n }\n if (isObject(val)) {\n assign(obj, val);\n assignSymbols(obj, val);\n }\n }\n return obj;\n};\n\nfunction assign(a, b) {\n for (var key in b) {\n if (hasOwn(b, key)) {\n a[key] = b[key];\n }\n }\n}\n\nfunction isString(val) {\n return (val && typeof val === 'string');\n}\n\nfunction toObject(str) {\n var obj = {};\n for (var i in str) {\n obj[i] = str[i];\n }\n return obj;\n}\n\nfunction isObject(val) {\n return (val && typeof val === 'object') || isExtendable(val);\n}\n\n/**\n * Returns true if the given `key` is an own property of `obj`.\n */\n\nfunction hasOwn(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction isEnum(obj, key) {\n return Object.prototype.propertyIsEnumerable.call(obj, key);\n}\n","/*!\n * is-extendable <https://github.com/jonschlinkert/is-extendable>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isPlainObject = require('is-plain-object');\n\nmodule.exports = function isExtendable(val) {\n return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);\n};\n","var toString = Object.prototype.toString;\n\nmodule.exports = function kindOf(val) {\n if (val === void 0) return 'undefined';\n if (val === null) return 'null';\n\n var type = typeof val;\n if (type === 'boolean') return 'boolean';\n if (type === 'string') return 'string';\n if (type === 'number') return 'number';\n if (type === 'symbol') return 'symbol';\n if (type === 'function') {\n return isGeneratorFn(val) ? 'generatorfunction' : 'function';\n }\n\n if (isArray(val)) return 'array';\n if (isBuffer(val)) return 'buffer';\n if (isArguments(val)) return 'arguments';\n if (isDate(val)) return 'date';\n if (isError(val)) return 'error';\n if (isRegexp(val)) return 'regexp';\n\n switch (ctorName(val)) {\n case 'Symbol': return 'symbol';\n case 'Promise': return 'promise';\n\n // Set, Map, WeakSet, WeakMap\n case 'WeakMap': return 'weakmap';\n case 'WeakSet': return 'weakset';\n case 'Map': return 'map';\n case 'Set': return 'set';\n\n // 8-bit typed arrays\n case 'Int8Array': return 'int8array';\n case 'Uint8Array': return 'uint8array';\n case 'Uint8ClampedArray': return 'uint8clampedarray';\n\n // 16-bit typed arrays\n case 'Int16Array': return 'int16array';\n case 'Uint16Array': return 'uint16array';\n\n // 32-bit typed arrays\n case 'Int32Array': return 'int32array';\n case 'Uint32Array': return 'uint32array';\n case 'Float32Array': return 'float32array';\n case 'Float64Array': return 'float64array';\n }\n\n if (isGeneratorObj(val)) {\n return 'generator';\n }\n\n // Non-plain objects\n type = toString.call(val);\n switch (type) {\n case '[object Object]': return 'object';\n // iterators\n case '[object Map Iterator]': return 'mapiterator';\n case '[object Set Iterator]': return 'setiterator';\n case '[object String Iterator]': return 'stringiterator';\n case '[object Array Iterator]': return 'arrayiterator';\n }\n\n // other\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, '');\n};\n\nfunction ctorName(val) {\n return val.constructor ? val.constructor.name : null;\n}\n\nfunction isArray(val) {\n if (Array.isArray) return Array.isArray(val);\n return val instanceof Array;\n}\n\nfunction isError(val) {\n return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === 'function'\n && typeof val.getDate === 'function'\n && typeof val.setDate === 'function';\n}\n\nfunction isRegexp(val) {\n if (val instanceof RegExp) return true;\n return typeof val.flags === 'string'\n && typeof val.ignoreCase === 'boolean'\n && typeof val.multiline === 'boolean'\n && typeof val.global === 'boolean';\n}\n\nfunction isGeneratorFn(name, val) {\n return ctorName(name) === 'GeneratorFunction';\n}\n\nfunction isGeneratorObj(val) {\n return typeof val.throw === 'function'\n && typeof val.return === 'function'\n && typeof val.next === 'function';\n}\n\nfunction isArguments(val) {\n try {\n if (typeof val.length === 'number' && typeof val.callee === 'function') {\n return true;\n }\n } catch (err) {\n if (err.message.indexOf('callee') !== -1) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * If you need to support Safari 5-7 (8-10 yr-old browser),\n * take a look at https://github.com/feross/is-buffer\n */\n\nfunction isBuffer(val) {\n if (val.constructor && typeof val.constructor.isBuffer === 'function') {\n return val.constructor.isBuffer(val);\n }\n return false;\n}\n","'use strict';\n\nvar typeOf = require('kind-of');\nvar copyDescriptor = require('copy-descriptor');\nvar define = require('define-property');\n\n/**\n * Copy static properties, prototype properties, and descriptors from one object to another.\n *\n * ```js\n * function App() {}\n * var proto = App.prototype;\n * App.prototype.set = function() {};\n * App.prototype.get = function() {};\n *\n * var obj = {};\n * copy(obj, proto);\n * ```\n * @param {Object} `receiver`\n * @param {Object} `provider`\n * @param {String|Array} `omit` One or more properties to omit\n * @return {Object}\n * @api public\n */\n\nfunction copy(receiver, provider, omit) {\n if (!isObject(receiver)) {\n throw new TypeError('expected receiving object to be an object.');\n }\n if (!isObject(provider)) {\n throw new TypeError('expected providing object to be an object.');\n }\n\n var props = nativeKeys(provider);\n var keys = Object.keys(provider);\n var len = props.length;\n omit = arrayify(omit);\n\n while (len--) {\n var key = props[len];\n\n if (has(keys, key)) {\n define(receiver, key, provider[key]);\n } else if (!(key in receiver) && !has(omit, key)) {\n copyDescriptor(receiver, provider, key);\n }\n }\n};\n\n/**\n * Return true if the given value is an object or function\n */\n\nfunction isObject(val) {\n return typeOf(val) === 'object' || typeof val === 'function';\n}\n\n/**\n * Returns true if an array has any of the given elements, or an\n * object has any of the give keys.\n *\n * ```js\n * has(['a', 'b', 'c'], 'c');\n * //=> true\n *\n * has(['a', 'b', 'c'], ['c', 'z']);\n * //=> true\n *\n * has({a: 'b', c: 'd'}, ['c', 'z']);\n * //=> true\n * ```\n * @param {Object} `obj`\n * @param {String|Array} `val`\n * @return {Boolean}\n */\n\nfunction has(obj, val) {\n val = arrayify(val);\n var len = val.length;\n\n if (isObject(obj)) {\n for (var key in obj) {\n if (val.indexOf(key) > -1) {\n return true;\n }\n }\n\n var keys = nativeKeys(obj);\n return has(keys, val);\n }\n\n if (Array.isArray(obj)) {\n var arr = obj;\n while (len--) {\n if (arr.indexOf(val[len]) > -1) {\n return true;\n }\n }\n return false;\n }\n\n throw new TypeError('expected an array or object.');\n}\n\n/**\n * Cast the given value to an array.\n *\n * ```js\n * arrayify('foo');\n * //=> ['foo']\n *\n * arrayify(['foo']);\n * //=> ['foo']\n * ```\n *\n * @param {String|Array} `val`\n * @return {Array}\n */\n\nfunction arrayify(val) {\n return val ? (Array.isArray(val) ? val : [val]) : [];\n}\n\n/**\n * Returns true if a value has a `contructor`\n *\n * ```js\n * hasConstructor({});\n * //=> true\n *\n * hasConstructor(Object.create(null));\n * //=> false\n * ```\n * @param {Object} `value`\n * @return {Boolean}\n */\n\nfunction hasConstructor(val) {\n return isObject(val) && typeof val.constructor !== 'undefined';\n}\n\n/**\n * Get the native `ownPropertyNames` from the constructor of the\n * given `object`. An empty array is returned if the object does\n * not have a constructor.\n *\n * ```js\n * nativeKeys({a: 'b', b: 'c', c: 'd'})\n * //=> ['a', 'b', 'c']\n *\n * nativeKeys(function(){})\n * //=> ['length', 'caller']\n * ```\n *\n * @param {Object} `obj` Object that has a `constructor`.\n * @return {Array} Array of keys.\n */\n\nfunction nativeKeys(val) {\n if (!hasConstructor(val)) return [];\n return Object.getOwnPropertyNames(val);\n}\n\n/**\n * Expose `copy`\n */\n\nmodule.exports = copy;\n\n/**\n * Expose `copy.has` for tests\n */\n\nmodule.exports.has = has;\n","/*!\n * object-visit <https://github.com/jonschlinkert/object-visit>\n *\n * Copyright (c) 2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\n\nmodule.exports = function visit(thisArg, method, target, val) {\n if (!isObject(thisArg) && typeof thisArg !== 'function') {\n throw new Error('object-visit expects `thisArg` to be an object.');\n }\n\n if (typeof method !== 'string') {\n throw new Error('object-visit expects `method` name to be a string');\n }\n\n if (typeof thisArg[method] !== 'function') {\n return thisArg;\n }\n\n var args = [].slice.call(arguments, 3);\n target = target || {};\n\n for (var key in target) {\n var arr = [key, target[key]].concat(args);\n thisArg[method].apply(thisArg, arr);\n }\n return thisArg;\n};\n","/*!\n * object.pick <https://github.com/jonschlinkert/object.pick>\n *\n * Copyright (c) 2014-2015 Jon Schlinkert, contributors.\n * Licensed under the MIT License\n */\n\n'use strict';\n\nvar isObject = require('isobject');\n\nmodule.exports = function pick(obj, keys) {\n if (!isObject(obj) && typeof obj !== 'function') {\n return {};\n }\n\n var res = {};\n if (typeof keys === 'string') {\n if (keys in obj) {\n res[keys] = obj[keys];\n }\n return res;\n }\n\n var len = keys.length;\n var idx = -1;\n\n while (++idx < len) {\n var key = keys[idx];\n if (key in obj) {\n res[key] = obj[key];\n }\n }\n return res;\n};\n","/*!\n * pascalcase <https://github.com/jonschlinkert/pascalcase>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\nfunction pascalcase(str) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string.');\n }\n str = str.replace(/([A-Z])/g, ' $1');\n if (str.length === 1) { return str.toUpperCase(); }\n str = str.replace(/^[\\W_]+|[\\W_]+$/g, '').toLowerCase();\n str = str.charAt(0).toUpperCase() + str.slice(1);\n return str.replace(/[\\W_]+(\\w|$)/g, function (_, ch) {\n return ch.toUpperCase();\n });\n}\n\nmodule.exports = pascalcase;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n var result = splitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n var f = splitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nexports.extname = function(path) {\n return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","'use strict';\n\n/**\n * POSIX character classes\n */\n\nmodule.exports = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/** @license React v16.8.4\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\n\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' ||\n // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);\n}\n\n/**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar lowPriorityWarning = function () {};\n\n{\n var printWarning = function (format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarning = function (condition, format) {\n if (format === undefined) {\n throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nvar lowPriorityWarning$1 = lowPriorityWarning;\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n default:\n return $$typeof;\n }\n }\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\n\n// AsyncMode is deprecated along with isAsyncMode\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\n\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\n\n// AsyncMode should be deprecated\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.typeOf = typeOf;\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isValidElementType = isValidElementType;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar extend = require('extend-shallow');\nvar safe = require('safe-regex');\n\n/**\n * The main export is a function that takes a `pattern` string and an `options` object.\n *\n * ```js\n & var not = require('regex-not');\n & console.log(not('foo'));\n & //=> /^(?:(?!^(?:foo)$).)*$/\n * ```\n *\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {RegExp} Converts the given `pattern` to a regex using the specified `options`.\n * @api public\n */\n\nfunction toRegex(pattern, options) {\n return new RegExp(toRegex.create(pattern, options));\n}\n\n/**\n * Create a regex-compatible string from the given `pattern` and `options`.\n *\n * ```js\n & var not = require('regex-not');\n & console.log(not.create('foo'));\n & //=> '^(?:(?!^(?:foo)$).)*$'\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\ntoRegex.create = function(pattern, options) {\n if (typeof pattern !== 'string') {\n throw new TypeError('expected a string');\n }\n\n var opts = extend({}, options);\n if (opts.contains === true) {\n opts.strictNegate = false;\n }\n\n var open = opts.strictOpen !== false ? '^' : '';\n var close = opts.strictClose !== false ? '$' : '';\n var endChar = opts.endChar ? opts.endChar : '+';\n var str = pattern;\n\n if (opts.strictNegate === false) {\n str = '(?:(?!(?:' + pattern + ')).)' + endChar;\n } else {\n str = '(?:(?!^(?:' + pattern + ')$).)' + endChar;\n }\n\n var res = open + str + close;\n if (opts.safe === true && safe(res) === false) {\n throw new Error('potentially unsafe regular expression: ' + res);\n }\n\n return res;\n};\n\n/**\n * Expose `toRegex`\n */\n\nmodule.exports = toRegex;\n","'use strict';\n\nvar isExtendable = require('is-extendable');\nvar assignSymbols = require('assign-symbols');\n\nmodule.exports = Object.assign || function(obj/*, objects*/) {\n if (obj === null || typeof obj === 'undefined') {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n if (!isObject(obj)) {\n obj = {};\n }\n for (var i = 1; i < arguments.length; i++) {\n var val = arguments[i];\n if (isString(val)) {\n val = toObject(val);\n }\n if (isObject(val)) {\n assign(obj, val);\n assignSymbols(obj, val);\n }\n }\n return obj;\n};\n\nfunction assign(a, b) {\n for (var key in b) {\n if (hasOwn(b, key)) {\n a[key] = b[key];\n }\n }\n}\n\nfunction isString(val) {\n return (val && typeof val === 'string');\n}\n\nfunction toObject(str) {\n var obj = {};\n for (var i in str) {\n obj[i] = str[i];\n }\n return obj;\n}\n\nfunction isObject(val) {\n return (val && typeof val === 'object') || isExtendable(val);\n}\n\n/**\n * Returns true if the given `key` is an own property of `obj`.\n */\n\nfunction hasOwn(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction isEnum(obj, key) {\n return Object.prototype.propertyIsEnumerable.call(obj, key);\n}\n","/*!\n * is-extendable <https://github.com/jonschlinkert/is-extendable>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isPlainObject = require('is-plain-object');\n\nmodule.exports = function isExtendable(val) {\n return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);\n};\n","/*!\n * repeat-element <https://github.com/jonschlinkert/repeat-element>\n *\n * Copyright (c) 2015-present, Jon Schlinkert.\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function repeat(ele, num) {\n var arr = new Array(num);\n\n for (var i = 0; i < num; i++) {\n arr[i] = ele;\n }\n\n return arr;\n};\n","/*!\n * repeat-string <https://github.com/jonschlinkert/repeat-string>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\n/**\n * Results cache\n */\n\nvar res = '';\nvar cache;\n\n/**\n * Expose `repeat`\n */\n\nmodule.exports = repeat;\n\n/**\n * Repeat the given `string` the specified `number`\n * of times.\n *\n * **Example:**\n *\n * ```js\n * var repeat = require('repeat-string');\n * repeat('A', 5);\n * //=> AAAAA\n * ```\n *\n * @param {String} `string` The string to repeat\n * @param {Number} `number` The number of times to repeat the string\n * @return {String} Repeated string\n * @api public\n */\n\nfunction repeat(str, num) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string');\n }\n\n // cover common, quick use cases\n if (num === 1) return str;\n if (num === 2) return str + str;\n\n var max = str.length * num;\n if (cache !== str || typeof cache === 'undefined') {\n cache = str;\n res = '';\n } else if (res.length >= max) {\n return res.substr(0, max);\n }\n\n while (max > res.length && num > 1) {\n if (num & 1) {\n res += str;\n }\n\n num >>= 1;\n str += str;\n }\n\n res += str;\n res = res.substr(0, max);\n return res;\n}\n","// Copyright 2014 Simon Lydell\r\n// X11 (“MIT”) Licensed. (See LICENSE.)\r\n\r\nvoid (function(root, factory) {\r\n if (typeof define === \"function\" && define.amd) {\r\n define(factory)\r\n } else if (typeof exports === \"object\") {\r\n module.exports = factory()\r\n } else {\r\n root.resolveUrl = factory()\r\n }\r\n}(this, function() {\r\n\r\n function resolveUrl(/* ...urls */) {\r\n var numUrls = arguments.length\r\n\r\n if (numUrls === 0) {\r\n throw new Error(\"resolveUrl requires at least one argument; got none.\")\r\n }\r\n\r\n var base = document.createElement(\"base\")\r\n base.href = arguments[0]\r\n\r\n if (numUrls === 1) {\r\n return base.href\r\n }\r\n\r\n var head = document.getElementsByTagName(\"head\")[0]\r\n head.insertBefore(base, head.firstChild)\r\n\r\n var a = document.createElement(\"a\")\r\n var resolved\r\n\r\n for (var index = 1; index < numUrls; index++) {\r\n a.href = arguments[index]\r\n resolved = a.href\r\n base.href = resolved\r\n }\r\n\r\n head.removeChild(base)\r\n\r\n return resolved\r\n }\r\n\r\n return resolveUrl\r\n\r\n}));\r\n","var util = require('./util');\nvar types = require('./types');\nvar sets = require('./sets');\nvar positions = require('./positions');\n\n\nmodule.exports = function(regexpStr) {\n var i = 0, l, c,\n start = { type: types.ROOT, stack: []},\n\n // Keep track of last clause/group and stack.\n lastGroup = start,\n last = start.stack,\n groupStack = [];\n\n\n var repeatErr = function(i) {\n util.error(regexpStr, 'Nothing to repeat at column ' + (i - 1));\n };\n\n // Decode a few escaped characters.\n var str = util.strToChars(regexpStr);\n l = str.length;\n\n // Iterate through each character in string.\n while (i < l) {\n c = str[i++];\n\n switch (c) {\n // Handle escaped characters, inclues a few sets.\n case '\\\\':\n c = str[i++];\n\n switch (c) {\n case 'b':\n last.push(positions.wordBoundary());\n break;\n\n case 'B':\n last.push(positions.nonWordBoundary());\n break;\n\n case 'w':\n last.push(sets.words());\n break;\n\n case 'W':\n last.push(sets.notWords());\n break;\n\n case 'd':\n last.push(sets.ints());\n break;\n\n case 'D':\n last.push(sets.notInts());\n break;\n\n case 's':\n last.push(sets.whitespace());\n break;\n\n case 'S':\n last.push(sets.notWhitespace());\n break;\n\n default:\n // Check if c is integer.\n // In which case it's a reference.\n if (/\\d/.test(c)) {\n last.push({ type: types.REFERENCE, value: parseInt(c, 10) });\n\n // Escaped character.\n } else {\n last.push({ type: types.CHAR, value: c.charCodeAt(0) });\n }\n }\n\n break;\n\n\n // Positionals.\n case '^':\n last.push(positions.begin());\n break;\n\n case '$':\n last.push(positions.end());\n break;\n\n\n // Handle custom sets.\n case '[':\n // Check if this class is 'anti' i.e. [^abc].\n var not;\n if (str[i] === '^') {\n not = true;\n i++;\n } else {\n not = false;\n }\n\n // Get all the characters in class.\n var classTokens = util.tokenizeClass(str.slice(i), regexpStr);\n\n // Increase index by length of class.\n i += classTokens[1];\n last.push({\n type: types.SET,\n set: classTokens[0],\n not: not,\n });\n\n break;\n\n\n // Class of any character except \\n.\n case '.':\n last.push(sets.anyChar());\n break;\n\n\n // Push group onto stack.\n case '(':\n // Create group.\n var group = {\n type: types.GROUP,\n stack: [],\n remember: true,\n };\n\n c = str[i];\n\n // If if this is a special kind of group.\n if (c === '?') {\n c = str[i + 1];\n i += 2;\n\n // Match if followed by.\n if (c === '=') {\n group.followedBy = true;\n\n // Match if not followed by.\n } else if (c === '!') {\n group.notFollowedBy = true;\n\n } else if (c !== ':') {\n util.error(regexpStr,\n 'Invalid group, character \\'' + c +\n '\\' after \\'?\\' at column ' + (i - 1));\n }\n\n group.remember = false;\n }\n\n // Insert subgroup into current group stack.\n last.push(group);\n\n // Remember the current group for when the group closes.\n groupStack.push(lastGroup);\n\n // Make this new group the current group.\n lastGroup = group;\n last = group.stack;\n break;\n\n\n // Pop group out of stack.\n case ')':\n if (groupStack.length === 0) {\n util.error(regexpStr, 'Unmatched ) at column ' + (i - 1));\n }\n lastGroup = groupStack.pop();\n\n // Check if this group has a PIPE.\n // To get back the correct last stack.\n last = lastGroup.options ?\n lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack;\n break;\n\n\n // Use pipe character to give more choices.\n case '|':\n // Create array where options are if this is the first PIPE\n // in this clause.\n if (!lastGroup.options) {\n lastGroup.options = [lastGroup.stack];\n delete lastGroup.stack;\n }\n\n // Create a new stack and add to options for rest of clause.\n var stack = [];\n lastGroup.options.push(stack);\n last = stack;\n break;\n\n\n // Repetition.\n // For every repetition, remove last element from last stack\n // then insert back a RANGE object.\n // This design is chosen because there could be more than\n // one repetition symbols in a regex i.e. `a?+{2,3}`.\n case '{':\n var rs = /^(\\d+)(,(\\d+)?)?\\}/.exec(str.slice(i)), min, max;\n if (rs !== null) {\n if (last.length === 0) {\n repeatErr(i);\n }\n min = parseInt(rs[1], 10);\n max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min;\n i += rs[0].length;\n\n last.push({\n type: types.REPETITION,\n min: min,\n max: max,\n value: last.pop(),\n });\n } else {\n last.push({\n type: types.CHAR,\n value: 123,\n });\n }\n break;\n\n case '?':\n if (last.length === 0) {\n repeatErr(i);\n }\n last.push({\n type: types.REPETITION,\n min: 0,\n max: 1,\n value: last.pop(),\n });\n break;\n\n case '+':\n if (last.length === 0) {\n repeatErr(i);\n }\n last.push({\n type: types.REPETITION,\n min: 1,\n max: Infinity,\n value: last.pop(),\n });\n break;\n\n case '*':\n if (last.length === 0) {\n repeatErr(i);\n }\n last.push({\n type: types.REPETITION,\n min: 0,\n max: Infinity,\n value: last.pop(),\n });\n break;\n\n\n // Default is a character that is not `\\[](){}?+*^$`.\n default:\n last.push({\n type: types.CHAR,\n value: c.charCodeAt(0),\n });\n }\n\n }\n\n // Check if any groups have not been closed.\n if (groupStack.length !== 0) {\n util.error(regexpStr, 'Unterminated group');\n }\n\n return start;\n};\n\nmodule.exports.types = types;\n","var types = require('./types');\n\nexports.wordBoundary = function() {\n return { type: types.POSITION, value: 'b' };\n};\n\nexports.nonWordBoundary = function() {\n return { type: types.POSITION, value: 'B' };\n};\n\nexports.begin = function() {\n return { type: types.POSITION, value: '^' };\n};\n\nexports.end = function() {\n return { type: types.POSITION, value: '$' };\n};\n","var types = require('./types');\n\nvar INTS = function() {\n return [{ type: types.RANGE , from: 48, to: 57 }];\n};\n\nvar WORDS = function() {\n return [\n { type: types.CHAR, value: 95 },\n { type: types.RANGE, from: 97, to: 122 },\n { type: types.RANGE, from: 65, to: 90 }\n ].concat(INTS());\n};\n\nvar WHITESPACE = function() {\n return [\n { type: types.CHAR, value: 9 },\n { type: types.CHAR, value: 10 },\n { type: types.CHAR, value: 11 },\n { type: types.CHAR, value: 12 },\n { type: types.CHAR, value: 13 },\n { type: types.CHAR, value: 32 },\n { type: types.CHAR, value: 160 },\n { type: types.CHAR, value: 5760 },\n { type: types.CHAR, value: 6158 },\n { type: types.CHAR, value: 8192 },\n { type: types.CHAR, value: 8193 },\n { type: types.CHAR, value: 8194 },\n { type: types.CHAR, value: 8195 },\n { type: types.CHAR, value: 8196 },\n { type: types.CHAR, value: 8197 },\n { type: types.CHAR, value: 8198 },\n { type: types.CHAR, value: 8199 },\n { type: types.CHAR, value: 8200 },\n { type: types.CHAR, value: 8201 },\n { type: types.CHAR, value: 8202 },\n { type: types.CHAR, value: 8232 },\n { type: types.CHAR, value: 8233 },\n { type: types.CHAR, value: 8239 },\n { type: types.CHAR, value: 8287 },\n { type: types.CHAR, value: 12288 },\n { type: types.CHAR, value: 65279 }\n ];\n};\n\nvar NOTANYCHAR = function() {\n return [\n { type: types.CHAR, value: 10 },\n { type: types.CHAR, value: 13 },\n { type: types.CHAR, value: 8232 },\n { type: types.CHAR, value: 8233 },\n ];\n};\n\n// Predefined class objects.\nexports.words = function() {\n return { type: types.SET, set: WORDS(), not: false };\n};\n\nexports.notWords = function() {\n return { type: types.SET, set: WORDS(), not: true };\n};\n\nexports.ints = function() {\n return { type: types.SET, set: INTS(), not: false };\n};\n\nexports.notInts = function() {\n return { type: types.SET, set: INTS(), not: true };\n};\n\nexports.whitespace = function() {\n return { type: types.SET, set: WHITESPACE(), not: false };\n};\n\nexports.notWhitespace = function() {\n return { type: types.SET, set: WHITESPACE(), not: true };\n};\n\nexports.anyChar = function() {\n return { type: types.SET, set: NOTANYCHAR(), not: true };\n};\n","module.exports = {\n ROOT : 0,\n GROUP : 1,\n POSITION : 2,\n SET : 3,\n RANGE : 4,\n REPETITION : 5,\n REFERENCE : 6,\n CHAR : 7,\n};\n","var types = require('./types');\nvar sets = require('./sets');\n\n\n// All of these are private and only used by randexp.\n// It's assumed that they will always be called with the correct input.\n\nvar CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^ ?';\nvar SLSH = { '0': 0, 't': 9, 'n': 10, 'v': 11, 'f': 12, 'r': 13 };\n\n/**\n * Finds character representations in str and convert all to\n * their respective characters\n *\n * @param {String} str\n * @return {String}\n */\nexports.strToChars = function(str) {\n /* jshint maxlen: false */\n var chars_regex = /(\\[\\\\b\\])|(\\\\)?\\\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\\[\\\\\\]\\^?])|([0tnvfr]))/g;\n str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) {\n if (lbs) {\n return s;\n }\n\n var code = b ? 8 :\n a16 ? parseInt(a16, 16) :\n b16 ? parseInt(b16, 16) :\n c8 ? parseInt(c8, 8) :\n dctrl ? CTRL.indexOf(dctrl) :\n SLSH[eslsh];\n\n var c = String.fromCharCode(code);\n\n // Escape special regex characters.\n if (/[\\[\\]{}\\^$.|?*+()]/.test(c)) {\n c = '\\\\' + c;\n }\n\n return c;\n });\n\n return str;\n};\n\n\n/**\n * turns class into tokens\n * reads str until it encounters a ] not preceeded by a \\\n *\n * @param {String} str\n * @param {String} regexpStr\n * @return {Array.<Array.<Object>, Number>}\n */\nexports.tokenizeClass = function(str, regexpStr) {\n /* jshint maxlen: false */\n var tokens = [];\n var regexp = /\\\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\\\)(.)|([^\\]\\\\]))-(?:\\\\)?([^\\]]))|(\\])|(?:\\\\)?(.)/g;\n var rs, c;\n\n\n while ((rs = regexp.exec(str)) != null) {\n if (rs[1]) {\n tokens.push(sets.words());\n\n } else if (rs[2]) {\n tokens.push(sets.ints());\n\n } else if (rs[3]) {\n tokens.push(sets.whitespace());\n\n } else if (rs[4]) {\n tokens.push(sets.notWords());\n\n } else if (rs[5]) {\n tokens.push(sets.notInts());\n\n } else if (rs[6]) {\n tokens.push(sets.notWhitespace());\n\n } else if (rs[7]) {\n tokens.push({\n type: types.RANGE,\n from: (rs[8] || rs[9]).charCodeAt(0),\n to: rs[10].charCodeAt(0),\n });\n\n } else if (c = rs[12]) {\n tokens.push({\n type: types.CHAR,\n value: c.charCodeAt(0),\n });\n\n } else {\n return [tokens, regexp.lastIndex];\n }\n }\n\n exports.error(regexpStr, 'Unterminated character class');\n};\n\n\n/**\n * Shortcut to throw errors.\n *\n * @param {String} regexp\n * @param {String} msg\n */\nexports.error = function(regexp, msg) {\n throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg);\n};\n","var parse = require('ret');\nvar types = parse.types;\n\nmodule.exports = function (re, opts) {\n if (!opts) opts = {};\n var replimit = opts.limit === undefined ? 25 : opts.limit;\n \n if (isRegExp(re)) re = re.source;\n else if (typeof re !== 'string') re = String(re);\n \n try { re = parse(re) }\n catch (err) { return false }\n \n var reps = 0;\n return (function walk (node, starHeight) {\n if (node.type === types.REPETITION) {\n starHeight ++;\n reps ++;\n if (starHeight > 1) return false;\n if (reps > replimit) return false;\n }\n \n if (node.options) {\n for (var i = 0, len = node.options.length; i < len; i++) {\n var ok = walk({ stack: node.options[i] }, starHeight);\n if (!ok) return false;\n }\n }\n var stack = node.stack || (node.value && node.value.stack);\n if (!stack) return true;\n \n for (var i = 0; i < stack.length; i++) {\n var ok = walk(stack[i], starHeight);\n if (!ok) return false;\n }\n \n return true;\n })(re, 0);\n};\n\nfunction isRegExp (x) {\n return {}.toString.call(x) === '[object RegExp]';\n}\n","/*!\n * set-value <https://github.com/jonschlinkert/set-value>\n *\n * Copyright (c) 2014-2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar split = require('split-string');\nvar extend = require('extend-shallow');\nvar isPlainObject = require('is-plain-object');\nvar isObject = require('is-extendable');\n\nmodule.exports = function(obj, prop, val) {\n if (!isObject(obj)) {\n return obj;\n }\n\n if (Array.isArray(prop)) {\n prop = [].concat.apply([], prop).join('.');\n }\n\n if (typeof prop !== 'string') {\n return obj;\n }\n\n var keys = split(prop, {sep: '.', brackets: true});\n var len = keys.length;\n var idx = -1;\n var current = obj;\n\n while (++idx < len) {\n var key = keys[idx];\n if (idx !== len - 1) {\n if (!isObject(current[key])) {\n current[key] = {};\n }\n current = current[key];\n continue;\n }\n\n if (isPlainObject(current[key]) && isPlainObject(val)) {\n current[key] = extend({}, current[key], val);\n } else {\n current[key] = val;\n }\n }\n\n return obj;\n};\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","'use strict';\nmodule.exports = input => {\n\tconst isExtendedLengthPath = /^\\\\\\\\\\?\\\\/.test(input);\n\tconst hasNonAscii = /[^\\u0000-\\u0080]+/.test(input); // eslint-disable-line no-control-regex\n\n\tif (isExtendedLengthPath || hasNonAscii) {\n\t\treturn input;\n\t}\n\n\treturn input.replace(/\\\\/g, '/');\n};\n","'use strict';\n\nvar isObject = require('isobject');\nvar define = require('define-property');\nvar utils = require('snapdragon-util');\nvar ownNames;\n\n/**\n * Create a new AST `Node` with the given `val` and `type`.\n *\n * ```js\n * var node = new Node('*', 'Star');\n * var node = new Node({type: 'star', val: '*'});\n * ```\n * @name Node\n * @param {String|Object} `val` Pass a matched substring, or an object to merge onto the node.\n * @param {String} `type` The node type to use when `val` is a string.\n * @return {Object} node instance\n * @api public\n */\n\nfunction Node(val, type, parent) {\n if (typeof type !== 'string') {\n parent = type;\n type = null;\n }\n\n define(this, 'parent', parent);\n define(this, 'isNode', true);\n define(this, 'expect', null);\n\n if (typeof type !== 'string' && isObject(val)) {\n lazyKeys();\n var keys = Object.keys(val);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (ownNames.indexOf(key) === -1) {\n this[key] = val[key];\n }\n }\n } else {\n this.type = type;\n this.val = val;\n }\n}\n\n/**\n * Returns true if the given value is a node.\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var node = new Node({type: 'foo'});\n * console.log(Node.isNode(node)); //=> true\n * console.log(Node.isNode({})); //=> false\n * ```\n * @param {Object} `node`\n * @returns {Boolean}\n * @api public\n */\n\nNode.isNode = function(node) {\n return utils.isNode(node);\n};\n\n/**\n * Define a non-enumberable property on the node instance.\n * Useful for adding properties that shouldn't be extended\n * or visible during debugging.\n *\n * ```js\n * var node = new Node();\n * node.define('foo', 'something non-enumerable');\n * ```\n * @param {String} `name`\n * @param {any} `val`\n * @return {Object} returns the node instance\n * @api public\n */\n\nNode.prototype.define = function(name, val) {\n define(this, name, val);\n return this;\n};\n\n/**\n * Returns true if `node.val` is an empty string, or `node.nodes` does\n * not contain any non-empty text nodes.\n *\n * ```js\n * var node = new Node({type: 'text'});\n * node.isEmpty(); //=> true\n * node.val = 'foo';\n * node.isEmpty(); //=> false\n * ```\n * @param {Function} `fn` (optional) Filter function that is called on `node` and/or child nodes. `isEmpty` will return false immediately when the filter function returns false on any nodes.\n * @return {Boolean}\n * @api public\n */\n\nNode.prototype.isEmpty = function(fn) {\n return utils.isEmpty(this, fn);\n};\n\n/**\n * Given node `foo` and node `bar`, push node `bar` onto `foo.nodes`, and\n * set `foo` as `bar.parent`.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * foo.push(bar);\n * ```\n * @param {Object} `node`\n * @return {Number} Returns the length of `node.nodes`\n * @api public\n */\n\nNode.prototype.push = function(node) {\n assert(Node.isNode(node), 'expected node to be an instance of Node');\n define(node, 'parent', this);\n\n this.nodes = this.nodes || [];\n return this.nodes.push(node);\n};\n\n/**\n * Given node `foo` and node `bar`, unshift node `bar` onto `foo.nodes`, and\n * set `foo` as `bar.parent`.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * foo.unshift(bar);\n * ```\n * @param {Object} `node`\n * @return {Number} Returns the length of `node.nodes`\n * @api public\n */\n\nNode.prototype.unshift = function(node) {\n assert(Node.isNode(node), 'expected node to be an instance of Node');\n define(node, 'parent', this);\n\n this.nodes = this.nodes || [];\n return this.nodes.unshift(node);\n};\n\n/**\n * Pop a node from `node.nodes`.\n *\n * ```js\n * var node = new Node({type: 'foo'});\n * node.push(new Node({type: 'a'}));\n * node.push(new Node({type: 'b'}));\n * node.push(new Node({type: 'c'}));\n * node.push(new Node({type: 'd'}));\n * console.log(node.nodes.length);\n * //=> 4\n * node.pop();\n * console.log(node.nodes.length);\n * //=> 3\n * ```\n * @return {Number} Returns the popped `node`\n * @api public\n */\n\nNode.prototype.pop = function() {\n return this.nodes && this.nodes.pop();\n};\n\n/**\n * Shift a node from `node.nodes`.\n *\n * ```js\n * var node = new Node({type: 'foo'});\n * node.push(new Node({type: 'a'}));\n * node.push(new Node({type: 'b'}));\n * node.push(new Node({type: 'c'}));\n * node.push(new Node({type: 'd'}));\n * console.log(node.nodes.length);\n * //=> 4\n * node.shift();\n * console.log(node.nodes.length);\n * //=> 3\n * ```\n * @return {Object} Returns the shifted `node`\n * @api public\n */\n\nNode.prototype.shift = function() {\n return this.nodes && this.nodes.shift();\n};\n\n/**\n * Remove `node` from `node.nodes`.\n *\n * ```js\n * node.remove(childNode);\n * ```\n * @param {Object} `node`\n * @return {Object} Returns the removed node.\n * @api public\n */\n\nNode.prototype.remove = function(node) {\n assert(Node.isNode(node), 'expected node to be an instance of Node');\n this.nodes = this.nodes || [];\n var idx = node.index;\n if (idx !== -1) {\n node.index = -1;\n return this.nodes.splice(idx, 1);\n }\n return null;\n};\n\n/**\n * Get the first child node from `node.nodes` that matches the given `type`.\n * If `type` is a number, the child node at that index is returned.\n *\n * ```js\n * var child = node.find(1); //<= index of the node to get\n * var child = node.find('foo'); //<= node.type of a child node\n * var child = node.find(/^(foo|bar)$/); //<= regex to match node.type\n * var child = node.find(['foo', 'bar']); //<= array of node.type(s)\n * ```\n * @param {String} `type`\n * @return {Object} Returns a child node or undefined.\n * @api public\n */\n\nNode.prototype.find = function(type) {\n return utils.findNode(this.nodes, type);\n};\n\n/**\n * Return true if the node is the given `type`.\n *\n * ```js\n * var node = new Node({type: 'bar'});\n * cosole.log(node.isType('foo')); // false\n * cosole.log(node.isType(/^(foo|bar)$/)); // true\n * cosole.log(node.isType(['foo', 'bar'])); // true\n * ```\n * @param {String} `type`\n * @return {Boolean}\n * @api public\n */\n\nNode.prototype.isType = function(type) {\n return utils.isType(this, type);\n};\n\n/**\n * Return true if the `node.nodes` has the given `type`.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * foo.push(bar);\n *\n * cosole.log(foo.hasType('qux')); // false\n * cosole.log(foo.hasType(/^(qux|bar)$/)); // true\n * cosole.log(foo.hasType(['qux', 'bar'])); // true\n * ```\n * @param {String} `type`\n * @return {Boolean}\n * @api public\n */\n\nNode.prototype.hasType = function(type) {\n return utils.hasType(this, type);\n};\n\n/**\n * Get the siblings array, or `null` if it doesn't exist.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * var baz = new Node({type: 'baz'});\n * foo.push(bar);\n * foo.push(baz);\n *\n * console.log(bar.siblings.length) // 2\n * console.log(baz.siblings.length) // 2\n * ```\n * @return {Array}\n * @api public\n */\n\nObject.defineProperty(Node.prototype, 'siblings', {\n set: function() {\n throw new Error('node.siblings is a getter and cannot be defined');\n },\n get: function() {\n return this.parent ? this.parent.nodes : null;\n }\n});\n\n/**\n * Get the node's current index from `node.parent.nodes`.\n * This should always be correct, even when the parent adds nodes.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * var baz = new Node({type: 'baz'});\n * var qux = new Node({type: 'qux'});\n * foo.push(bar);\n * foo.push(baz);\n * foo.unshift(qux);\n *\n * console.log(bar.index) // 1\n * console.log(baz.index) // 2\n * console.log(qux.index) // 0\n * ```\n * @return {Number}\n * @api public\n */\n\nObject.defineProperty(Node.prototype, 'index', {\n set: function(index) {\n define(this, 'idx', index);\n },\n get: function() {\n if (!Array.isArray(this.siblings)) {\n return -1;\n }\n var tok = this.idx !== -1 ? this.siblings[this.idx] : null;\n if (tok !== this) {\n this.idx = this.siblings.indexOf(this);\n }\n return this.idx;\n }\n});\n\n/**\n * Get the previous node from the siblings array or `null`.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * var baz = new Node({type: 'baz'});\n * foo.push(bar);\n * foo.push(baz);\n *\n * console.log(baz.prev.type) // 'bar'\n * ```\n * @return {Object}\n * @api public\n */\n\nObject.defineProperty(Node.prototype, 'prev', {\n set: function() {\n throw new Error('node.prev is a getter and cannot be defined');\n },\n get: function() {\n if (Array.isArray(this.siblings)) {\n return this.siblings[this.index - 1] || this.parent.prev;\n }\n return null;\n }\n});\n\n/**\n * Get the siblings array, or `null` if it doesn't exist.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * var baz = new Node({type: 'baz'});\n * foo.push(bar);\n * foo.push(baz);\n *\n * console.log(bar.siblings.length) // 2\n * console.log(baz.siblings.length) // 2\n * ```\n * @return {Object}\n * @api public\n */\n\nObject.defineProperty(Node.prototype, 'next', {\n set: function() {\n throw new Error('node.next is a getter and cannot be defined');\n },\n get: function() {\n if (Array.isArray(this.siblings)) {\n return this.siblings[this.index + 1] || this.parent.next;\n }\n return null;\n }\n});\n\n/**\n * Get the first node from `node.nodes`.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * var baz = new Node({type: 'baz'});\n * var qux = new Node({type: 'qux'});\n * foo.push(bar);\n * foo.push(baz);\n * foo.push(qux);\n *\n * console.log(foo.first.type) // 'bar'\n * ```\n * @return {Object} The first node, or undefiend\n * @api public\n */\n\nObject.defineProperty(Node.prototype, 'first', {\n get: function() {\n return this.nodes ? this.nodes[0] : null;\n }\n});\n\n/**\n * Get the last node from `node.nodes`.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * var baz = new Node({type: 'baz'});\n * var qux = new Node({type: 'qux'});\n * foo.push(bar);\n * foo.push(baz);\n * foo.push(qux);\n *\n * console.log(foo.last.type) // 'qux'\n * ```\n * @return {Object} The last node, or undefiend\n * @api public\n */\n\nObject.defineProperty(Node.prototype, 'last', {\n get: function() {\n return this.nodes ? utils.last(this.nodes) : null;\n }\n});\n\n/**\n * Get the last node from `node.nodes`.\n *\n * ```js\n * var foo = new Node({type: 'foo'});\n * var bar = new Node({type: 'bar'});\n * var baz = new Node({type: 'baz'});\n * var qux = new Node({type: 'qux'});\n * foo.push(bar);\n * foo.push(baz);\n * foo.push(qux);\n *\n * console.log(foo.last.type) // 'qux'\n * ```\n * @return {Object} The last node, or undefiend\n * @api public\n */\n\nObject.defineProperty(Node.prototype, 'scope', {\n get: function() {\n if (this.isScope !== true) {\n return this.parent ? this.parent.scope : this;\n }\n return this;\n }\n});\n\n/**\n * Get own property names from Node prototype, but only the\n * first time `Node` is instantiated\n */\n\nfunction lazyKeys() {\n if (!ownNames) {\n ownNames = Object.getOwnPropertyNames(Node.prototype);\n }\n}\n\n/**\n * Simplified assertion. Throws an error is `val` is falsey.\n */\n\nfunction assert(val, message) {\n if (!val) throw new Error(message);\n}\n\n/**\n * Expose `Node`\n */\n\nexports = module.exports = Node;\n","/*!\n * define-property <https://github.com/jonschlinkert/define-property>\n *\n * Copyright (c) 2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isDescriptor = require('is-descriptor');\n\nmodule.exports = function defineProperty(obj, prop, val) {\n if (typeof obj !== 'object' && typeof obj !== 'function') {\n throw new TypeError('expected an object or function.');\n }\n\n if (typeof prop !== 'string') {\n throw new TypeError('expected `prop` to be a string.');\n }\n\n if (isDescriptor(val) && ('set' in val || 'get' in val)) {\n return Object.defineProperty(obj, prop, val);\n }\n\n return Object.defineProperty(obj, prop, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: val\n });\n};\n","'use strict';\n\nvar typeOf = require('kind-of');\nvar utils = module.exports;\n\n/**\n * Returns true if the given value is a node.\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var node = new Node({type: 'foo'});\n * console.log(utils.isNode(node)); //=> true\n * console.log(utils.isNode({})); //=> false\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @returns {Boolean}\n * @api public\n */\n\nutils.isNode = function(node) {\n return typeOf(node) === 'object' && node.isNode === true;\n};\n\n/**\n * Emit an empty string for the given `node`.\n *\n * ```js\n * // do nothing for beginning-of-string\n * snapdragon.compiler.set('bos', utils.noop);\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @returns {undefined}\n * @api public\n */\n\nutils.noop = function(node) {\n append(this, '', node);\n};\n\n/**\n * Appdend `node.val` to `compiler.output`, exactly as it was created\n * by the parser.\n *\n * ```js\n * snapdragon.compiler.set('text', utils.identity);\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @returns {undefined}\n * @api public\n */\n\nutils.identity = function(node) {\n append(this, node.val, node);\n};\n\n/**\n * Previously named `.emit`, this method appends the given `val`\n * to `compiler.output` for the given node. Useful when you know\n * what value should be appended advance, regardless of the actual\n * value of `node.val`.\n *\n * ```js\n * snapdragon.compiler\n * .set('i', function(node) {\n * this.mapVisit(node);\n * })\n * .set('i.open', utils.append('<i>'))\n * .set('i.close', utils.append('</i>'))\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @returns {Function} Returns a compiler middleware function.\n * @api public\n */\n\nutils.append = function(val) {\n return function(node) {\n append(this, val, node);\n };\n};\n\n/**\n * Used in compiler middleware, this onverts an AST node into\n * an empty `text` node and deletes `node.nodes` if it exists.\n * The advantage of this method is that, as opposed to completely\n * removing the node, indices will not need to be re-calculated\n * in sibling nodes, and nothing is appended to the output.\n *\n * ```js\n * utils.toNoop(node);\n * // convert `node.nodes` to the given value instead of deleting it\n * utils.toNoop(node, []);\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {Array} `nodes` Optionally pass a new `nodes` value, to replace the existing `node.nodes` array.\n * @api public\n */\n\nutils.toNoop = function(node, nodes) {\n if (nodes) {\n node.nodes = nodes;\n } else {\n delete node.nodes;\n node.type = 'text';\n node.val = '';\n }\n};\n\n/**\n * Visit `node` with the given `fn`. The built-in `.visit` method in snapdragon\n * automatically calls registered compilers, this allows you to pass a visitor\n * function.\n *\n * ```js\n * snapdragon.compiler.set('i', function(node) {\n * utils.visit(node, function(childNode) {\n * // do stuff with \"childNode\"\n * return childNode;\n * });\n * });\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {Function} `fn`\n * @return {Object} returns the node after recursively visiting all child nodes.\n * @api public\n */\n\nutils.visit = function(node, fn) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n assert(isFunction(fn), 'expected a visitor function');\n fn(node);\n return node.nodes ? utils.mapVisit(node, fn) : node;\n};\n\n/**\n * Map [visit](#visit) the given `fn` over `node.nodes`. This is called by\n * [visit](#visit), use this method if you do not want `fn` to be called on\n * the first node.\n *\n * ```js\n * snapdragon.compiler.set('i', function(node) {\n * utils.mapVisit(node, function(childNode) {\n * // do stuff with \"childNode\"\n * return childNode;\n * });\n * });\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {Object} `options`\n * @param {Function} `fn`\n * @return {Object} returns the node\n * @api public\n */\n\nutils.mapVisit = function(node, fn) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n assert(isArray(node.nodes), 'expected node.nodes to be an array');\n assert(isFunction(fn), 'expected a visitor function');\n\n for (var i = 0; i < node.nodes.length; i++) {\n utils.visit(node.nodes[i], fn);\n }\n return node;\n};\n\n/**\n * Unshift an `*.open` node onto `node.nodes`.\n *\n * ```js\n * var Node = require('snapdragon-node');\n * snapdragon.parser.set('brace', function(node) {\n * var match = this.match(/^{/);\n * if (match) {\n * var parent = new Node({type: 'brace'});\n * utils.addOpen(parent, Node);\n * console.log(parent.nodes[0]):\n * // { type: 'brace.open', val: '' };\n *\n * // push the parent \"brace\" node onto the stack\n * this.push(parent);\n *\n * // return the parent node, so it's also added to the AST\n * return brace;\n * }\n * });\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][].\n * @param {Function} `filter` Optionaly specify a filter function to exclude the node.\n * @return {Object} Returns the created opening node.\n * @api public\n */\n\nutils.addOpen = function(node, Node, val, filter) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n assert(isFunction(Node), 'expected Node to be a constructor function');\n\n if (typeof val === 'function') {\n filter = val;\n val = '';\n }\n\n if (typeof filter === 'function' && !filter(node)) return;\n var open = new Node({ type: node.type + '.open', val: val});\n var unshift = node.unshift || node.unshiftNode;\n if (typeof unshift === 'function') {\n unshift.call(node, open);\n } else {\n utils.unshiftNode(node, open);\n }\n return open;\n};\n\n/**\n * Push a `*.close` node onto `node.nodes`.\n *\n * ```js\n * var Node = require('snapdragon-node');\n * snapdragon.parser.set('brace', function(node) {\n * var match = this.match(/^}/);\n * if (match) {\n * var parent = this.parent();\n * if (parent.type !== 'brace') {\n * throw new Error('missing opening: ' + '}');\n * }\n *\n * utils.addClose(parent, Node);\n * console.log(parent.nodes[parent.nodes.length - 1]):\n * // { type: 'brace.close', val: '' };\n *\n * // no need to return a node, since the parent\n * // was already added to the AST\n * return;\n * }\n * });\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][].\n * @param {Function} `filter` Optionaly specify a filter function to exclude the node.\n * @return {Object} Returns the created closing node.\n * @api public\n */\n\nutils.addClose = function(node, Node, val, filter) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n assert(isFunction(Node), 'expected Node to be a constructor function');\n\n if (typeof val === 'function') {\n filter = val;\n val = '';\n }\n\n if (typeof filter === 'function' && !filter(node)) return;\n var close = new Node({ type: node.type + '.close', val: val});\n var push = node.push || node.pushNode;\n if (typeof push === 'function') {\n push.call(node, close);\n } else {\n utils.pushNode(node, close);\n }\n return close;\n};\n\n/**\n * Wraps the given `node` with `*.open` and `*.close` nodes.\n *\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {Function} `Node` (required) Node constructor function from [snapdragon-node][].\n * @param {Function} `filter` Optionaly specify a filter function to exclude the node.\n * @return {Object} Returns the node\n * @api public\n */\n\nutils.wrapNodes = function(node, Node, filter) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n assert(isFunction(Node), 'expected Node to be a constructor function');\n\n utils.addOpen(node, Node, filter);\n utils.addClose(node, Node, filter);\n return node;\n};\n\n/**\n * Push the given `node` onto `parent.nodes`, and set `parent` as `node.parent.\n *\n * ```js\n * var parent = new Node({type: 'foo'});\n * var node = new Node({type: 'bar'});\n * utils.pushNode(parent, node);\n * console.log(parent.nodes[0].type) // 'bar'\n * console.log(node.parent.type) // 'foo'\n * ```\n * @param {Object} `parent`\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Object} Returns the child node\n * @api public\n */\n\nutils.pushNode = function(parent, node) {\n assert(utils.isNode(parent), 'expected parent node to be an instance of Node');\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n\n node.define('parent', parent);\n parent.nodes = parent.nodes || [];\n parent.nodes.push(node);\n return node;\n};\n\n/**\n * Unshift `node` onto `parent.nodes`, and set `parent` as `node.parent.\n *\n * ```js\n * var parent = new Node({type: 'foo'});\n * var node = new Node({type: 'bar'});\n * utils.unshiftNode(parent, node);\n * console.log(parent.nodes[0].type) // 'bar'\n * console.log(node.parent.type) // 'foo'\n * ```\n * @param {Object} `parent`\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {undefined}\n * @api public\n */\n\nutils.unshiftNode = function(parent, node) {\n assert(utils.isNode(parent), 'expected parent node to be an instance of Node');\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n\n node.define('parent', parent);\n parent.nodes = parent.nodes || [];\n parent.nodes.unshift(node);\n};\n\n/**\n * Pop the last `node` off of `parent.nodes`. The advantage of\n * using this method is that it checks for `node.nodes` and works\n * with any version of `snapdragon-node`.\n *\n * ```js\n * var parent = new Node({type: 'foo'});\n * utils.pushNode(parent, new Node({type: 'foo'}));\n * utils.pushNode(parent, new Node({type: 'bar'}));\n * utils.pushNode(parent, new Node({type: 'baz'}));\n * console.log(parent.nodes.length); //=> 3\n * utils.popNode(parent);\n * console.log(parent.nodes.length); //=> 2\n * ```\n * @param {Object} `parent`\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Number|Undefined} Returns the length of `node.nodes` or undefined.\n * @api public\n */\n\nutils.popNode = function(node) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n if (typeof node.pop === 'function') {\n return node.pop();\n }\n return node.nodes && node.nodes.pop();\n};\n\n/**\n * Shift the first `node` off of `parent.nodes`. The advantage of\n * using this method is that it checks for `node.nodes` and works\n * with any version of `snapdragon-node`.\n *\n * ```js\n * var parent = new Node({type: 'foo'});\n * utils.pushNode(parent, new Node({type: 'foo'}));\n * utils.pushNode(parent, new Node({type: 'bar'}));\n * utils.pushNode(parent, new Node({type: 'baz'}));\n * console.log(parent.nodes.length); //=> 3\n * utils.shiftNode(parent);\n * console.log(parent.nodes.length); //=> 2\n * ```\n * @param {Object} `parent`\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Number|Undefined} Returns the length of `node.nodes` or undefined.\n * @api public\n */\n\nutils.shiftNode = function(node) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n if (typeof node.shift === 'function') {\n return node.shift();\n }\n return node.nodes && node.nodes.shift();\n};\n\n/**\n * Remove the specified `node` from `parent.nodes`.\n *\n * ```js\n * var parent = new Node({type: 'abc'});\n * var foo = new Node({type: 'foo'});\n * utils.pushNode(parent, foo);\n * utils.pushNode(parent, new Node({type: 'bar'}));\n * utils.pushNode(parent, new Node({type: 'baz'}));\n * console.log(parent.nodes.length); //=> 3\n * utils.removeNode(parent, foo);\n * console.log(parent.nodes.length); //=> 2\n * ```\n * @param {Object} `parent`\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Object|undefined} Returns the removed node, if successful, or undefined if it does not exist on `parent.nodes`.\n * @api public\n */\n\nutils.removeNode = function(parent, node) {\n assert(utils.isNode(parent), 'expected parent.node to be an instance of Node');\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n\n if (!parent.nodes) {\n return null;\n }\n\n if (typeof parent.remove === 'function') {\n return parent.remove(node);\n }\n\n var idx = parent.nodes.indexOf(node);\n if (idx !== -1) {\n return parent.nodes.splice(idx, 1);\n }\n};\n\n/**\n * Returns true if `node.type` matches the given `type`. Throws a\n * `TypeError` if `node` is not an instance of `Node`.\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var node = new Node({type: 'foo'});\n * console.log(utils.isType(node, 'foo')); // false\n * console.log(utils.isType(node, 'bar')); // true\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {String} `type`\n * @return {Boolean}\n * @api public\n */\n\nutils.isType = function(node, type) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n switch (typeOf(type)) {\n case 'array':\n var types = type.slice();\n for (var i = 0; i < types.length; i++) {\n if (utils.isType(node, types[i])) {\n return true;\n }\n }\n return false;\n case 'string':\n return node.type === type;\n case 'regexp':\n return type.test(node.type);\n default: {\n throw new TypeError('expected \"type\" to be an array, string or regexp');\n }\n }\n};\n\n/**\n * Returns true if the given `node` has the given `type` in `node.nodes`.\n * Throws a `TypeError` if `node` is not an instance of `Node`.\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var node = new Node({\n * type: 'foo',\n * nodes: [\n * new Node({type: 'bar'}),\n * new Node({type: 'baz'})\n * ]\n * });\n * console.log(utils.hasType(node, 'xyz')); // false\n * console.log(utils.hasType(node, 'baz')); // true\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {String} `type`\n * @return {Boolean}\n * @api public\n */\n\nutils.hasType = function(node, type) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n if (!Array.isArray(node.nodes)) return false;\n for (var i = 0; i < node.nodes.length; i++) {\n if (utils.isType(node.nodes[i], type)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Returns the first node from `node.nodes` of the given `type`\n *\n * ```js\n * var node = new Node({\n * type: 'foo',\n * nodes: [\n * new Node({type: 'text', val: 'abc'}),\n * new Node({type: 'text', val: 'xyz'})\n * ]\n * });\n *\n * var textNode = utils.firstOfType(node.nodes, 'text');\n * console.log(textNode.val);\n * //=> 'abc'\n * ```\n * @param {Array} `nodes`\n * @param {String} `type`\n * @return {Object|undefined} Returns the first matching node or undefined.\n * @api public\n */\n\nutils.firstOfType = function(nodes, type) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if (utils.isType(node, type)) {\n return node;\n }\n }\n};\n\n/**\n * Returns the node at the specified index, or the first node of the\n * given `type` from `node.nodes`.\n *\n * ```js\n * var node = new Node({\n * type: 'foo',\n * nodes: [\n * new Node({type: 'text', val: 'abc'}),\n * new Node({type: 'text', val: 'xyz'})\n * ]\n * });\n *\n * var nodeOne = utils.findNode(node.nodes, 'text');\n * console.log(nodeOne.val);\n * //=> 'abc'\n *\n * var nodeTwo = utils.findNode(node.nodes, 1);\n * console.log(nodeTwo.val);\n * //=> 'xyz'\n * ```\n *\n * @param {Array} `nodes`\n * @param {String|Number} `type` Node type or index.\n * @return {Object} Returns a node or undefined.\n * @api public\n */\n\nutils.findNode = function(nodes, type) {\n if (!Array.isArray(nodes)) {\n return null;\n }\n if (typeof type === 'number') {\n return nodes[type];\n }\n return utils.firstOfType(nodes, type);\n};\n\n/**\n * Returns true if the given node is an \"*.open\" node.\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var brace = new Node({type: 'brace'});\n * var open = new Node({type: 'brace.open'});\n * var close = new Node({type: 'brace.close'});\n *\n * console.log(utils.isOpen(brace)); // false\n * console.log(utils.isOpen(open)); // true\n * console.log(utils.isOpen(close)); // false\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Boolean}\n * @api public\n */\n\nutils.isOpen = function(node) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n return node.type.slice(-5) === '.open';\n};\n\n/**\n * Returns true if the given node is a \"*.close\" node.\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var brace = new Node({type: 'brace'});\n * var open = new Node({type: 'brace.open'});\n * var close = new Node({type: 'brace.close'});\n *\n * console.log(utils.isClose(brace)); // false\n * console.log(utils.isClose(open)); // false\n * console.log(utils.isClose(close)); // true\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Boolean}\n * @api public\n */\n\nutils.isClose = function(node) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n return node.type.slice(-6) === '.close';\n};\n\n/**\n * Returns true if `node.nodes` **has** an `.open` node\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var brace = new Node({\n * type: 'brace',\n * nodes: []\n * });\n *\n * var open = new Node({type: 'brace.open'});\n * console.log(utils.hasOpen(brace)); // false\n *\n * brace.pushNode(open);\n * console.log(utils.hasOpen(brace)); // true\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Boolean}\n * @api public\n */\n\nutils.hasOpen = function(node) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n var first = node.first || node.nodes ? node.nodes[0] : null;\n if (utils.isNode(first)) {\n return first.type === node.type + '.open';\n }\n return false;\n};\n\n/**\n * Returns true if `node.nodes` **has** a `.close` node\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var brace = new Node({\n * type: 'brace',\n * nodes: []\n * });\n *\n * var close = new Node({type: 'brace.close'});\n * console.log(utils.hasClose(brace)); // false\n *\n * brace.pushNode(close);\n * console.log(utils.hasClose(brace)); // true\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Boolean}\n * @api public\n */\n\nutils.hasClose = function(node) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n var last = node.last || node.nodes ? node.nodes[node.nodes.length - 1] : null;\n if (utils.isNode(last)) {\n return last.type === node.type + '.close';\n }\n return false;\n};\n\n/**\n * Returns true if `node.nodes` has both `.open` and `.close` nodes\n *\n * ```js\n * var Node = require('snapdragon-node');\n * var brace = new Node({\n * type: 'brace',\n * nodes: []\n * });\n *\n * var open = new Node({type: 'brace.open'});\n * var close = new Node({type: 'brace.close'});\n * console.log(utils.hasOpen(brace)); // false\n * console.log(utils.hasClose(brace)); // false\n *\n * brace.pushNode(open);\n * brace.pushNode(close);\n * console.log(utils.hasOpen(brace)); // true\n * console.log(utils.hasClose(brace)); // true\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Boolean}\n * @api public\n */\n\nutils.hasOpenAndClose = function(node) {\n return utils.hasOpen(node) && utils.hasClose(node);\n};\n\n/**\n * Push the given `node` onto the `state.inside` array for the\n * given type. This array is used as a specialized \"stack\" for\n * only the given `node.type`.\n *\n * ```js\n * var state = { inside: {}};\n * var node = new Node({type: 'brace'});\n * utils.addType(state, node);\n * console.log(state.inside);\n * //=> { brace: [{type: 'brace'}] }\n * ```\n * @param {Object} `state` The `compiler.state` object or custom state object.\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Array} Returns the `state.inside` stack for the given type.\n * @api public\n */\n\nutils.addType = function(state, node) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n assert(isObject(state), 'expected state to be an object');\n\n var type = node.parent\n ? node.parent.type\n : node.type.replace(/\\.open$/, '');\n\n if (!state.hasOwnProperty('inside')) {\n state.inside = {};\n }\n if (!state.inside.hasOwnProperty(type)) {\n state.inside[type] = [];\n }\n\n var arr = state.inside[type];\n arr.push(node);\n return arr;\n};\n\n/**\n * Remove the given `node` from the `state.inside` array for the\n * given type. This array is used as a specialized \"stack\" for\n * only the given `node.type`.\n *\n * ```js\n * var state = { inside: {}};\n * var node = new Node({type: 'brace'});\n * utils.addType(state, node);\n * console.log(state.inside);\n * //=> { brace: [{type: 'brace'}] }\n * utils.removeType(state, node);\n * //=> { brace: [] }\n * ```\n * @param {Object} `state` The `compiler.state` object or custom state object.\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @return {Array} Returns the `state.inside` stack for the given type.\n * @api public\n */\n\nutils.removeType = function(state, node) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n assert(isObject(state), 'expected state to be an object');\n\n var type = node.parent\n ? node.parent.type\n : node.type.replace(/\\.close$/, '');\n\n if (state.inside.hasOwnProperty(type)) {\n return state.inside[type].pop();\n }\n};\n\n/**\n * Returns true if `node.val` is an empty string, or `node.nodes` does\n * not contain any non-empty text nodes.\n *\n * ```js\n * var node = new Node({type: 'text'});\n * utils.isEmpty(node); //=> true\n * node.val = 'foo';\n * utils.isEmpty(node); //=> false\n * ```\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {Function} `fn`\n * @return {Boolean}\n * @api public\n */\n\nutils.isEmpty = function(node, fn) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n\n if (!Array.isArray(node.nodes)) {\n if (node.type !== 'text') {\n return true;\n }\n if (typeof fn === 'function') {\n return fn(node, node.parent);\n }\n return !utils.trim(node.val);\n }\n\n for (var i = 0; i < node.nodes.length; i++) {\n var child = node.nodes[i];\n if (utils.isOpen(child) || utils.isClose(child)) {\n continue;\n }\n if (!utils.isEmpty(child, fn)) {\n return false;\n }\n }\n\n return true;\n};\n\n/**\n * Returns true if the `state.inside` stack for the given type exists\n * and has one or more nodes on it.\n *\n * ```js\n * var state = { inside: {}};\n * var node = new Node({type: 'brace'});\n * console.log(utils.isInsideType(state, 'brace')); //=> false\n * utils.addType(state, node);\n * console.log(utils.isInsideType(state, 'brace')); //=> true\n * utils.removeType(state, node);\n * console.log(utils.isInsideType(state, 'brace')); //=> false\n * ```\n * @param {Object} `state`\n * @param {String} `type`\n * @return {Boolean}\n * @api public\n */\n\nutils.isInsideType = function(state, type) {\n assert(isObject(state), 'expected state to be an object');\n assert(isString(type), 'expected type to be a string');\n\n if (!state.hasOwnProperty('inside')) {\n return false;\n }\n\n if (!state.inside.hasOwnProperty(type)) {\n return false;\n }\n\n return state.inside[type].length > 0;\n};\n\n/**\n * Returns true if `node` is either a child or grand-child of the given `type`,\n * or `state.inside[type]` is a non-empty array.\n *\n * ```js\n * var state = { inside: {}};\n * var node = new Node({type: 'brace'});\n * var open = new Node({type: 'brace.open'});\n * console.log(utils.isInside(state, open, 'brace')); //=> false\n * utils.pushNode(node, open);\n * console.log(utils.isInside(state, open, 'brace')); //=> true\n * ```\n * @param {Object} `state` Either the `compiler.state` object, if it exists, or a user-supplied state object.\n * @param {Object} `node` Instance of [snapdragon-node][]\n * @param {String} `type` The `node.type` to check for.\n * @return {Boolean}\n * @api public\n */\n\nutils.isInside = function(state, node, type) {\n assert(utils.isNode(node), 'expected node to be an instance of Node');\n assert(isObject(state), 'expected state to be an object');\n\n if (Array.isArray(type)) {\n for (var i = 0; i < type.length; i++) {\n if (utils.isInside(state, node, type[i])) {\n return true;\n }\n }\n return false;\n }\n\n var parent = node.parent;\n if (typeof type === 'string') {\n return (parent && parent.type === type) || utils.isInsideType(state, type);\n }\n\n if (typeOf(type) === 'regexp') {\n if (parent && parent.type && type.test(parent.type)) {\n return true;\n }\n\n var keys = Object.keys(state.inside);\n var len = keys.length;\n var idx = -1;\n while (++idx < len) {\n var key = keys[idx];\n var val = state.inside[key];\n\n if (Array.isArray(val) && val.length !== 0 && type.test(key)) {\n return true;\n }\n }\n }\n return false;\n};\n\n/**\n * Get the last `n` element from the given `array`. Used for getting\n * a node from `node.nodes.`\n *\n * @param {Array} `array`\n * @param {Number} `n`\n * @return {undefined}\n * @api public\n */\n\nutils.last = function(arr, n) {\n return arr[arr.length - (n || 1)];\n};\n\n/**\n * Cast the given `val` to an array.\n *\n * ```js\n * console.log(utils.arrayify(''));\n * //=> []\n * console.log(utils.arrayify('foo'));\n * //=> ['foo']\n * console.log(utils.arrayify(['foo']));\n * //=> ['foo']\n * ```\n * @param {any} `val`\n * @return {Array}\n * @api public\n */\n\nutils.arrayify = function(val) {\n if (typeof val === 'string' && val !== '') {\n return [val];\n }\n if (!Array.isArray(val)) {\n return [];\n }\n return val;\n};\n\n/**\n * Convert the given `val` to a string by joining with `,`. Useful\n * for creating a cheerio/CSS/DOM-style selector from a list of strings.\n *\n * @param {any} `val`\n * @return {Array}\n * @api public\n */\n\nutils.stringify = function(val) {\n return utils.arrayify(val).join(',');\n};\n\n/**\n * Ensure that the given value is a string and call `.trim()` on it,\n * or return an empty string.\n *\n * @param {String} `str`\n * @return {String}\n * @api public\n */\n\nutils.trim = function(str) {\n return typeof str === 'string' ? str.trim() : '';\n};\n\n/**\n * Return true if val is an object\n */\n\nfunction isObject(val) {\n return typeOf(val) === 'object';\n}\n\n/**\n * Return true if val is a string\n */\n\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Return true if val is a function\n */\n\nfunction isFunction(val) {\n return typeof val === 'function';\n}\n\n/**\n * Return true if val is an array\n */\n\nfunction isArray(val) {\n return Array.isArray(val);\n}\n\n/**\n * Shim to ensure the `.append` methods work with any version of snapdragon\n */\n\nfunction append(compiler, val, node) {\n if (typeof compiler.append !== 'function') {\n return compiler.emit(val, node);\n }\n return compiler.append(val, node);\n}\n\n/**\n * Simplified assertion. Throws an error is `val` is falsey.\n */\n\nfunction assert(val, message) {\n if (!val) throw new Error(message);\n}\n","'use strict';\n\nvar Base = require('base');\nvar define = require('define-property');\nvar Compiler = require('./lib/compiler');\nvar Parser = require('./lib/parser');\nvar utils = require('./lib/utils');\nvar regexCache = {};\nvar cache = {};\n\n/**\n * Create a new instance of `Snapdragon` with the given `options`.\n *\n * ```js\n * var snapdragon = new Snapdragon();\n * ```\n *\n * @param {Object} `options`\n * @api public\n */\n\nfunction Snapdragon(options) {\n Base.call(this, null, options);\n this.options = utils.extend({source: 'string'}, this.options);\n this.compiler = new Compiler(this.options);\n this.parser = new Parser(this.options);\n\n Object.defineProperty(this, 'compilers', {\n get: function() {\n return this.compiler.compilers;\n }\n });\n\n Object.defineProperty(this, 'parsers', {\n get: function() {\n return this.parser.parsers;\n }\n });\n\n Object.defineProperty(this, 'regex', {\n get: function() {\n return this.parser.regex;\n }\n });\n}\n\n/**\n * Inherit Base\n */\n\nBase.extend(Snapdragon);\n\n/**\n * Add a parser to `snapdragon.parsers` for capturing the given `type` using\n * the specified regex or parser function. A function is useful if you need\n * to customize how the token is created and/or have access to the parser\n * instance to check options, etc.\n *\n * ```js\n * snapdragon\n * .capture('slash', /^\\//)\n * .capture('dot', function() {\n * var pos = this.position();\n * var m = this.match(/^\\./);\n * if (!m) return;\n * return pos({\n * type: 'dot',\n * val: m[0]\n * });\n * });\n * ```\n * @param {String} `type`\n * @param {RegExp|Function} `regex`\n * @return {Object} Returns the parser instance for chaining\n * @api public\n */\n\nSnapdragon.prototype.capture = function() {\n return this.parser.capture.apply(this.parser, arguments);\n};\n\n/**\n * Register a plugin `fn`.\n *\n * ```js\n * var snapdragon = new Snapdgragon([options]);\n * snapdragon.use(function() {\n * console.log(this); //<= snapdragon instance\n * console.log(this.parser); //<= parser instance\n * console.log(this.compiler); //<= compiler instance\n * });\n * ```\n * @param {Object} `fn`\n * @api public\n */\n\nSnapdragon.prototype.use = function(fn) {\n fn.call(this, this);\n return this;\n};\n\n/**\n * Parse the given `str`.\n *\n * ```js\n * var snapdragon = new Snapdgragon([options]);\n * // register parsers\n * snapdragon.parser.use(function() {});\n *\n * // parse\n * var ast = snapdragon.parse('foo/bar');\n * console.log(ast);\n * ```\n * @param {String} `str`\n * @param {Object} `options` Set `options.sourcemap` to true to enable source maps.\n * @return {Object} Returns an AST.\n * @api public\n */\n\nSnapdragon.prototype.parse = function(str, options) {\n this.options = utils.extend({}, this.options, options);\n var parsed = this.parser.parse(str, this.options);\n\n // add non-enumerable parser reference\n define(parsed, 'parser', this.parser);\n return parsed;\n};\n\n/**\n * Compile the given `AST`.\n *\n * ```js\n * var snapdragon = new Snapdgragon([options]);\n * // register plugins\n * snapdragon.use(function() {});\n * // register parser plugins\n * snapdragon.parser.use(function() {});\n * // register compiler plugins\n * snapdragon.compiler.use(function() {});\n *\n * // parse\n * var ast = snapdragon.parse('foo/bar');\n *\n * // compile\n * var res = snapdragon.compile(ast);\n * console.log(res.output);\n * ```\n * @param {Object} `ast`\n * @param {Object} `options`\n * @return {Object} Returns an object with an `output` property with the rendered string.\n * @api public\n */\n\nSnapdragon.prototype.compile = function(ast, options) {\n this.options = utils.extend({}, this.options, options);\n var compiled = this.compiler.compile(ast, this.options);\n\n // add non-enumerable compiler reference\n define(compiled, 'compiler', this.compiler);\n return compiled;\n};\n\n/**\n * Expose `Snapdragon`\n */\n\nmodule.exports = Snapdragon;\n\n/**\n * Expose `Parser` and `Compiler`\n */\n\nmodule.exports.Compiler = Compiler;\nmodule.exports.Parser = Parser;\n","'use strict';\n\nvar use = require('use');\nvar define = require('define-property');\nvar debug = require('debug')('snapdragon:compiler');\nvar utils = require('./utils');\n\n/**\n * Create a new `Compiler` with the given `options`.\n * @param {Object} `options`\n */\n\nfunction Compiler(options, state) {\n debug('initializing', __filename);\n this.options = utils.extend({source: 'string'}, options);\n this.state = state || {};\n this.compilers = {};\n this.output = '';\n this.set('eos', function(node) {\n return this.emit(node.val, node);\n });\n this.set('noop', function(node) {\n return this.emit(node.val, node);\n });\n this.set('bos', function(node) {\n return this.emit(node.val, node);\n });\n use(this);\n}\n\n/**\n * Prototype methods\n */\n\nCompiler.prototype = {\n\n /**\n * Throw an error message with details including the cursor position.\n * @param {String} `msg` Message to use in the Error.\n */\n\n error: function(msg, node) {\n var pos = node.position || {start: {column: 0}};\n var message = this.options.source + ' column:' + pos.start.column + ': ' + msg;\n\n var err = new Error(message);\n err.reason = msg;\n err.column = pos.start.column;\n err.source = this.pattern;\n\n if (this.options.silent) {\n this.errors.push(err);\n } else {\n throw err;\n }\n },\n\n /**\n * Define a non-enumberable property on the `Compiler` instance.\n *\n * ```js\n * compiler.define('foo', 'bar');\n * ```\n * @name .define\n * @param {String} `key` propery name\n * @param {any} `val` property value\n * @return {Object} Returns the Compiler instance for chaining.\n * @api public\n */\n\n define: function(key, val) {\n define(this, key, val);\n return this;\n },\n\n /**\n * Emit `node.val`\n */\n\n emit: function(str, node) {\n this.output += str;\n return str;\n },\n\n /**\n * Add a compiler `fn` with the given `name`\n */\n\n set: function(name, fn) {\n this.compilers[name] = fn;\n return this;\n },\n\n /**\n * Get compiler `name`.\n */\n\n get: function(name) {\n return this.compilers[name];\n },\n\n /**\n * Get the previous AST node.\n */\n\n prev: function(n) {\n return this.ast.nodes[this.idx - (n || 1)] || { type: 'bos', val: '' };\n },\n\n /**\n * Get the next AST node.\n */\n\n next: function(n) {\n return this.ast.nodes[this.idx + (n || 1)] || { type: 'eos', val: '' };\n },\n\n /**\n * Visit `node`.\n */\n\n visit: function(node, nodes, i) {\n var fn = this.compilers[node.type];\n this.idx = i;\n\n if (typeof fn !== 'function') {\n throw this.error('compiler \"' + node.type + '\" is not registered', node);\n }\n return fn.call(this, node, nodes, i);\n },\n\n /**\n * Map visit over array of `nodes`.\n */\n\n mapVisit: function(nodes) {\n if (!Array.isArray(nodes)) {\n throw new TypeError('expected an array');\n }\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n this.visit(nodes[idx], nodes, idx);\n }\n return this;\n },\n\n /**\n * Compile `ast`.\n */\n\n compile: function(ast, options) {\n var opts = utils.extend({}, this.options, options);\n this.ast = ast;\n this.parsingErrors = this.ast.errors;\n this.output = '';\n\n // source map support\n if (opts.sourcemap) {\n var sourcemaps = require('./source-maps');\n sourcemaps(this);\n this.mapVisit(this.ast.nodes);\n this.applySourceMaps();\n this.map = opts.sourcemap === 'generator' ? this.map : this.map.toJSON();\n return this;\n }\n\n this.mapVisit(this.ast.nodes);\n return this;\n }\n};\n\n/**\n * Expose `Compiler`\n */\n\nmodule.exports = Compiler;\n","'use strict';\n\nvar use = require('use');\nvar util = require('util');\nvar Cache = require('map-cache');\nvar define = require('define-property');\nvar debug = require('debug')('snapdragon:parser');\nvar Position = require('./position');\nvar utils = require('./utils');\n\n/**\n * Create a new `Parser` with the given `input` and `options`.\n * @param {String} `input`\n * @param {Object} `options`\n * @api public\n */\n\nfunction Parser(options) {\n debug('initializing', __filename);\n this.options = utils.extend({source: 'string'}, options);\n this.init(this.options);\n use(this);\n}\n\n/**\n * Prototype methods\n */\n\nParser.prototype = {\n constructor: Parser,\n\n init: function(options) {\n this.orig = '';\n this.input = '';\n this.parsed = '';\n\n this.column = 1;\n this.line = 1;\n\n this.regex = new Cache();\n this.errors = this.errors || [];\n this.parsers = this.parsers || {};\n this.types = this.types || [];\n this.sets = this.sets || {};\n this.fns = this.fns || [];\n this.currentType = 'root';\n\n var pos = this.position();\n this.bos = pos({type: 'bos', val: ''});\n\n this.ast = {\n type: 'root',\n errors: this.errors,\n nodes: [this.bos]\n };\n\n define(this.bos, 'parent', this.ast);\n this.nodes = [this.ast];\n\n this.count = 0;\n this.setCount = 0;\n this.stack = [];\n },\n\n /**\n * Throw a formatted error with the cursor column and `msg`.\n * @param {String} `msg` Message to use in the Error.\n */\n\n error: function(msg, node) {\n var pos = node.position || {start: {column: 0, line: 0}};\n var line = pos.start.line;\n var column = pos.start.column;\n var source = this.options.source;\n\n var message = source + ' <line:' + line + ' column:' + column + '>: ' + msg;\n var err = new Error(message);\n err.source = source;\n err.reason = msg;\n err.pos = pos;\n\n if (this.options.silent) {\n this.errors.push(err);\n } else {\n throw err;\n }\n },\n\n /**\n * Define a non-enumberable property on the `Parser` instance.\n *\n * ```js\n * parser.define('foo', 'bar');\n * ```\n * @name .define\n * @param {String} `key` propery name\n * @param {any} `val` property value\n * @return {Object} Returns the Parser instance for chaining.\n * @api public\n */\n\n define: function(key, val) {\n define(this, key, val);\n return this;\n },\n\n /**\n * Mark position and patch `node.position`.\n */\n\n position: function() {\n var start = { line: this.line, column: this.column };\n var self = this;\n\n return function(node) {\n define(node, 'position', new Position(start, self));\n return node;\n };\n },\n\n /**\n * Set parser `name` with the given `fn`\n * @param {String} `name`\n * @param {Function} `fn`\n * @api public\n */\n\n set: function(type, fn) {\n if (this.types.indexOf(type) === -1) {\n this.types.push(type);\n }\n this.parsers[type] = fn.bind(this);\n return this;\n },\n\n /**\n * Get parser `name`\n * @param {String} `name`\n * @api public\n */\n\n get: function(name) {\n return this.parsers[name];\n },\n\n /**\n * Push a `token` onto the `type` stack.\n *\n * @param {String} `type`\n * @return {Object} `token`\n * @api public\n */\n\n push: function(type, token) {\n this.sets[type] = this.sets[type] || [];\n this.count++;\n this.stack.push(token);\n return this.sets[type].push(token);\n },\n\n /**\n * Pop a token off of the `type` stack\n * @param {String} `type`\n * @returns {Object} Returns a token\n * @api public\n */\n\n pop: function(type) {\n this.sets[type] = this.sets[type] || [];\n this.count--;\n this.stack.pop();\n return this.sets[type].pop();\n },\n\n /**\n * Return true if inside a `stack` node. Types are `braces`, `parens` or `brackets`.\n *\n * @param {String} `type`\n * @return {Boolean}\n * @api public\n */\n\n isInside: function(type) {\n this.sets[type] = this.sets[type] || [];\n return this.sets[type].length > 0;\n },\n\n /**\n * Return true if `node` is the given `type`.\n *\n * ```js\n * parser.isType(node, 'brace');\n * ```\n * @param {Object} `node`\n * @param {String} `type`\n * @return {Boolean}\n * @api public\n */\n\n isType: function(node, type) {\n return node && node.type === type;\n },\n\n /**\n * Get the previous AST node\n * @return {Object}\n */\n\n prev: function(n) {\n return this.stack.length > 0\n ? utils.last(this.stack, n)\n : utils.last(this.nodes, n);\n },\n\n /**\n * Update line and column based on `str`.\n */\n\n consume: function(len) {\n this.input = this.input.substr(len);\n },\n\n /**\n * Update column based on `str`.\n */\n\n updatePosition: function(str, len) {\n var lines = str.match(/\\n/g);\n if (lines) this.line += lines.length;\n var i = str.lastIndexOf('\\n');\n this.column = ~i ? len - i : this.column + len;\n this.parsed += str;\n this.consume(len);\n },\n\n /**\n * Match `regex`, return captures, and update the cursor position by `match[0]` length.\n * @param {RegExp} `regex`\n * @return {Object}\n */\n\n match: function(regex) {\n var m = regex.exec(this.input);\n if (m) {\n this.updatePosition(m[0], m[0].length);\n return m;\n }\n },\n\n /**\n * Capture `type` with the given regex.\n * @param {String} `type`\n * @param {RegExp} `regex`\n * @return {Function}\n */\n\n capture: function(type, regex) {\n if (typeof regex === 'function') {\n return this.set.apply(this, arguments);\n }\n\n this.regex.set(type, regex);\n this.set(type, function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(regex);\n if (!m || !m[0]) return;\n\n var prev = this.prev();\n var node = pos({\n type: type,\n val: m[0],\n parsed: parsed,\n rest: this.input\n });\n\n if (m[1]) {\n node.inner = m[1];\n }\n\n define(node, 'inside', this.stack.length > 0);\n define(node, 'parent', prev);\n prev.nodes.push(node);\n }.bind(this));\n return this;\n },\n\n /**\n * Create a parser with open and close for parens,\n * brackets or braces\n */\n\n capturePair: function(type, openRegex, closeRegex, fn) {\n this.sets[type] = this.sets[type] || [];\n\n /**\n * Open\n */\n\n this.set(type + '.open', function() {\n var parsed = this.parsed;\n var pos = this.position();\n var m = this.match(openRegex);\n if (!m || !m[0]) return;\n\n var val = m[0];\n this.setCount++;\n this.specialChars = true;\n var open = pos({\n type: type + '.open',\n val: val,\n rest: this.input\n });\n\n if (typeof m[1] !== 'undefined') {\n open.inner = m[1];\n }\n\n var prev = this.prev();\n var node = pos({\n type: type,\n nodes: [open]\n });\n\n define(node, 'rest', this.input);\n define(node, 'parsed', parsed);\n define(node, 'prefix', m[1]);\n define(node, 'parent', prev);\n define(open, 'parent', node);\n\n if (typeof fn === 'function') {\n fn.call(this, open, node);\n }\n\n this.push(type, node);\n prev.nodes.push(node);\n });\n\n /**\n * Close\n */\n\n this.set(type + '.close', function() {\n var pos = this.position();\n var m = this.match(closeRegex);\n if (!m || !m[0]) return;\n\n var parent = this.pop(type);\n var node = pos({\n type: type + '.close',\n rest: this.input,\n suffix: m[1],\n val: m[0]\n });\n\n if (!this.isType(parent, type)) {\n if (this.options.strict) {\n throw new Error('missing opening \"' + type + '\"');\n }\n\n this.setCount--;\n node.escaped = true;\n return node;\n }\n\n if (node.suffix === '\\\\') {\n parent.escaped = true;\n node.escaped = true;\n }\n\n parent.nodes.push(node);\n define(node, 'parent', parent);\n });\n\n return this;\n },\n\n /**\n * Capture end-of-string\n */\n\n eos: function() {\n var pos = this.position();\n if (this.input) return;\n var prev = this.prev();\n\n while (prev.type !== 'root' && !prev.visited) {\n if (this.options.strict === true) {\n throw new SyntaxError('invalid syntax:' + util.inspect(prev, null, 2));\n }\n\n if (!hasDelims(prev)) {\n prev.parent.escaped = true;\n prev.escaped = true;\n }\n\n visit(prev, function(node) {\n if (!hasDelims(node.parent)) {\n node.parent.escaped = true;\n node.escaped = true;\n }\n });\n\n prev = prev.parent;\n }\n\n var tok = pos({\n type: 'eos',\n val: this.append || ''\n });\n\n define(tok, 'parent', this.ast);\n return tok;\n },\n\n /**\n * Run parsers to advance the cursor position\n */\n\n next: function() {\n var parsed = this.parsed;\n var len = this.types.length;\n var idx = -1;\n var tok;\n\n while (++idx < len) {\n if ((tok = this.parsers[this.types[idx]].call(this))) {\n define(tok, 'rest', this.input);\n define(tok, 'parsed', parsed);\n this.last = tok;\n return tok;\n }\n }\n },\n\n /**\n * Parse the given string.\n * @return {Array}\n */\n\n parse: function(input) {\n if (typeof input !== 'string') {\n throw new TypeError('expected a string');\n }\n\n this.init(this.options);\n this.orig = input;\n this.input = input;\n var self = this;\n\n function parse() {\n // check input before calling `.next()`\n input = self.input;\n\n // get the next AST ndoe\n var node = self.next();\n if (node) {\n var prev = self.prev();\n if (prev) {\n define(node, 'parent', prev);\n if (prev.nodes) {\n prev.nodes.push(node);\n }\n }\n\n if (self.sets.hasOwnProperty(prev.type)) {\n self.currentType = prev.type;\n }\n }\n\n // if we got here but input is not changed, throw an error\n if (self.input && input === self.input) {\n throw new Error('no parsers registered for: \"' + self.input.slice(0, 5) + '\"');\n }\n }\n\n while (this.input) parse();\n if (this.stack.length && this.options.strict) {\n var node = this.stack.pop();\n throw this.error('missing opening ' + node.type + ': \"' + this.orig + '\"');\n }\n\n var eos = this.eos();\n var tok = this.prev();\n if (tok.type !== 'eos') {\n this.ast.nodes.push(eos);\n }\n\n return this.ast;\n }\n};\n\n/**\n * Visit `node` with the given `fn`\n */\n\nfunction visit(node, fn) {\n if (!node.visited) {\n define(node, 'visited', true);\n return node.nodes ? mapVisit(node.nodes, fn) : fn(node);\n }\n return node;\n}\n\n/**\n * Map visit over array of `nodes`.\n */\n\nfunction mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n}\n\nfunction hasOpen(node) {\n return node.nodes && node.nodes[0].type === (node.type + '.open');\n}\n\nfunction hasClose(node) {\n return node.nodes && utils.last(node.nodes).type === (node.type + '.close');\n}\n\nfunction hasDelims(node) {\n return hasOpen(node) && hasClose(node);\n}\n\n/**\n * Expose `Parser`\n */\n\nmodule.exports = Parser;\n","'use strict';\n\nvar define = require('define-property');\n\n/**\n * Store position for a node\n */\n\nmodule.exports = function Position(start, parser) {\n this.start = start;\n this.end = { line: parser.line, column: parser.column };\n define(this, 'content', parser.orig);\n define(this, 'source', parser.options.source);\n};\n","'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\nvar define = require('define-property');\nvar utils = require('./utils');\n\n/**\n * Expose `mixin()`.\n * This code is based on `source-maps-support.js` in reworkcss/css\n * https://github.com/reworkcss/css/blob/master/lib/stringify/source-map-support.js\n * Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n */\n\nmodule.exports = mixin;\n\n/**\n * Mixin source map support into `compiler`.\n *\n * @param {Object} `compiler`\n * @api public\n */\n\nfunction mixin(compiler) {\n define(compiler, '_comment', compiler.comment);\n compiler.map = new utils.SourceMap.SourceMapGenerator();\n compiler.position = { line: 1, column: 1 };\n compiler.content = {};\n compiler.files = {};\n\n for (var key in exports) {\n define(compiler, key, exports[key]);\n }\n}\n\n/**\n * Update position.\n *\n * @param {String} str\n */\n\nexports.updatePosition = function(str) {\n var lines = str.match(/\\n/g);\n if (lines) this.position.line += lines.length;\n var i = str.lastIndexOf('\\n');\n this.position.column = ~i ? str.length - i : this.position.column + str.length;\n};\n\n/**\n * Emit `str` with `position`.\n *\n * @param {String} str\n * @param {Object} [pos]\n * @return {String}\n */\n\nexports.emit = function(str, node) {\n var position = node.position || {};\n var source = position.source;\n if (source) {\n if (position.filepath) {\n source = utils.unixify(position.filepath);\n }\n\n this.map.addMapping({\n source: source,\n generated: {\n line: this.position.line,\n column: Math.max(this.position.column - 1, 0)\n },\n original: {\n line: position.start.line,\n column: position.start.column - 1\n }\n });\n\n if (position.content) {\n this.addContent(source, position);\n }\n if (position.filepath) {\n this.addFile(source, position);\n }\n\n this.updatePosition(str);\n this.output += str;\n }\n return str;\n};\n\n/**\n * Adds a file to the source map output if it has not already been added\n * @param {String} `file`\n * @param {Object} `pos`\n */\n\nexports.addFile = function(file, position) {\n if (typeof position.content !== 'string') return;\n if (Object.prototype.hasOwnProperty.call(this.files, file)) return;\n this.files[file] = position.content;\n};\n\n/**\n * Adds a content source to the source map output if it has not already been added\n * @param {String} `source`\n * @param {Object} `position`\n */\n\nexports.addContent = function(source, position) {\n if (typeof position.content !== 'string') return;\n if (Object.prototype.hasOwnProperty.call(this.content, source)) return;\n this.map.setSourceContent(source, position.content);\n};\n\n/**\n * Applies any original source maps to the output and embeds the source file\n * contents in the source map.\n */\n\nexports.applySourceMaps = function() {\n Object.keys(this.files).forEach(function(file) {\n var content = this.files[file];\n this.map.setSourceContent(file, content);\n\n if (this.options.inputSourcemaps === true) {\n var originalMap = utils.sourceMapResolve.resolveSync(content, file, fs.readFileSync);\n if (originalMap) {\n var map = new utils.SourceMap.SourceMapConsumer(originalMap.map);\n var relativeTo = originalMap.sourcesRelativeTo;\n this.map.applySourceMap(map, file, utils.unixify(path.dirname(relativeTo)));\n }\n }\n }, this);\n};\n\n/**\n * Process comments, drops sourceMap comments.\n * @param {Object} node\n */\n\nexports.comment = function(node) {\n if (/^# sourceMappingURL=/.test(node.comment)) {\n return this.emit('', node.position);\n }\n return this._comment(node);\n};\n","'use strict';\n\n/**\n * Module dependencies\n */\n\nexports.extend = require('extend-shallow');\nexports.SourceMap = require('source-map');\nexports.sourceMapResolve = require('source-map-resolve');\n\n/**\n * Convert backslash in the given string to forward slashes\n */\n\nexports.unixify = function(fp) {\n return fp.split(/\\\\+/).join('/');\n};\n\n/**\n * Return true if `val` is a non-empty string\n *\n * @param {String} `str`\n * @return {Boolean}\n */\n\nexports.isString = function(str) {\n return str && typeof str === 'string';\n};\n\n/**\n * Cast `val` to an array\n * @return {Array}\n */\n\nexports.arrayify = function(val) {\n if (typeof val === 'string') return [val];\n return val ? (Array.isArray(val) ? val : [val]) : [];\n};\n\n/**\n * Get the last `n` element from the given `array`\n * @param {Array} `array`\n * @return {*}\n */\n\nexports.last = function(arr, n) {\n return arr[arr.length - (n || 1)];\n};\n","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n","// Copyright 2014, 2015, 2016, 2017 Simon Lydell\n// X11 (“MIT”) Licensed. (See LICENSE.)\n\n// Note: source-map-resolve.js is generated from source-map-resolve-node.js and\n// source-map-resolve-template.js. Only edit the two latter files, _not_\n// source-map-resolve.js!\n\nvoid (function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"source-map-url\", \"resolve-url\"], factory)\n } else if (typeof exports === \"object\") {\n var sourceMappingURL = require(\"source-map-url\")\n var resolveUrl = require(\"resolve-url\")\n module.exports = factory(sourceMappingURL, resolveUrl)\n } else {\n root.sourceMapResolve = factory(root.sourceMappingURL, root.resolveUrl)\n }\n}(this, function(sourceMappingURL, resolveUrl) {\n\n function callbackAsync(callback, error, result) {\n setImmediate(function() { callback(error, result) })\n }\n\n function parseMapToJSON(string, data) {\n try {\n return JSON.parse(string.replace(/^\\)\\]\\}'/, \"\"))\n } catch (error) {\n error.sourceMapData = data\n throw error\n }\n }\n\n function readSync(read, url, data) {\n var readUrl = url\n try {\n return String(read(readUrl))\n } catch (error) {\n error.sourceMapData = data\n throw error\n }\n }\n\n\n\n function resolveSourceMap(code, codeUrl, read, callback) {\n var mapData\n try {\n mapData = resolveSourceMapHelper(code, codeUrl)\n } catch (error) {\n return callbackAsync(callback, error)\n }\n if (!mapData || mapData.map) {\n return callbackAsync(callback, null, mapData)\n }\n var readUrl = mapData.url\n read(readUrl, function(error, result) {\n if (error) {\n error.sourceMapData = mapData\n return callback(error)\n }\n mapData.map = String(result)\n try {\n mapData.map = parseMapToJSON(mapData.map, mapData)\n } catch (error) {\n return callback(error)\n }\n callback(null, mapData)\n })\n }\n\n function resolveSourceMapSync(code, codeUrl, read) {\n var mapData = resolveSourceMapHelper(code, codeUrl)\n if (!mapData || mapData.map) {\n return mapData\n }\n mapData.map = readSync(read, mapData.url, mapData)\n mapData.map = parseMapToJSON(mapData.map, mapData)\n return mapData\n }\n\n var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/\n var jsonMimeTypeRegex = /^(?:application|text)\\/json$/\n\n function resolveSourceMapHelper(code, codeUrl) {\n var url = sourceMappingURL.getFrom(code)\n if (!url) {\n return null\n }\n\n var dataUri = url.match(dataUriRegex)\n if (dataUri) {\n var mimeType = dataUri[1]\n var lastParameter = dataUri[2] || \"\"\n var encoded = dataUri[3] || \"\"\n var data = {\n sourceMappingURL: url,\n url: null,\n sourcesRelativeTo: codeUrl,\n map: encoded\n }\n if (!jsonMimeTypeRegex.test(mimeType)) {\n var error = new Error(\"Unuseful data uri mime type: \" + (mimeType || \"text/plain\"))\n error.sourceMapData = data\n throw error\n }\n data.map = parseMapToJSON(\n lastParameter === \";base64\" ? atob(encoded) : decodeURIComponent(encoded),\n data\n )\n return data\n }\n\n var mapUrl = resolveUrl(codeUrl, url)\n return {\n sourceMappingURL: url,\n url: mapUrl,\n sourcesRelativeTo: mapUrl,\n map: null\n }\n }\n\n\n\n function resolveSources(map, mapUrl, read, options, callback) {\n if (typeof options === \"function\") {\n callback = options\n options = {}\n }\n var pending = map.sources ? map.sources.length : 0\n var result = {\n sourcesResolved: [],\n sourcesContent: []\n }\n\n if (pending === 0) {\n callbackAsync(callback, null, result)\n return\n }\n\n var done = function() {\n pending--\n if (pending === 0) {\n callback(null, result)\n }\n }\n\n resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) {\n result.sourcesResolved[index] = fullUrl\n if (typeof sourceContent === \"string\") {\n result.sourcesContent[index] = sourceContent\n callbackAsync(done, null)\n } else {\n var readUrl = fullUrl\n read(readUrl, function(error, source) {\n result.sourcesContent[index] = error ? error : String(source)\n done()\n })\n }\n })\n }\n\n function resolveSourcesSync(map, mapUrl, read, options) {\n var result = {\n sourcesResolved: [],\n sourcesContent: []\n }\n\n if (!map.sources || map.sources.length === 0) {\n return result\n }\n\n resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) {\n result.sourcesResolved[index] = fullUrl\n if (read !== null) {\n if (typeof sourceContent === \"string\") {\n result.sourcesContent[index] = sourceContent\n } else {\n var readUrl = fullUrl\n try {\n result.sourcesContent[index] = String(read(readUrl))\n } catch (error) {\n result.sourcesContent[index] = error\n }\n }\n }\n })\n\n return result\n }\n\n var endingSlash = /\\/?$/\n\n function resolveSourcesHelper(map, mapUrl, options, fn) {\n options = options || {}\n var fullUrl\n var sourceContent\n var sourceRoot\n for (var index = 0, len = map.sources.length; index < len; index++) {\n sourceRoot = null\n if (typeof options.sourceRoot === \"string\") {\n sourceRoot = options.sourceRoot\n } else if (typeof map.sourceRoot === \"string\" && options.sourceRoot !== false) {\n sourceRoot = map.sourceRoot\n }\n // If the sourceRoot is the empty string, it is equivalent to not setting\n // the property at all.\n if (sourceRoot === null || sourceRoot === '') {\n fullUrl = resolveUrl(mapUrl, map.sources[index])\n } else {\n // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes\n // `/scripts/subdir/<source>`, not `/scripts/<source>`. Pointing to a file as source root\n // does not make sense.\n fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, \"/\"), map.sources[index])\n }\n sourceContent = (map.sourcesContent || [])[index]\n fn(fullUrl, sourceContent, index)\n }\n }\n\n\n\n function resolve(code, codeUrl, read, options, callback) {\n if (typeof options === \"function\") {\n callback = options\n options = {}\n }\n if (code === null) {\n var mapUrl = codeUrl\n var data = {\n sourceMappingURL: null,\n url: mapUrl,\n sourcesRelativeTo: mapUrl,\n map: null\n }\n var readUrl = mapUrl\n read(readUrl, function(error, result) {\n if (error) {\n error.sourceMapData = data\n return callback(error)\n }\n data.map = String(result)\n try {\n data.map = parseMapToJSON(data.map, data)\n } catch (error) {\n return callback(error)\n }\n _resolveSources(data)\n })\n } else {\n resolveSourceMap(code, codeUrl, read, function(error, mapData) {\n if (error) {\n return callback(error)\n }\n if (!mapData) {\n return callback(null, null)\n }\n _resolveSources(mapData)\n })\n }\n\n function _resolveSources(mapData) {\n resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) {\n if (error) {\n return callback(error)\n }\n mapData.sourcesResolved = result.sourcesResolved\n mapData.sourcesContent = result.sourcesContent\n callback(null, mapData)\n })\n }\n }\n\n function resolveSync(code, codeUrl, read, options) {\n var mapData\n if (code === null) {\n var mapUrl = codeUrl\n mapData = {\n sourceMappingURL: null,\n url: mapUrl,\n sourcesRelativeTo: mapUrl,\n map: null\n }\n mapData.map = readSync(read, mapUrl, mapData)\n mapData.map = parseMapToJSON(mapData.map, mapData)\n } else {\n mapData = resolveSourceMapSync(code, codeUrl, read)\n if (!mapData) {\n return null\n }\n }\n var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options)\n mapData.sourcesResolved = result.sourcesResolved\n mapData.sourcesContent = result.sourcesContent\n return mapData\n }\n\n\n\n return {\n resolveSourceMap: resolveSourceMap,\n resolveSourceMapSync: resolveSourceMapSync,\n resolveSources: resolveSources,\n resolveSourcesSync: resolveSourcesSync,\n resolve: resolve,\n resolveSync: resolveSync,\n parseMapToJSON: parseMapToJSON\n }\n\n}));\n","// Copyright 2014 Simon Lydell\n// X11 (“MIT”) Licensed. (See LICENSE.)\n\nvoid (function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(factory)\n } else if (typeof exports === \"object\") {\n module.exports = factory()\n } else {\n root.sourceMappingURL = factory()\n }\n}(this, function() {\n\n var innerRegex = /[#@] sourceMappingURL=([^\\s'\"]*)/\n\n var regex = RegExp(\n \"(?:\" +\n \"/\\\\*\" +\n \"(?:\\\\s*\\r?\\n(?://)?)?\" +\n \"(?:\" + innerRegex.source + \")\" +\n \"\\\\s*\" +\n \"\\\\*/\" +\n \"|\" +\n \"//(?:\" + innerRegex.source + \")\" +\n \")\" +\n \"\\\\s*\"\n )\n\n return {\n\n regex: regex,\n _innerRegex: innerRegex,\n\n getFrom: function(code) {\n var match = code.match(regex)\n return (match ? match[1] || match[2] || \"\" : null)\n },\n\n existsIn: function(code) {\n return regex.test(code)\n },\n\n removeFrom: function(code) {\n return code.replace(regex, \"\")\n },\n\n insertBefore: function(code, string) {\n var match = code.match(regex)\n if (match) {\n return code.slice(0, match.index) + string + code.slice(match.index)\n } else {\n return code + string\n }\n }\n }\n\n}));\n","/*!\n * split-string <https://github.com/jonschlinkert/split-string>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar extend = require('extend-shallow');\n\nmodule.exports = function(str, options, fn) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string');\n }\n\n if (typeof options === 'function') {\n fn = options;\n options = null;\n }\n\n // allow separator to be defined as a string\n if (typeof options === 'string') {\n options = { sep: options };\n }\n\n var opts = extend({sep: '.'}, options);\n var quotes = opts.quotes || ['\"', \"'\", '`'];\n var brackets;\n\n if (opts.brackets === true) {\n brackets = {\n '<': '>',\n '(': ')',\n '[': ']',\n '{': '}'\n };\n } else if (opts.brackets) {\n brackets = opts.brackets;\n }\n\n var tokens = [];\n var stack = [];\n var arr = [''];\n var sep = opts.sep;\n var len = str.length;\n var idx = -1;\n var closeIdx;\n\n function expected() {\n if (brackets && stack.length) {\n return brackets[stack[stack.length - 1]];\n }\n }\n\n while (++idx < len) {\n var ch = str[idx];\n var next = str[idx + 1];\n var tok = { val: ch, idx: idx, arr: arr, str: str };\n tokens.push(tok);\n\n if (ch === '\\\\') {\n tok.val = keepEscaping(opts, str, idx) === true ? (ch + next) : next;\n tok.escaped = true;\n if (typeof fn === 'function') {\n fn(tok);\n }\n arr[arr.length - 1] += tok.val;\n idx++;\n continue;\n }\n\n if (brackets && brackets[ch]) {\n stack.push(ch);\n var e = expected();\n var i = idx + 1;\n\n if (str.indexOf(e, i + 1) !== -1) {\n while (stack.length && i < len) {\n var s = str[++i];\n if (s === '\\\\') {\n s++;\n continue;\n }\n\n if (quotes.indexOf(s) !== -1) {\n i = getClosingQuote(str, s, i + 1);\n continue;\n }\n\n e = expected();\n if (stack.length && str.indexOf(e, i + 1) === -1) {\n break;\n }\n\n if (brackets[s]) {\n stack.push(s);\n continue;\n }\n\n if (e === s) {\n stack.pop();\n }\n }\n }\n\n closeIdx = i;\n if (closeIdx === -1) {\n arr[arr.length - 1] += ch;\n continue;\n }\n\n ch = str.slice(idx, closeIdx + 1);\n tok.val = ch;\n tok.idx = idx = closeIdx;\n }\n\n if (quotes.indexOf(ch) !== -1) {\n closeIdx = getClosingQuote(str, ch, idx + 1);\n if (closeIdx === -1) {\n arr[arr.length - 1] += ch;\n continue;\n }\n\n if (keepQuotes(ch, opts) === true) {\n ch = str.slice(idx, closeIdx + 1);\n } else {\n ch = str.slice(idx + 1, closeIdx);\n }\n\n tok.val = ch;\n tok.idx = idx = closeIdx;\n }\n\n if (typeof fn === 'function') {\n fn(tok, tokens);\n ch = tok.val;\n idx = tok.idx;\n }\n\n if (tok.val === sep && tok.split !== false) {\n arr.push('');\n continue;\n }\n\n arr[arr.length - 1] += tok.val;\n }\n\n return arr;\n};\n\nfunction getClosingQuote(str, ch, i, brackets) {\n var idx = str.indexOf(ch, i);\n if (str.charAt(idx - 1) === '\\\\') {\n return getClosingQuote(str, ch, idx + 1);\n }\n return idx;\n}\n\nfunction keepQuotes(ch, opts) {\n if (opts.keepDoubleQuotes === true && ch === '\"') return true;\n if (opts.keepSingleQuotes === true && ch === \"'\") return true;\n return opts.keepQuotes;\n}\n\nfunction keepEscaping(opts, str, idx) {\n if (typeof opts.keepEscaping === 'function') {\n return opts.keepEscaping(str, idx);\n }\n return opts.keepEscaping === true || str[idx + 1] === '\\\\';\n}\n","'use strict';\n\nvar isExtendable = require('is-extendable');\nvar assignSymbols = require('assign-symbols');\n\nmodule.exports = Object.assign || function(obj/*, objects*/) {\n if (obj === null || typeof obj === 'undefined') {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n if (!isObject(obj)) {\n obj = {};\n }\n for (var i = 1; i < arguments.length; i++) {\n var val = arguments[i];\n if (isString(val)) {\n val = toObject(val);\n }\n if (isObject(val)) {\n assign(obj, val);\n assignSymbols(obj, val);\n }\n }\n return obj;\n};\n\nfunction assign(a, b) {\n for (var key in b) {\n if (hasOwn(b, key)) {\n a[key] = b[key];\n }\n }\n}\n\nfunction isString(val) {\n return (val && typeof val === 'string');\n}\n\nfunction toObject(str) {\n var obj = {};\n for (var i in str) {\n obj[i] = str[i];\n }\n return obj;\n}\n\nfunction isObject(val) {\n return (val && typeof val === 'object') || isExtendable(val);\n}\n\n/**\n * Returns true if the given `key` is an own property of `obj`.\n */\n\nfunction hasOwn(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction isEnum(obj, key) {\n return Object.prototype.propertyIsEnumerable.call(obj, key);\n}\n","/*!\n * is-extendable <https://github.com/jonschlinkert/is-extendable>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isPlainObject = require('is-plain-object');\n\nmodule.exports = function isExtendable(val) {\n return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);\n};\n","'use strict';\nmodule.exports = StackUtils;\n\nfunction StackUtils(opts) {\n if (!(this instanceof StackUtils)) {\n throw new Error('StackUtils constructor must be called with new');\n }\n opts = opts || {};\n this._cwd = (opts.cwd || process.cwd()).replace(/\\\\/g, '/');\n this._internals = opts.internals || [];\n this._wrapCallSite = opts.wrapCallSite || false;\n}\n\nmodule.exports.nodeInternals = nodeInternals;\n\nfunction nodeInternals() {\n if (!module.exports.natives) {\n module.exports.natives = Object.keys(process.binding('natives'));\n module.exports.natives.push('bootstrap_node', 'node',\n 'internal/bootstrap/node');\n }\n\n return module.exports.natives.map(function (n) {\n return new RegExp('\\\\(' + n + '\\\\.js:\\\\d+:\\\\d+\\\\)$');\n }).concat([\n /\\s*at (bootstrap_)?node\\.js:\\d+:\\d+?$/,\n /\\(internal\\/[^:]+:\\d+:\\d+\\)$/,\n /\\/\\.node-spawn-wrap-\\w+-\\w+\\/node:\\d+:\\d+\\)?$/\n ]);\n}\n\nStackUtils.prototype.clean = function (stack) {\n if (!Array.isArray(stack)) {\n stack = stack.split('\\n');\n }\n\n if (!(/^\\s*at /.test(stack[0])) &&\n (/^\\s*at /.test(stack[1]))) {\n stack = stack.slice(1);\n }\n\n var outdent = false;\n var lastNonAtLine = null;\n var result = [];\n\n stack.forEach(function (st) {\n st = st.replace(/\\\\/g, '/');\n var isInternal = this._internals.some(function (internal) {\n return internal.test(st);\n });\n\n if (isInternal) {\n return null;\n }\n\n var isAtLine = /^\\s*at /.test(st);\n\n if (outdent) {\n st = st.replace(/\\s+$/, '').replace(/^(\\s+)at /, '$1');\n } else {\n st = st.trim();\n if (isAtLine) {\n st = st.substring(3);\n }\n }\n\n st = st.replace(this._cwd + '/', '');\n\n if (st) {\n if (isAtLine) {\n if (lastNonAtLine) {\n result.push(lastNonAtLine);\n lastNonAtLine = null;\n }\n result.push(st);\n } else {\n outdent = true;\n lastNonAtLine = st;\n }\n }\n }, this);\n\n stack = result.join('\\n').trim();\n\n if (stack) {\n return stack + '\\n';\n }\n return '';\n};\n\nStackUtils.prototype.captureString = function (limit, fn) {\n if (typeof limit === 'function') {\n fn = limit;\n limit = Infinity;\n }\n if (!fn) {\n fn = this.captureString;\n }\n\n var limitBefore = Error.stackTraceLimit;\n if (limit) {\n Error.stackTraceLimit = limit;\n }\n\n var obj = {};\n\n Error.captureStackTrace(obj, fn);\n var stack = obj.stack;\n Error.stackTraceLimit = limitBefore;\n\n return this.clean(stack);\n};\n\nStackUtils.prototype.capture = function (limit, fn) {\n if (typeof limit === 'function') {\n fn = limit;\n limit = Infinity;\n }\n if (!fn) {\n fn = this.capture;\n }\n var prepBefore = Error.prepareStackTrace;\n var limitBefore = Error.stackTraceLimit;\n var wrapCallSite = this._wrapCallSite;\n\n Error.prepareStackTrace = function (obj, site) {\n if (wrapCallSite) {\n return site.map(wrapCallSite);\n }\n return site;\n };\n\n if (limit) {\n Error.stackTraceLimit = limit;\n }\n\n var obj = {};\n Error.captureStackTrace(obj, fn);\n var stack = obj.stack;\n Error.prepareStackTrace = prepBefore;\n Error.stackTraceLimit = limitBefore;\n\n return stack;\n};\n\nStackUtils.prototype.at = function at(fn) {\n if (!fn) {\n fn = at;\n }\n\n var site = this.capture(1, fn)[0];\n\n if (!site) {\n return {};\n }\n\n var res = {\n line: site.getLineNumber(),\n column: site.getColumnNumber()\n };\n\n this._setFile(res, site.getFileName());\n\n if (site.isConstructor()) {\n res.constructor = true;\n }\n\n if (site.isEval()) {\n res.evalOrigin = site.getEvalOrigin();\n }\n\n // Node v10 stopped with the isNative() on callsites, apparently\n /* istanbul ignore next */\n if (site.isNative()) {\n res.native = true;\n }\n\n var typename = null;\n try {\n typename = site.getTypeName();\n } catch (er) {}\n\n if (typename &&\n typename !== 'Object' &&\n typename !== '[object Object]') {\n res.type = typename;\n }\n\n var fname = site.getFunctionName();\n if (fname) {\n res.function = fname;\n }\n\n var meth = site.getMethodName();\n if (meth && fname !== meth) {\n res.method = meth;\n }\n\n return res;\n};\n\nStackUtils.prototype._setFile = function (result, filename) {\n if (filename) {\n filename = filename.replace(/\\\\/g, '/');\n if ((filename.indexOf(this._cwd + '/') === 0)) {\n filename = filename.substr(this._cwd.length + 1);\n }\n result.file = filename;\n }\n};\n\nvar re = new RegExp(\n '^' +\n // Sometimes we strip out the ' at' because it's noisy\n '(?:\\\\s*at )?' +\n // $1 = ctor if 'new'\n '(?:(new) )?' +\n // $2 = function name (can be literally anything)\n // May contain method at the end as [as xyz]\n '(?:(.*?) \\\\()?' +\n // (eval at <anonymous> (file.js:1:1),\n // $3 = eval origin\n // $4:$5:$6 are eval file/line/col, but not normally reported\n '(?:eval at ([^ ]+) \\\\((.+?):(\\\\d+):(\\\\d+)\\\\), )?' +\n // file:line:col\n // $7:$8:$9\n // $10 = 'native' if native\n '(?:(.+?):(\\\\d+):(\\\\d+)|(native))' +\n // maybe close the paren, then end\n // if $11 is ), then we only allow balanced parens in the filename\n // any imbalance is placed on the fname. This is a heuristic, and\n // bound to be incorrect in some edge cases. The bet is that\n // having weird characters in method names is more common than\n // having weird characters in filenames, which seems reasonable.\n '(\\\\)?)$'\n);\n\nvar methodRe = /^(.*?) \\[as (.*?)\\]$/;\n\nStackUtils.prototype.parseLine = function parseLine(line) {\n var match = line && line.match(re);\n if (!match) {\n return null;\n }\n\n var ctor = match[1] === 'new';\n var fname = match[2];\n var evalOrigin = match[3];\n var evalFile = match[4];\n var evalLine = Number(match[5]);\n var evalCol = Number(match[6]);\n var file = match[7];\n var lnum = match[8];\n var col = match[9];\n var native = match[10] === 'native';\n var closeParen = match[11] === ')';\n\n var res = {};\n\n if (lnum) {\n res.line = Number(lnum);\n }\n\n if (col) {\n res.column = Number(col);\n }\n\n if (closeParen && file) {\n // make sure parens are balanced\n // if we have a file like \"asdf) [as foo] (xyz.js\", then odds are\n // that the fname should be += \" (asdf) [as foo]\" and the file\n // should be just \"xyz.js\"\n // walk backwards from the end to find the last unbalanced (\n var closes = 0;\n for (var i = file.length - 1; i > 0; i--) {\n if (file.charAt(i) === ')') {\n closes ++;\n } else if (file.charAt(i) === '(' && file.charAt(i - 1) === ' ') {\n closes --;\n if (closes === -1 && file.charAt(i - 1) === ' ') {\n var before = file.substr(0, i - 1);\n var after = file.substr(i + 1);\n file = after;\n fname += ' (' + before;\n break;\n }\n }\n }\n }\n\n if (fname) {\n var methodMatch = fname.match(methodRe);\n if (methodMatch) {\n fname = methodMatch[1];\n var meth = methodMatch[2];\n }\n }\n\n this._setFile(res, file);\n\n if (ctor) {\n res.constructor = true;\n }\n\n if (evalOrigin) {\n res.evalOrigin = evalOrigin;\n res.evalLine = evalLine;\n res.evalColumn = evalCol;\n res.evalFile = evalFile && evalFile.replace(/\\\\/g, '/');\n }\n\n if (native) {\n res.native = true;\n }\n\n if (fname) {\n res.function = fname;\n }\n\n if (meth && fname !== meth) {\n res.method = meth;\n }\n\n return res;\n};\n\nvar bound = new StackUtils();\n\nObject.keys(StackUtils.prototype).forEach(function (key) {\n StackUtils[key] = bound[key].bind(bound);\n});\n","/*!\n * static-extend <https://github.com/jonschlinkert/static-extend>\n *\n * Copyright (c) 2016, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar copy = require('object-copy');\nvar define = require('define-property');\nvar util = require('util');\n\n/**\n * Returns a function for extending the static properties,\n * prototype properties, and descriptors from the `Parent`\n * constructor onto `Child` constructors.\n *\n * ```js\n * var extend = require('static-extend');\n * Parent.extend = extend(Parent);\n *\n * // optionally pass a custom merge function as the second arg\n * Parent.extend = extend(Parent, function(Child) {\n * Child.prototype.mixin = function(key, val) {\n * Child.prototype[key] = val;\n * };\n * });\n *\n * // extend \"child\" constructors\n * Parent.extend(Child);\n *\n * // optionally define prototype methods as the second arg\n * Parent.extend(Child, {\n * foo: function() {},\n * bar: function() {}\n * });\n * ```\n * @param {Function} `Parent` Parent ctor\n * @param {Function} `extendFn` Optional extend function for handling any necessary custom merging. Useful when updating methods that require a specific prototype.\n * @param {Function} `Child` Child ctor\n * @param {Object} `proto` Optionally pass additional prototype properties to inherit.\n * @return {Object}\n * @api public\n */\n\nfunction extend(Parent, extendFn) {\n if (typeof Parent !== 'function') {\n throw new TypeError('expected Parent to be a function.');\n }\n\n return function(Ctor, proto) {\n if (typeof Ctor !== 'function') {\n throw new TypeError('expected Ctor to be a function.');\n }\n\n util.inherits(Ctor, Parent);\n copy(Ctor, Parent);\n\n // proto can be null or a plain object\n if (typeof proto === 'object') {\n var obj = Object.create(proto);\n\n for (var k in obj) {\n Ctor.prototype[k] = obj[k];\n }\n }\n\n // keep a reference to the parent prototype\n define(Ctor.prototype, '_parent_', {\n configurable: true,\n set: function() {},\n get: function() {\n return Parent.prototype;\n }\n });\n\n if (typeof extendFn === 'function') {\n extendFn(Ctor, Parent);\n }\n\n Ctor.extend = extend(Ctor, extendFn);\n };\n};\n\n/**\n * Expose `extend`\n */\n\nmodule.exports = extend;\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","/*!\n * to-object-path <https://github.com/jonschlinkert/to-object-path>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar typeOf = require('kind-of');\n\nmodule.exports = function toPath(args) {\n if (typeOf(args) !== 'arguments') {\n args = arguments;\n }\n return filter(args).join('.');\n};\n\nfunction filter(arr) {\n var len = arr.length;\n var idx = -1;\n var res = [];\n\n while (++idx < len) {\n var ele = arr[idx];\n if (typeOf(ele) === 'arguments' || Array.isArray(ele)) {\n res.push.apply(res, filter(ele));\n } else if (typeof ele === 'string') {\n res.push(ele);\n }\n }\n return res;\n}\n","/*!\n * to-regex-range <https://github.com/jonschlinkert/to-regex-range>\n *\n * Copyright (c) 2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar repeat = require('repeat-string');\nvar isNumber = require('is-number');\nvar cache = {};\n\nfunction toRegexRange(min, max, options) {\n if (isNumber(min) === false) {\n throw new RangeError('toRegexRange: first argument is invalid.');\n }\n\n if (typeof max === 'undefined' || min === max) {\n return String(min);\n }\n\n if (isNumber(max) === false) {\n throw new RangeError('toRegexRange: second argument is invalid.');\n }\n\n options = options || {};\n var relax = String(options.relaxZeros);\n var shorthand = String(options.shorthand);\n var capture = String(options.capture);\n var key = min + ':' + max + '=' + relax + shorthand + capture;\n if (cache.hasOwnProperty(key)) {\n return cache[key].result;\n }\n\n var a = Math.min(min, max);\n var b = Math.max(min, max);\n\n if (Math.abs(a - b) === 1) {\n var result = min + '|' + max;\n if (options.capture) {\n return '(' + result + ')';\n }\n return result;\n }\n\n var isPadded = padding(min) || padding(max);\n var positives = [];\n var negatives = [];\n\n var tok = {min: min, max: max, a: a, b: b};\n if (isPadded) {\n tok.isPadded = isPadded;\n tok.maxLen = String(tok.max).length;\n }\n\n if (a < 0) {\n var newMin = b < 0 ? Math.abs(b) : 1;\n var newMax = Math.abs(a);\n negatives = splitToPatterns(newMin, newMax, tok, options);\n a = tok.a = 0;\n }\n\n if (b >= 0) {\n positives = splitToPatterns(a, b, tok, options);\n }\n\n tok.negatives = negatives;\n tok.positives = positives;\n tok.result = siftPatterns(negatives, positives, options);\n\n if (options.capture && (positives.length + negatives.length) > 1) {\n tok.result = '(' + tok.result + ')';\n }\n\n cache[key] = tok;\n return tok.result;\n}\n\nfunction siftPatterns(neg, pos, options) {\n var onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];\n var onlyPositive = filterPatterns(pos, neg, '', false, options) || [];\n var intersected = filterPatterns(neg, pos, '-?', true, options) || [];\n var subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);\n return subpatterns.join('|');\n}\n\nfunction splitToRanges(min, max) {\n min = Number(min);\n max = Number(max);\n\n var nines = 1;\n var stops = [max];\n var stop = +countNines(min, nines);\n\n while (min <= stop && stop <= max) {\n stops = push(stops, stop);\n nines += 1;\n stop = +countNines(min, nines);\n }\n\n var zeros = 1;\n stop = countZeros(max + 1, zeros) - 1;\n\n while (min < stop && stop <= max) {\n stops = push(stops, stop);\n zeros += 1;\n stop = countZeros(max + 1, zeros) - 1;\n }\n\n stops.sort(compare);\n return stops;\n}\n\n/**\n * Convert a range to a regex pattern\n * @param {Number} `start`\n * @param {Number} `stop`\n * @return {String}\n */\n\nfunction rangeToPattern(start, stop, options) {\n if (start === stop) {\n return {pattern: String(start), digits: []};\n }\n\n var zipped = zip(String(start), String(stop));\n var len = zipped.length, i = -1;\n\n var pattern = '';\n var digits = 0;\n\n while (++i < len) {\n var numbers = zipped[i];\n var startDigit = numbers[0];\n var stopDigit = numbers[1];\n\n if (startDigit === stopDigit) {\n pattern += startDigit;\n\n } else if (startDigit !== '0' || stopDigit !== '9') {\n pattern += toCharacterClass(startDigit, stopDigit);\n\n } else {\n digits += 1;\n }\n }\n\n if (digits) {\n pattern += options.shorthand ? '\\\\d' : '[0-9]';\n }\n\n return { pattern: pattern, digits: [digits] };\n}\n\nfunction splitToPatterns(min, max, tok, options) {\n var ranges = splitToRanges(min, max);\n var len = ranges.length;\n var idx = -1;\n\n var tokens = [];\n var start = min;\n var prev;\n\n while (++idx < len) {\n var range = ranges[idx];\n var obj = rangeToPattern(start, range, options);\n var zeros = '';\n\n if (!tok.isPadded && prev && prev.pattern === obj.pattern) {\n if (prev.digits.length > 1) {\n prev.digits.pop();\n }\n prev.digits.push(obj.digits[0]);\n prev.string = prev.pattern + toQuantifier(prev.digits);\n start = range + 1;\n continue;\n }\n\n if (tok.isPadded) {\n zeros = padZeros(range, tok);\n }\n\n obj.string = zeros + obj.pattern + toQuantifier(obj.digits);\n tokens.push(obj);\n start = range + 1;\n prev = obj;\n }\n\n return tokens;\n}\n\nfunction filterPatterns(arr, comparison, prefix, intersection, options) {\n var res = [];\n\n for (var i = 0; i < arr.length; i++) {\n var tok = arr[i];\n var ele = tok.string;\n\n if (options.relaxZeros !== false) {\n if (prefix === '-' && ele.charAt(0) === '0') {\n if (ele.charAt(1) === '{') {\n ele = '0*' + ele.replace(/^0\\{\\d+\\}/, '');\n } else {\n ele = '0*' + ele.slice(1);\n }\n }\n }\n\n if (!intersection && !contains(comparison, 'string', ele)) {\n res.push(prefix + ele);\n }\n\n if (intersection && contains(comparison, 'string', ele)) {\n res.push(prefix + ele);\n }\n }\n return res;\n}\n\n/**\n * Zip strings (`for in` can be used on string characters)\n */\n\nfunction zip(a, b) {\n var arr = [];\n for (var ch in a) arr.push([a[ch], b[ch]]);\n return arr;\n}\n\nfunction compare(a, b) {\n return a > b ? 1 : b > a ? -1 : 0;\n}\n\nfunction push(arr, ele) {\n if (arr.indexOf(ele) === -1) arr.push(ele);\n return arr;\n}\n\nfunction contains(arr, key, val) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i][key] === val) {\n return true;\n }\n }\n return false;\n}\n\nfunction countNines(min, len) {\n return String(min).slice(0, -len) + repeat('9', len);\n}\n\nfunction countZeros(integer, zeros) {\n return integer - (integer % Math.pow(10, zeros));\n}\n\nfunction toQuantifier(digits) {\n var start = digits[0];\n var stop = digits[1] ? (',' + digits[1]) : '';\n if (!stop && (!start || start === 1)) {\n return '';\n }\n return '{' + start + stop + '}';\n}\n\nfunction toCharacterClass(a, b) {\n return '[' + a + ((b - a === 1) ? '' : '-') + b + ']';\n}\n\nfunction padding(str) {\n return /^-?(0+)\\d/.exec(str);\n}\n\nfunction padZeros(val, tok) {\n if (tok.isPadded) {\n var diff = Math.abs(tok.maxLen - String(val).length);\n switch (diff) {\n case 0:\n return '';\n case 1:\n return '0';\n default: {\n return '0{' + diff + '}';\n }\n }\n }\n return val;\n}\n\n/**\n * Expose `toRegexRange`\n */\n\nmodule.exports = toRegexRange;\n","'use strict';\n\nvar safe = require('safe-regex');\nvar define = require('define-property');\nvar extend = require('extend-shallow');\nvar not = require('regex-not');\nvar MAX_LENGTH = 1024 * 64;\n\n/**\n * Session cache\n */\n\nvar cache = {};\n\n/**\n * Create a regular expression from the given `pattern` string.\n *\n * @param {String|RegExp} `pattern` Pattern can be a string or regular expression.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\nmodule.exports = function(patterns, options) {\n if (!Array.isArray(patterns)) {\n return makeRe(patterns, options);\n }\n return makeRe(patterns.join('|'), options);\n};\n\n/**\n * Create a regular expression from the given `pattern` string.\n *\n * @param {String|RegExp} `pattern` Pattern can be a string or regular expression.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\nfunction makeRe(pattern, options) {\n if (pattern instanceof RegExp) {\n return pattern;\n }\n\n if (typeof pattern !== 'string') {\n throw new TypeError('expected a string');\n }\n\n if (pattern.length > MAX_LENGTH) {\n throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters');\n }\n\n var key = pattern;\n // do this before shallow cloning options, it's a lot faster\n if (!options || (options && options.cache !== false)) {\n key = createKey(pattern, options);\n\n if (cache.hasOwnProperty(key)) {\n return cache[key];\n }\n }\n\n var opts = extend({}, options);\n if (opts.contains === true) {\n if (opts.negate === true) {\n opts.strictNegate = false;\n } else {\n opts.strict = false;\n }\n }\n\n if (opts.strict === false) {\n opts.strictOpen = false;\n opts.strictClose = false;\n }\n\n var open = opts.strictOpen !== false ? '^' : '';\n var close = opts.strictClose !== false ? '$' : '';\n var flags = opts.flags || '';\n var regex;\n\n if (opts.nocase === true && !/i/.test(flags)) {\n flags += 'i';\n }\n\n try {\n if (opts.negate || typeof opts.strictNegate === 'boolean') {\n pattern = not.create(pattern, opts);\n }\n\n var str = open + '(?:' + pattern + ')' + close;\n regex = new RegExp(str, flags);\n\n if (opts.safe === true && safe(regex) === false) {\n throw new Error('potentially unsafe regular expression: ' + regex.source);\n }\n\n } catch (err) {\n if (opts.strictErrors === true || opts.safe === true) {\n err.key = key;\n err.pattern = pattern;\n err.originalOptions = options;\n err.createdOptions = opts;\n throw err;\n }\n\n try {\n regex = new RegExp('^' + pattern.replace(/(\\W)/g, '\\\\$1') + '$');\n } catch (err) {\n regex = /.^/; //<= match nothing\n }\n }\n\n if (opts.cache !== false) {\n memoize(regex, key, pattern, opts);\n }\n return regex;\n}\n\n/**\n * Memoize generated regex. This can result in dramatic speed improvements\n * and simplify debugging by adding options and pattern to the regex. It can be\n * disabled by passing setting `options.cache` to false.\n */\n\nfunction memoize(regex, key, pattern, options) {\n define(regex, 'cached', true);\n define(regex, 'pattern', pattern);\n define(regex, 'options', options);\n define(regex, 'key', key);\n cache[key] = regex;\n}\n\n/**\n * Create the key to use for memoization. The key is generated\n * by iterating over the options and concatenating key-value pairs\n * to the pattern string.\n */\n\nfunction createKey(pattern, options) {\n if (!options) return pattern;\n var key = pattern;\n for (var prop in options) {\n if (options.hasOwnProperty(prop)) {\n key += ';' + prop + '=' + String(options[prop]);\n }\n }\n return key;\n}\n\n/**\n * Expose `makeRe`\n */\n\nmodule.exports.makeRe = makeRe;\n","/*!\n * define-property <https://github.com/jonschlinkert/define-property>\n *\n * Copyright (c) 2015-2018, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isobject = require('isobject');\nvar isDescriptor = require('is-descriptor');\nvar define = (typeof Reflect !== 'undefined' && Reflect.defineProperty)\n ? Reflect.defineProperty\n : Object.defineProperty;\n\nmodule.exports = function defineProperty(obj, key, val) {\n if (!isobject(obj) && typeof obj !== 'function' && !Array.isArray(obj)) {\n throw new TypeError('expected an object, function, or array');\n }\n\n if (typeof key !== 'string') {\n throw new TypeError('expected \"key\" to be a string');\n }\n\n if (isDescriptor(val)) {\n define(obj, key, val);\n return obj;\n }\n\n define(obj, key, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: val\n });\n\n return obj;\n};\n","'use strict';\n\nvar isExtendable = require('is-extendable');\nvar assignSymbols = require('assign-symbols');\n\nmodule.exports = Object.assign || function(obj/*, objects*/) {\n if (obj === null || typeof obj === 'undefined') {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n if (!isObject(obj)) {\n obj = {};\n }\n for (var i = 1; i < arguments.length; i++) {\n var val = arguments[i];\n if (isString(val)) {\n val = toObject(val);\n }\n if (isObject(val)) {\n assign(obj, val);\n assignSymbols(obj, val);\n }\n }\n return obj;\n};\n\nfunction assign(a, b) {\n for (var key in b) {\n if (hasOwn(b, key)) {\n a[key] = b[key];\n }\n }\n}\n\nfunction isString(val) {\n return (val && typeof val === 'string');\n}\n\nfunction toObject(str) {\n var obj = {};\n for (var i in str) {\n obj[i] = str[i];\n }\n return obj;\n}\n\nfunction isObject(val) {\n return (val && typeof val === 'object') || isExtendable(val);\n}\n\n/**\n * Returns true if the given `key` is an own property of `obj`.\n */\n\nfunction hasOwn(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction isEnum(obj, key) {\n return Object.prototype.propertyIsEnumerable.call(obj, key);\n}\n","/*!\n * is-extendable <https://github.com/jonschlinkert/is-extendable>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isPlainObject = require('is-plain-object');\n\nmodule.exports = function isExtendable(val) {\n return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);\n};\n","'use strict';\n\nvar isObject = require('is-extendable');\nvar union = require('arr-union');\nvar get = require('get-value');\nvar set = require('set-value');\n\nmodule.exports = function unionValue(obj, prop, value) {\n if (!isObject(obj)) {\n throw new TypeError('union-value expects the first argument to be an object.');\n }\n\n if (typeof prop !== 'string') {\n throw new TypeError('union-value expects `prop` to be a string.');\n }\n\n var arr = arrayify(get(obj, prop));\n set(obj, prop, union(arr, arrayify(value)));\n return obj;\n};\n\nfunction arrayify(val) {\n if (val === null || typeof val === 'undefined') {\n return [];\n }\n if (Array.isArray(val)) {\n return val;\n }\n return [val];\n}\n","/*!\n * set-value <https://github.com/jonschlinkert/set-value>\n *\n * Copyright (c) 2014-2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar toPath = require('to-object-path');\nvar extend = require('extend-shallow');\nvar isPlainObject = require('is-plain-object');\nvar isObject = require('is-extendable');\n\nmodule.exports = function(obj, path, val) {\n if (!isObject(obj)) {\n return obj;\n }\n\n if (Array.isArray(path)) {\n path = toPath(path);\n }\n\n if (typeof path !== 'string') {\n return obj;\n }\n\n var segs = path.split('.');\n var len = segs.length, i = -1;\n var res = obj;\n var last;\n\n while (++i < len) {\n var key = segs[i];\n\n while (key[key.length - 1] === '\\\\') {\n key = key.slice(0, -1) + '.' + segs[++i];\n }\n\n if (i === len - 1) {\n last = key;\n break;\n }\n\n if (!isObject(obj[key])) {\n obj[key] = {};\n }\n obj = obj[key];\n }\n\n if (obj.hasOwnProperty(last) && isObject(obj[last])) {\n if (isPlainObject(val)) {\n extend(obj[last], val);\n } else {\n obj[last] = val;\n }\n\n } else {\n obj[last] = val;\n }\n return res;\n};\n\n","/*!\n * unset-value <https://github.com/jonschlinkert/unset-value>\n *\n * Copyright (c) 2015, 2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\nvar has = require('has-value');\n\nmodule.exports = function unset(obj, prop) {\n if (!isObject(obj)) {\n throw new TypeError('expected an object.');\n }\n if (obj.hasOwnProperty(prop)) {\n delete obj[prop];\n return true;\n }\n\n if (has(obj, prop)) {\n var segs = prop.split('.');\n var last = segs.pop();\n while (segs.length && segs[segs.length - 1].slice(-1) === '\\\\') {\n last = segs.pop().slice(0, -1) + '.' + last;\n }\n while (segs.length) obj = obj[prop = segs.shift()];\n return (delete obj[last]);\n }\n return true;\n};\n","/*!\n * has-value <https://github.com/jonschlinkert/has-value>\n *\n * Copyright (c) 2014-2016, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\nvar hasValues = require('has-values');\nvar get = require('get-value');\n\nmodule.exports = function(obj, prop, noZero) {\n if (isObject(obj)) {\n return hasValues(get(obj, prop), noZero);\n }\n return hasValues(obj, prop);\n};\n","/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar isArray = require('isarray');\n\nmodule.exports = function isObject(val) {\n return val != null && typeof val === 'object' && isArray(val) === false;\n};\n","/*!\n * has-values <https://github.com/jonschlinkert/has-values>\n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function hasValue(o, noZero) {\n if (o === null || o === undefined) {\n return false;\n }\n\n if (typeof o === 'boolean') {\n return true;\n }\n\n if (typeof o === 'number') {\n if (o === 0 && noZero === true) {\n return false;\n }\n return true;\n }\n\n if (o.length !== undefined) {\n return o.length !== 0;\n }\n\n for (var key in o) {\n if (o.hasOwnProperty(key)) {\n return true;\n }\n }\n return false;\n};\n","/*!\n * use <https://github.com/jonschlinkert/use>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function base(app, options) {\n if (!isObject(app) && typeof app !== 'function') {\n throw new TypeError('expected an object or function');\n }\n\n var opts = isObject(options) ? options : {};\n var prop = typeof opts.prop === 'string' ? opts.prop : 'fns';\n if (!Array.isArray(app[prop])) {\n define(app, prop, []);\n }\n\n /**\n * Define a plugin function to be passed to use. The only\n * parameter exposed to the plugin is `app`, the object or function.\n * passed to `use(app)`. `app` is also exposed as `this` in plugins.\n *\n * Additionally, **if a plugin returns a function, the function will\n * be pushed onto the `fns` array**, allowing the plugin to be\n * called at a later point by the `run` method.\n *\n * ```js\n * var use = require('use');\n *\n * // define a plugin\n * function foo(app) {\n * // do stuff\n * }\n *\n * var app = function(){};\n * use(app);\n *\n * // register plugins\n * app.use(foo);\n * app.use(bar);\n * app.use(baz);\n * ```\n * @name .use\n * @param {Function} `fn` plugin function to call\n * @api public\n */\n\n define(app, 'use', use);\n\n /**\n * Run all plugins on `fns`. Any plugin that returns a function\n * when called by `use` is pushed onto the `fns` array.\n *\n * ```js\n * var config = {};\n * app.run(config);\n * ```\n * @name .run\n * @param {Object} `value` Object to be modified by plugins.\n * @return {Object} Returns the object passed to `run`\n * @api public\n */\n\n define(app, 'run', function(val) {\n if (!isObject(val)) return;\n\n if (!val.use || !val.run) {\n define(val, prop, val[prop] || []);\n define(val, 'use', use);\n }\n\n if (!val[prop] || val[prop].indexOf(base) === -1) {\n val.use(base);\n }\n\n var self = this || app;\n var fns = self[prop];\n var len = fns.length;\n var idx = -1;\n\n while (++idx < len) {\n val.use(fns[idx]);\n }\n return val;\n });\n\n /**\n * Call plugin `fn`. If a function is returned push it into the\n * `fns` array to be called by the `run` method.\n */\n\n function use(type, fn, options) {\n var offset = 1;\n\n if (typeof type === 'string' || Array.isArray(type)) {\n fn = wrap(type, fn);\n offset++;\n } else {\n options = fn;\n fn = type;\n }\n\n if (typeof fn !== 'function') {\n throw new TypeError('expected a function');\n }\n\n var self = this || app;\n var fns = self[prop];\n\n var args = [].slice.call(arguments, offset);\n args.unshift(self);\n\n if (typeof opts.hook === 'function') {\n opts.hook.apply(self, args);\n }\n\n var val = fn.apply(self, args);\n if (typeof val === 'function' && fns.indexOf(val) === -1) {\n fns.push(val);\n }\n return self;\n }\n\n /**\n * Wrap a named plugin function so that it's only called on objects of the\n * given `type`\n *\n * @param {String} `type`\n * @param {Function} `fn` Plugin function\n * @return {Function}\n */\n\n function wrap(type, fn) {\n return function plugin() {\n return this.type === type ? fn.apply(this, arguments) : plugin;\n };\n }\n\n return app;\n};\n\nfunction isObject(val) {\n return val && typeof val === 'object' && !Array.isArray(val);\n}\n\nfunction define(obj, key, val) {\n Object.defineProperty(obj, key, {\n configurable: true,\n writable: true,\n value: val\n });\n}\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb, null, ret) },\n function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = void 0;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n// This diff-sequences package implements the linear space variation in\n// An O(ND) Difference Algorithm and Its Variations by Eugene W. Myers\n// Relationship in notation between Myers paper and this package:\n// A is a\n// N is aLength, aEnd - aStart, and so on\n// x is aIndex, aFirst, aLast, and so on\n// B is b\n// M is bLength, bEnd - bStart, and so on\n// y is bIndex, bFirst, bLast, and so on\n// Δ = N - M is negative of baDeltaLength = bLength - aLength\n// D is d\n// k is kF\n// k + Δ is kF = kR - baDeltaLength\n// V is aIndexesF or aIndexesR (see comment below about Indexes type)\n// index intervals [1, N] and [1, M] are [0, aLength) and [0, bLength)\n// starting point in forward direction (0, 0) is (-1, -1)\n// starting point in reverse direction (N + 1, M + 1) is (aLength, bLength)\n// The “edit graph” for sequences a and b corresponds to items:\n// in a on the horizontal axis\n// in b on the vertical axis\n//\n// Given a-coordinate of a point in a diagonal, you can compute b-coordinate.\n//\n// Forward diagonals kF:\n// zero diagonal intersects top left corner\n// positive diagonals intersect top edge\n// negative diagonals insersect left edge\n//\n// Reverse diagonals kR:\n// zero diagonal intersects bottom right corner\n// positive diagonals intersect right edge\n// negative diagonals intersect bottom edge\n// The graph contains a directed acyclic graph of edges:\n// horizontal: delete an item from a\n// vertical: insert an item from b\n// diagonal: common item in a and b\n//\n// The algorithm solves dual problems in the graph analogy:\n// Find longest common subsequence: path with maximum number of diagonal edges\n// Find shortest edit script: path with minimum number of non-diagonal edges\n// Input callback function compares items at indexes in the sequences.\n// Output callback function receives the number of adjacent items\n// and starting indexes of each common subsequence.\n// Either original functions or wrapped to swap indexes if graph is transposed.\n// Indexes in sequence a of last point of forward or reverse paths in graph.\n// Myers algorithm indexes by diagonal k which for negative is bad deopt in V8.\n// This package indexes by iF and iR which are greater than or equal to zero.\n// and also updates the index arrays in place to cut memory in half.\n// kF = 2 * iF - d\n// kR = d - 2 * iR\n// Division of index intervals in sequences a and b at the middle change.\n// Invariant: intervals do not have common items at the start or end.\nconst pkg = 'diff-sequences'; // for error messages\n\nconst NOT_YET_SET = 0; // small int instead of undefined to avoid deopt in V8\n// Return the number of common items that follow in forward direction.\n// The length of what Myers paper calls a “snake” in a forward path.\n\nconst countCommonItemsF = (aIndex, aEnd, bIndex, bEnd, isCommon) => {\n let nCommon = 0;\n\n while (aIndex < aEnd && bIndex < bEnd && isCommon(aIndex, bIndex)) {\n aIndex += 1;\n bIndex += 1;\n nCommon += 1;\n }\n\n return nCommon;\n}; // Return the number of common items that precede in reverse direction.\n// The length of what Myers paper calls a “snake” in a reverse path.\n\nconst countCommonItemsR = (aStart, aIndex, bStart, bIndex, isCommon) => {\n let nCommon = 0;\n\n while (aStart <= aIndex && bStart <= bIndex && isCommon(aIndex, bIndex)) {\n aIndex -= 1;\n bIndex -= 1;\n nCommon += 1;\n }\n\n return nCommon;\n}; // A simple function to extend forward paths from (d - 1) to d changes\n// when forward and reverse paths cannot yet overlap.\n\nconst extendPathsF = (d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF) => {\n // Unroll the first iteration.\n let iF = 0;\n let kF = -d; // kF = 2 * iF - d\n\n let aFirst = aIndexesF[iF]; // in first iteration always insert\n\n let aIndexPrev1 = aFirst; // prev value of [iF - 1] in next iteration\n\n aIndexesF[iF] += countCommonItemsF(\n aFirst + 1,\n aEnd,\n bF + aFirst - kF + 1,\n bEnd,\n isCommon\n ); // Optimization: skip diagonals in which paths cannot ever overlap.\n\n const nF = d < iMaxF ? d : iMaxF; // The diagonals kF are odd when d is odd and even when d is even.\n\n for (iF += 1, kF += 2; iF <= nF; iF += 1, kF += 2) {\n // To get first point of path segment, move one change in forward direction\n // from last point of previous path segment in an adjacent diagonal.\n // In last possible iteration when iF === d and kF === d always delete.\n if (iF !== d && aIndexPrev1 < aIndexesF[iF]) {\n aFirst = aIndexesF[iF]; // vertical to insert from b\n } else {\n aFirst = aIndexPrev1 + 1; // horizontal to delete from a\n\n if (aEnd <= aFirst) {\n // Optimization: delete moved past right of graph.\n return iF - 1;\n }\n } // To get last point of path segment, move along diagonal of common items.\n\n aIndexPrev1 = aIndexesF[iF];\n aIndexesF[iF] =\n aFirst +\n countCommonItemsF(aFirst + 1, aEnd, bF + aFirst - kF + 1, bEnd, isCommon);\n }\n\n return iMaxF;\n}; // A simple function to extend reverse paths from (d - 1) to d changes\n// when reverse and forward paths cannot yet overlap.\n\nconst extendPathsR = (d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR) => {\n // Unroll the first iteration.\n let iR = 0;\n let kR = d; // kR = d - 2 * iR\n\n let aFirst = aIndexesR[iR]; // in first iteration always insert\n\n let aIndexPrev1 = aFirst; // prev value of [iR - 1] in next iteration\n\n aIndexesR[iR] -= countCommonItemsR(\n aStart,\n aFirst - 1,\n bStart,\n bR + aFirst - kR - 1,\n isCommon\n ); // Optimization: skip diagonals in which paths cannot ever overlap.\n\n const nR = d < iMaxR ? d : iMaxR; // The diagonals kR are odd when d is odd and even when d is even.\n\n for (iR += 1, kR -= 2; iR <= nR; iR += 1, kR -= 2) {\n // To get first point of path segment, move one change in reverse direction\n // from last point of previous path segment in an adjacent diagonal.\n // In last possible iteration when iR === d and kR === -d always delete.\n if (iR !== d && aIndexesR[iR] < aIndexPrev1) {\n aFirst = aIndexesR[iR]; // vertical to insert from b\n } else {\n aFirst = aIndexPrev1 - 1; // horizontal to delete from a\n\n if (aFirst < aStart) {\n // Optimization: delete moved past left of graph.\n return iR - 1;\n }\n } // To get last point of path segment, move along diagonal of common items.\n\n aIndexPrev1 = aIndexesR[iR];\n aIndexesR[iR] =\n aFirst -\n countCommonItemsR(\n aStart,\n aFirst - 1,\n bStart,\n bR + aFirst - kR - 1,\n isCommon\n );\n }\n\n return iMaxR;\n}; // A complete function to extend forward paths from (d - 1) to d changes.\n// Return true if a path overlaps reverse path of (d - 1) changes in its diagonal.\n\nconst extendOverlappablePathsF = (\n d,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n iMaxF,\n aIndexesR,\n iMaxR,\n division\n) => {\n const bF = bStart - aStart; // bIndex = bF + aIndex - kF\n\n const aLength = aEnd - aStart;\n const bLength = bEnd - bStart;\n const baDeltaLength = bLength - aLength; // kF = kR - baDeltaLength\n // Range of diagonals in which forward and reverse paths might overlap.\n\n const kMinOverlapF = -baDeltaLength - (d - 1); // -(d - 1) <= kR\n\n const kMaxOverlapF = -baDeltaLength + (d - 1); // kR <= (d - 1)\n\n let aIndexPrev1 = NOT_YET_SET; // prev value of [iF - 1] in next iteration\n // Optimization: skip diagonals in which paths cannot ever overlap.\n\n const nF = d < iMaxF ? d : iMaxF; // The diagonals kF = 2 * iF - d are odd when d is odd and even when d is even.\n\n for (let iF = 0, kF = -d; iF <= nF; iF += 1, kF += 2) {\n // To get first point of path segment, move one change in forward direction\n // from last point of previous path segment in an adjacent diagonal.\n // In first iteration when iF === 0 and kF === -d always insert.\n // In last possible iteration when iF === d and kF === d always delete.\n const insert = iF === 0 || (iF !== d && aIndexPrev1 < aIndexesF[iF]);\n const aLastPrev = insert ? aIndexesF[iF] : aIndexPrev1;\n const aFirst = insert\n ? aLastPrev // vertical to insert from b\n : aLastPrev + 1; // horizontal to delete from a\n // To get last point of path segment, move along diagonal of common items.\n\n const bFirst = bF + aFirst - kF;\n const nCommonF = countCommonItemsF(\n aFirst + 1,\n aEnd,\n bFirst + 1,\n bEnd,\n isCommon\n );\n const aLast = aFirst + nCommonF;\n aIndexPrev1 = aIndexesF[iF];\n aIndexesF[iF] = aLast;\n\n if (kMinOverlapF <= kF && kF <= kMaxOverlapF) {\n // Solve for iR of reverse path with (d - 1) changes in diagonal kF:\n // kR = kF + baDeltaLength\n // kR = (d - 1) - 2 * iR\n const iR = (d - 1 - (kF + baDeltaLength)) / 2; // If this forward path overlaps the reverse path in this diagonal,\n // then this is the middle change of the index intervals.\n\n if (iR <= iMaxR && aIndexesR[iR] - 1 <= aLast) {\n // Unlike the Myers algorithm which finds only the middle “snake”\n // this package can find two common subsequences per division.\n // Last point of previous path segment is on an adjacent diagonal.\n const bLastPrev = bF + aLastPrev - (insert ? kF + 1 : kF - 1); // Because of invariant that intervals preceding the middle change\n // cannot have common items at the end,\n // move in reverse direction along a diagonal of common items.\n\n const nCommonR = countCommonItemsR(\n aStart,\n aLastPrev,\n bStart,\n bLastPrev,\n isCommon\n );\n const aIndexPrevFirst = aLastPrev - nCommonR;\n const bIndexPrevFirst = bLastPrev - nCommonR;\n const aEndPreceding = aIndexPrevFirst + 1;\n const bEndPreceding = bIndexPrevFirst + 1;\n division.nChangePreceding = d - 1;\n\n if (d - 1 === aEndPreceding + bEndPreceding - aStart - bStart) {\n // Optimization: number of preceding changes in forward direction\n // is equal to number of items in preceding interval,\n // therefore it cannot contain any common items.\n division.aEndPreceding = aStart;\n division.bEndPreceding = bStart;\n } else {\n division.aEndPreceding = aEndPreceding;\n division.bEndPreceding = bEndPreceding;\n }\n\n division.nCommonPreceding = nCommonR;\n\n if (nCommonR !== 0) {\n division.aCommonPreceding = aEndPreceding;\n division.bCommonPreceding = bEndPreceding;\n }\n\n division.nCommonFollowing = nCommonF;\n\n if (nCommonF !== 0) {\n division.aCommonFollowing = aFirst + 1;\n division.bCommonFollowing = bFirst + 1;\n }\n\n const aStartFollowing = aLast + 1;\n const bStartFollowing = bFirst + nCommonF + 1;\n division.nChangeFollowing = d - 1;\n\n if (d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing) {\n // Optimization: number of changes in reverse direction\n // is equal to number of items in following interval,\n // therefore it cannot contain any common items.\n division.aStartFollowing = aEnd;\n division.bStartFollowing = bEnd;\n } else {\n division.aStartFollowing = aStartFollowing;\n division.bStartFollowing = bStartFollowing;\n }\n\n return true;\n }\n }\n }\n\n return false;\n}; // A complete function to extend reverse paths from (d - 1) to d changes.\n// Return true if a path overlaps forward path of d changes in its diagonal.\n\nconst extendOverlappablePathsR = (\n d,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n iMaxF,\n aIndexesR,\n iMaxR,\n division\n) => {\n const bR = bEnd - aEnd; // bIndex = bR + aIndex - kR\n\n const aLength = aEnd - aStart;\n const bLength = bEnd - bStart;\n const baDeltaLength = bLength - aLength; // kR = kF + baDeltaLength\n // Range of diagonals in which forward and reverse paths might overlap.\n\n const kMinOverlapR = baDeltaLength - d; // -d <= kF\n\n const kMaxOverlapR = baDeltaLength + d; // kF <= d\n\n let aIndexPrev1 = NOT_YET_SET; // prev value of [iR - 1] in next iteration\n // Optimization: skip diagonals in which paths cannot ever overlap.\n\n const nR = d < iMaxR ? d : iMaxR; // The diagonals kR = d - 2 * iR are odd when d is odd and even when d is even.\n\n for (let iR = 0, kR = d; iR <= nR; iR += 1, kR -= 2) {\n // To get first point of path segment, move one change in reverse direction\n // from last point of previous path segment in an adjacent diagonal.\n // In first iteration when iR === 0 and kR === d always insert.\n // In last possible iteration when iR === d and kR === -d always delete.\n const insert = iR === 0 || (iR !== d && aIndexesR[iR] < aIndexPrev1);\n const aLastPrev = insert ? aIndexesR[iR] : aIndexPrev1;\n const aFirst = insert\n ? aLastPrev // vertical to insert from b\n : aLastPrev - 1; // horizontal to delete from a\n // To get last point of path segment, move along diagonal of common items.\n\n const bFirst = bR + aFirst - kR;\n const nCommonR = countCommonItemsR(\n aStart,\n aFirst - 1,\n bStart,\n bFirst - 1,\n isCommon\n );\n const aLast = aFirst - nCommonR;\n aIndexPrev1 = aIndexesR[iR];\n aIndexesR[iR] = aLast;\n\n if (kMinOverlapR <= kR && kR <= kMaxOverlapR) {\n // Solve for iF of forward path with d changes in diagonal kR:\n // kF = kR - baDeltaLength\n // kF = 2 * iF - d\n const iF = (d + (kR - baDeltaLength)) / 2; // If this reverse path overlaps the forward path in this diagonal,\n // then this is a middle change of the index intervals.\n\n if (iF <= iMaxF && aLast - 1 <= aIndexesF[iF]) {\n const bLast = bFirst - nCommonR;\n division.nChangePreceding = d;\n\n if (d === aLast + bLast - aStart - bStart) {\n // Optimization: number of changes in reverse direction\n // is equal to number of items in preceding interval,\n // therefore it cannot contain any common items.\n division.aEndPreceding = aStart;\n division.bEndPreceding = bStart;\n } else {\n division.aEndPreceding = aLast;\n division.bEndPreceding = bLast;\n }\n\n division.nCommonPreceding = nCommonR;\n\n if (nCommonR !== 0) {\n // The last point of reverse path segment is start of common subsequence.\n division.aCommonPreceding = aLast;\n division.bCommonPreceding = bLast;\n }\n\n division.nChangeFollowing = d - 1;\n\n if (d === 1) {\n // There is no previous path segment.\n division.nCommonFollowing = 0;\n division.aStartFollowing = aEnd;\n division.bStartFollowing = bEnd;\n } else {\n // Unlike the Myers algorithm which finds only the middle “snake”\n // this package can find two common subsequences per division.\n // Last point of previous path segment is on an adjacent diagonal.\n const bLastPrev = bR + aLastPrev - (insert ? kR - 1 : kR + 1); // Because of invariant that intervals following the middle change\n // cannot have common items at the start,\n // move in forward direction along a diagonal of common items.\n\n const nCommonF = countCommonItemsF(\n aLastPrev,\n aEnd,\n bLastPrev,\n bEnd,\n isCommon\n );\n division.nCommonFollowing = nCommonF;\n\n if (nCommonF !== 0) {\n // The last point of reverse path segment is start of common subsequence.\n division.aCommonFollowing = aLastPrev;\n division.bCommonFollowing = bLastPrev;\n }\n\n const aStartFollowing = aLastPrev + nCommonF; // aFirstPrev\n\n const bStartFollowing = bLastPrev + nCommonF; // bFirstPrev\n\n if (d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing) {\n // Optimization: number of changes in forward direction\n // is equal to number of items in following interval,\n // therefore it cannot contain any common items.\n division.aStartFollowing = aEnd;\n division.bStartFollowing = bEnd;\n } else {\n division.aStartFollowing = aStartFollowing;\n division.bStartFollowing = bStartFollowing;\n }\n }\n\n return true;\n }\n }\n }\n\n return false;\n}; // Given index intervals and input function to compare items at indexes,\n// divide at the middle change.\n//\n// DO NOT CALL if start === end, because interval cannot contain common items\n// and because this function will throw the “no overlap” error.\n\nconst divide = (\n nChange,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n aIndexesR,\n division // output\n) => {\n const bF = bStart - aStart; // bIndex = bF + aIndex - kF\n\n const bR = bEnd - aEnd; // bIndex = bR + aIndex - kR\n\n const aLength = aEnd - aStart;\n const bLength = bEnd - bStart; // Because graph has square or portrait orientation,\n // length difference is minimum number of items to insert from b.\n // Corresponding forward and reverse diagonals in graph\n // depend on length difference of the sequences:\n // kF = kR - baDeltaLength\n // kR = kF + baDeltaLength\n\n const baDeltaLength = bLength - aLength; // Optimization: max diagonal in graph intersects corner of shorter side.\n\n let iMaxF = aLength;\n let iMaxR = aLength; // Initialize no changes yet in forward or reverse direction:\n\n aIndexesF[0] = aStart - 1; // at open start of interval, outside closed start\n\n aIndexesR[0] = aEnd; // at open end of interval\n\n if (baDeltaLength % 2 === 0) {\n // The number of changes in paths is 2 * d if length difference is even.\n const dMin = (nChange || baDeltaLength) / 2;\n const dMax = (aLength + bLength) / 2;\n\n for (let d = 1; d <= dMax; d += 1) {\n iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);\n\n if (d < dMin) {\n iMaxR = extendPathsR(d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR);\n } else if (\n // If a reverse path overlaps a forward path in the same diagonal,\n // return a division of the index intervals at the middle change.\n extendOverlappablePathsR(\n d,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n iMaxF,\n aIndexesR,\n iMaxR,\n division\n )\n ) {\n return;\n }\n }\n } else {\n // The number of changes in paths is 2 * d - 1 if length difference is odd.\n const dMin = ((nChange || baDeltaLength) + 1) / 2;\n const dMax = (aLength + bLength + 1) / 2; // Unroll first half iteration so loop extends the relevant pairs of paths.\n // Because of invariant that intervals have no common items at start or end,\n // and limitation not to call divide with empty intervals,\n // therefore it cannot be called if a forward path with one change\n // would overlap a reverse path with no changes, even if dMin === 1.\n\n let d = 1;\n iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);\n\n for (d += 1; d <= dMax; d += 1) {\n iMaxR = extendPathsR(\n d - 1,\n aStart,\n bStart,\n bR,\n isCommon,\n aIndexesR,\n iMaxR\n );\n\n if (d < dMin) {\n iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);\n } else if (\n // If a forward path overlaps a reverse path in the same diagonal,\n // return a division of the index intervals at the middle change.\n extendOverlappablePathsF(\n d,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n iMaxF,\n aIndexesR,\n iMaxR,\n division\n )\n ) {\n return;\n }\n }\n }\n /* istanbul ignore next */\n\n throw new Error(\n `${pkg}: no overlap aStart=${aStart} aEnd=${aEnd} bStart=${bStart} bEnd=${bEnd}`\n );\n}; // Given index intervals and input function to compare items at indexes,\n// return by output function the number of adjacent items and starting indexes\n// of each common subsequence. Divide and conquer with only linear space.\n//\n// The index intervals are half open [start, end) like array slice method.\n// DO NOT CALL if start === end, because interval cannot contain common items\n// and because divide function will throw the “no overlap” error.\n\nconst findSubsequences = (\n nChange,\n aStart,\n aEnd,\n bStart,\n bEnd,\n transposed,\n callbacks,\n aIndexesF,\n aIndexesR,\n division // temporary memory, not input nor output\n) => {\n if (bEnd - bStart < aEnd - aStart) {\n // Transpose graph so it has portrait instead of landscape orientation.\n // Always compare shorter to longer sequence for consistency and optimization.\n transposed = !transposed;\n\n if (transposed && callbacks.length === 1) {\n // Lazily wrap callback functions to swap args if graph is transposed.\n const _callbacks$ = callbacks[0],\n foundSubsequence = _callbacks$.foundSubsequence,\n isCommon = _callbacks$.isCommon;\n callbacks[1] = {\n foundSubsequence: (function(_foundSubsequence) {\n function foundSubsequence(_x, _x2, _x3) {\n return _foundSubsequence.apply(this, arguments);\n }\n\n foundSubsequence.toString = function() {\n return _foundSubsequence.toString();\n };\n\n return foundSubsequence;\n })((nCommon, bCommon, aCommon) => {\n foundSubsequence(nCommon, aCommon, bCommon);\n }),\n isCommon: (function(_isCommon) {\n function isCommon(_x4, _x5) {\n return _isCommon.apply(this, arguments);\n }\n\n isCommon.toString = function() {\n return _isCommon.toString();\n };\n\n return isCommon;\n })((bIndex, aIndex) => isCommon(aIndex, bIndex))\n };\n }\n\n const tStart = aStart;\n const tEnd = aEnd;\n aStart = bStart;\n aEnd = bEnd;\n bStart = tStart;\n bEnd = tEnd;\n }\n\n const _callbacks = callbacks[transposed ? 1 : 0],\n foundSubsequence = _callbacks.foundSubsequence,\n isCommon = _callbacks.isCommon; // Divide the index intervals at the middle change.\n\n divide(\n nChange,\n aStart,\n aEnd,\n bStart,\n bEnd,\n isCommon,\n aIndexesF,\n aIndexesR,\n division\n );\n const nChangePreceding = division.nChangePreceding,\n aEndPreceding = division.aEndPreceding,\n bEndPreceding = division.bEndPreceding,\n nCommonPreceding = division.nCommonPreceding,\n aCommonPreceding = division.aCommonPreceding,\n bCommonPreceding = division.bCommonPreceding,\n nCommonFollowing = division.nCommonFollowing,\n aCommonFollowing = division.aCommonFollowing,\n bCommonFollowing = division.bCommonFollowing,\n nChangeFollowing = division.nChangeFollowing,\n aStartFollowing = division.aStartFollowing,\n bStartFollowing = division.bStartFollowing; // Unless either index interval is empty, they might contain common items.\n\n if (aStart < aEndPreceding && bStart < bEndPreceding) {\n // Recursely find and return common subsequences preceding the division.\n findSubsequences(\n nChangePreceding,\n aStart,\n aEndPreceding,\n bStart,\n bEndPreceding,\n transposed,\n callbacks,\n aIndexesF,\n aIndexesR,\n division\n );\n } // Return common subsequences that are adjacent to the middle change.\n\n if (nCommonPreceding !== 0) {\n foundSubsequence(nCommonPreceding, aCommonPreceding, bCommonPreceding);\n }\n\n if (nCommonFollowing !== 0) {\n foundSubsequence(nCommonFollowing, aCommonFollowing, bCommonFollowing);\n } // Unless either index interval is empty, they might contain common items.\n\n if (aStartFollowing < aEnd && bStartFollowing < bEnd) {\n // Recursely find and return common subsequences following the division.\n findSubsequences(\n nChangeFollowing,\n aStartFollowing,\n aEnd,\n bStartFollowing,\n bEnd,\n transposed,\n callbacks,\n aIndexesF,\n aIndexesR,\n division\n );\n }\n};\n\nconst validateLength = (name, arg) => {\n const type = typeof arg;\n\n if (type !== 'number') {\n throw new TypeError(`${pkg}: ${name} typeof ${type} is not a number`);\n }\n\n if (!Number.isSafeInteger(arg)) {\n throw new RangeError(`${pkg}: ${name} value ${arg} is not a safe integer`);\n }\n\n if (arg < 0) {\n throw new RangeError(`${pkg}: ${name} value ${arg} is a negative integer`);\n }\n};\n\nconst validateCallback = (name, arg) => {\n const type = typeof arg;\n\n if (type !== 'function') {\n throw new TypeError(`${pkg}: ${name} typeof ${type} is not a function`);\n }\n}; // Compare items in two sequences to find a longest common subsequence.\n// Given lengths of sequences and input function to compare items at indexes,\n// return by output function the number of adjacent items and starting indexes\n// of each common subsequence.\n\nvar _default = (aLength, bLength, isCommon, foundSubsequence) => {\n validateLength('aLength', aLength);\n validateLength('bLength', bLength);\n validateCallback('isCommon', isCommon);\n validateCallback('foundSubsequence', foundSubsequence); // Count common items from the start in the forward direction.\n\n const nCommonF = countCommonItemsF(0, aLength, 0, bLength, isCommon);\n\n if (nCommonF !== 0) {\n foundSubsequence(nCommonF, 0, 0);\n } // Unless both sequences consist of common items only,\n // find common items in the half-trimmed index intervals.\n\n if (aLength !== nCommonF || bLength !== nCommonF) {\n // Invariant: intervals do not have common items at the start.\n // The start of an index interval is closed like array slice method.\n const aStart = nCommonF;\n const bStart = nCommonF; // Count common items from the end in the reverse direction.\n\n const nCommonR = countCommonItemsR(\n aStart,\n aLength - 1,\n bStart,\n bLength - 1,\n isCommon\n ); // Invariant: intervals do not have common items at the end.\n // The end of an index interval is open like array slice method.\n\n const aEnd = aLength - nCommonR;\n const bEnd = bLength - nCommonR; // Unless one sequence consists of common items only,\n // therefore the other trimmed index interval consists of changes only,\n // find common items in the trimmed index intervals.\n\n const nCommonFR = nCommonF + nCommonR;\n\n if (aLength !== nCommonFR && bLength !== nCommonFR) {\n const nChange = 0; // number of change items is not yet known\n\n const transposed = false; // call the original unwrapped functions\n\n const callbacks = [\n {\n foundSubsequence,\n isCommon\n }\n ]; // Indexes in sequence a of last points in furthest reaching paths\n // from outside the start at top left in the forward direction:\n\n const aIndexesF = [NOT_YET_SET]; // from the end at bottom right in the reverse direction:\n\n const aIndexesR = [NOT_YET_SET]; // Initialize one object as output of all calls to divide function.\n\n const division = {\n aCommonFollowing: NOT_YET_SET,\n aCommonPreceding: NOT_YET_SET,\n aEndPreceding: NOT_YET_SET,\n aStartFollowing: NOT_YET_SET,\n bCommonFollowing: NOT_YET_SET,\n bCommonPreceding: NOT_YET_SET,\n bEndPreceding: NOT_YET_SET,\n bStartFollowing: NOT_YET_SET,\n nChangeFollowing: NOT_YET_SET,\n nChangePreceding: NOT_YET_SET,\n nCommonFollowing: NOT_YET_SET,\n nCommonPreceding: NOT_YET_SET\n }; // Find and return common subsequences in the trimmed index intervals.\n\n findSubsequences(\n nChange,\n aStart,\n aEnd,\n bStart,\n bEnd,\n transposed,\n callbacks,\n aIndexesF,\n aIndexesR,\n division\n );\n }\n\n if (nCommonR !== 0) {\n foundSubsequence(nCommonR, aEnd, bEnd);\n }\n }\n};\n\nexports.default = _default;\n","'use strict';\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst returnInput = str => str;\n\nconst allColorsAsFunc = Object.keys(_ansiStyles.default)\n .map(style => ({\n [style]: returnInput\n }))\n .reduce((acc, cur) => Object.assign(acc, cur));\nObject.keys(allColorsAsFunc)\n .map(color => allColorsAsFunc[color])\n .forEach(style => {\n Object.assign(style, allColorsAsFunc);\n Object.assign(returnInput, style);\n });\nmodule.exports = allColorsAsFunc;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {equals, fnNameFor, hasProperty, isA, isUndefined} from './jasmineUtils';\n\nimport {emptyObject} from './utils';\n\nexport class AsymmetricMatcher<T> {\n protected sample: T;\n $$typeof: symbol;\n inverse?: boolean;\n\n constructor(sample: T) {\n this.$$typeof = Symbol.for('jest.asymmetricMatcher');\n this.sample = sample;\n }\n}\n\nclass Any extends AsymmetricMatcher<any> {\n constructor(sample: unknown) {\n if (typeof sample === 'undefined') {\n throw new TypeError(\n 'any() expects to be passed a constructor function. ' +\n 'Please pass one or use anything() to match any object.',\n );\n }\n super(sample);\n }\n\n asymmetricMatch(other: unknown) {\n if (this.sample == String) {\n return typeof other == 'string' || other instanceof String;\n }\n\n if (this.sample == Number) {\n return typeof other == 'number' || other instanceof Number;\n }\n\n if (this.sample == Function) {\n return typeof other == 'function' || other instanceof Function;\n }\n\n if (this.sample == Object) {\n return typeof other == 'object';\n }\n\n if (this.sample == Boolean) {\n return typeof other == 'boolean';\n }\n\n return other instanceof this.sample;\n }\n\n toString() {\n return 'Any';\n }\n\n getExpectedType() {\n if (this.sample == String) {\n return 'string';\n }\n\n if (this.sample == Number) {\n return 'number';\n }\n\n if (this.sample == Function) {\n return 'function';\n }\n\n if (this.sample == Object) {\n return 'object';\n }\n\n if (this.sample == Boolean) {\n return 'boolean';\n }\n\n return fnNameFor(this.sample);\n }\n\n toAsymmetricMatcher() {\n return 'Any<' + fnNameFor(this.sample) + '>';\n }\n}\n\nclass Anything extends AsymmetricMatcher<void> {\n asymmetricMatch(other: unknown) {\n return !isUndefined(other) && other !== null;\n }\n\n toString() {\n return 'Anything';\n }\n\n // No getExpectedType method, because it matches either null or undefined.\n\n toAsymmetricMatcher() {\n return 'Anything';\n }\n}\n\nclass ArrayContaining extends AsymmetricMatcher<Array<unknown>> {\n constructor(sample: Array<unknown>, inverse: boolean = false) {\n super(sample);\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: Array<unknown>) {\n if (!Array.isArray(this.sample)) {\n throw new Error(\n `You must provide an array to ${this.toString()}, not '` +\n typeof this.sample +\n \"'.\",\n );\n }\n\n const result =\n this.sample.length === 0 ||\n (Array.isArray(other) &&\n this.sample.every(item =>\n other.some(another => equals(item, another)),\n ));\n\n return this.inverse ? !result : result;\n }\n\n toString() {\n return `Array${this.inverse ? 'Not' : ''}Containing`;\n }\n\n getExpectedType() {\n return 'array';\n }\n}\n\nclass ObjectContaining extends AsymmetricMatcher<Record<string, any>> {\n constructor(sample: Record<string, any>, inverse: boolean = false) {\n super(sample);\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: any) {\n if (typeof this.sample !== 'object') {\n throw new Error(\n `You must provide an object to ${this.toString()}, not '` +\n typeof this.sample +\n \"'.\",\n );\n }\n\n if (this.inverse) {\n for (const property in this.sample) {\n if (\n hasProperty(other, property) &&\n equals((this.sample as any)[property], other[property]) &&\n !emptyObject((this.sample as any)[property]) &&\n !emptyObject(other[property])\n ) {\n return false;\n }\n }\n\n return true;\n } else {\n for (const property in this.sample) {\n if (\n !hasProperty(other, property) ||\n !equals((this.sample as any)[property], other[property])\n ) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n toString() {\n return `Object${this.inverse ? 'Not' : ''}Containing`;\n }\n\n getExpectedType() {\n return 'object';\n }\n}\n\nclass StringContaining extends AsymmetricMatcher<string> {\n constructor(sample: string, inverse: boolean = false) {\n if (!isA('String', sample)) {\n throw new Error('Expected is not a string');\n }\n super(sample);\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: string) {\n const result = isA('String', other) && other.includes(this.sample);\n\n return this.inverse ? !result : result;\n }\n\n toString() {\n return `String${this.inverse ? 'Not' : ''}Containing`;\n }\n\n getExpectedType() {\n return 'string';\n }\n}\n\nclass StringMatching extends AsymmetricMatcher<RegExp> {\n constructor(sample: string | RegExp, inverse: boolean = false) {\n if (!isA('String', sample) && !isA('RegExp', sample)) {\n throw new Error('Expected is not a String or a RegExp');\n }\n super(new RegExp(sample));\n\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: string) {\n const result = isA('String', other) && this.sample.test(other);\n\n return this.inverse ? !result : result;\n }\n\n toString() {\n return `String${this.inverse ? 'Not' : ''}Matching`;\n }\n\n getExpectedType() {\n return 'string';\n }\n}\n\nexport const any = (expectedObject: any) => new Any(expectedObject);\nexport const anything = () => new Anything();\nexport const arrayContaining = (sample: Array<unknown>) =>\n new ArrayContaining(sample);\nexport const arrayNotContaining = (sample: Array<unknown>) =>\n new ArrayContaining(sample, true);\nexport const objectContaining = (sample: Record<string, any>) =>\n new ObjectContaining(sample);\nexport const objectNotContaining = (sample: Record<string, any>) =>\n new ObjectContaining(sample, true);\nexport const stringContaining = (expected: string) =>\n new StringContaining(expected);\nexport const stringNotContaining = (expected: string) =>\n new StringContaining(expected, true);\nexport const stringMatching = (expected: string | RegExp) =>\n new StringMatching(expected);\nexport const stringNotMatching = (expected: string | RegExp) =>\n new StringMatching(expected, true);\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {\n EXPECTED_COLOR,\n RECEIVED_COLOR,\n matcherHint,\n pluralize,\n} from 'jest-matcher-utils';\n\nimport {getState, setState} from './jestMatchersObject';\n\nconst resetAssertionsLocalState = () => {\n setState({\n assertionCalls: 0,\n expectedAssertionsNumber: null,\n isExpectingAssertions: false,\n });\n};\n\n// Create and format all errors related to the mismatched number of `expect`\n// calls and reset the matcher's state.\nconst extractExpectedAssertionsErrors = () => {\n const result = [];\n const {\n assertionCalls,\n expectedAssertionsNumber,\n expectedAssertionsNumberError,\n isExpectingAssertions,\n isExpectingAssertionsError,\n } = getState();\n\n resetAssertionsLocalState();\n\n if (\n typeof expectedAssertionsNumber === 'number' &&\n assertionCalls !== expectedAssertionsNumber\n ) {\n const numOfAssertionsExpected = EXPECTED_COLOR(\n pluralize('assertion', expectedAssertionsNumber),\n );\n\n expectedAssertionsNumberError.message =\n matcherHint('.assertions', '', String(expectedAssertionsNumber), {\n isDirectExpectCall: true,\n }) +\n '\\n\\n' +\n `Expected ${numOfAssertionsExpected} to be called but received ` +\n RECEIVED_COLOR(pluralize('assertion call', assertionCalls || 0)) +\n '.';\n\n result.push({\n actual: assertionCalls,\n error: expectedAssertionsNumberError,\n expected: expectedAssertionsNumber,\n });\n }\n if (isExpectingAssertions && assertionCalls === 0) {\n const expected = EXPECTED_COLOR('at least one assertion');\n const received = RECEIVED_COLOR('received none');\n\n isExpectingAssertionsError.message =\n matcherHint('.hasAssertions', '', '', {\n isDirectExpectCall: true,\n }) +\n '\\n\\n' +\n `Expected ${expected} to be called but ${received}.`;\n\n result.push({\n actual: 'none',\n error: isExpectingAssertionsError,\n expected: 'at least one',\n });\n }\n\n return result;\n};\n\nexport default extractExpectedAssertionsErrors;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport * as matcherUtils from 'jest-matcher-utils';\nimport {\n AsyncExpectationResult,\n SyncExpectationResult,\n ExpectationResult,\n Matchers as MatcherInterface,\n MatcherState as JestMatcherState,\n MatchersObject,\n RawMatcherFn,\n ThrowingMatcherFn,\n PromiseMatcherFn,\n Expect,\n} from './types';\n\nimport {iterableEquality, subsetEquality} from './utils';\nimport matchers from './matchers';\nimport spyMatchers from './spyMatchers';\nimport toThrowMatchers, {\n createMatcher as createThrowMatcher,\n} from './toThrowMatchers';\nimport {equals} from './jasmineUtils';\nimport {\n any,\n anything,\n arrayContaining,\n arrayNotContaining,\n objectContaining,\n objectNotContaining,\n stringContaining,\n stringNotContaining,\n stringMatching,\n stringNotMatching,\n} from './asymmetricMatchers';\nimport {\n INTERNAL_MATCHER_FLAG,\n getState,\n setState,\n getMatchers,\n setMatchers,\n} from './jestMatchersObject';\nimport extractExpectedAssertionsErrors from './extractExpectedAssertionsErrors';\n\nclass JestAssertionError extends Error {\n matcherResult?: SyncExpectationResult;\n}\n\nconst isPromise = <T extends any>(obj: any): obj is PromiseLike<T> =>\n !!obj &&\n (typeof obj === 'object' || typeof obj === 'function') &&\n typeof obj.then === 'function';\n\nconst createToThrowErrorMatchingSnapshotMatcher = function(\n matcher: RawMatcherFn,\n) {\n return function(\n this: JestMatcherState,\n received: any,\n testNameOrInlineSnapshot?: string,\n ) {\n return matcher.apply(this, [received, testNameOrInlineSnapshot, true]);\n };\n};\n\nconst getPromiseMatcher = (name: string, matcher: any) => {\n if (name === 'toThrow' || name === 'toThrowError') {\n return createThrowMatcher(name, true);\n } else if (\n name === 'toThrowErrorMatchingSnapshot' ||\n name === 'toThrowErrorMatchingInlineSnapshot'\n ) {\n return createToThrowErrorMatchingSnapshotMatcher(matcher);\n }\n\n return null;\n};\n\nconst expect: any = (actual: any, ...rest: Array<any>) => {\n if (rest.length !== 0) {\n throw new Error('Expect takes at most one argument.');\n }\n\n const allMatchers = getMatchers();\n const expectation: any = {\n not: {},\n rejects: {not: {}},\n resolves: {not: {}},\n };\n\n const err = new JestAssertionError();\n\n Object.keys(allMatchers).forEach(name => {\n const matcher = allMatchers[name];\n const promiseMatcher = getPromiseMatcher(name, matcher) || matcher;\n expectation[name] = makeThrowingMatcher(matcher, false, '', actual);\n expectation.not[name] = makeThrowingMatcher(matcher, true, '', actual);\n\n expectation.resolves[name] = makeResolveMatcher(\n name,\n promiseMatcher,\n false,\n actual,\n err,\n );\n expectation.resolves.not[name] = makeResolveMatcher(\n name,\n promiseMatcher,\n true,\n actual,\n err,\n );\n\n expectation.rejects[name] = makeRejectMatcher(\n name,\n promiseMatcher,\n false,\n actual,\n err,\n );\n expectation.rejects.not[name] = makeRejectMatcher(\n name,\n promiseMatcher,\n true,\n actual,\n err,\n );\n });\n\n return expectation;\n};\n\nconst getMessage = (message?: () => string) =>\n (message && message()) ||\n matcherUtils.RECEIVED_COLOR('No message was specified for this matcher.');\n\nconst makeResolveMatcher = (\n matcherName: string,\n matcher: RawMatcherFn,\n isNot: boolean,\n actual: Promise<any>,\n outerErr: JestAssertionError,\n): PromiseMatcherFn => (...args) => {\n const options = {\n isNot,\n promise: 'resolves',\n };\n\n if (!isPromise(actual)) {\n throw new JestAssertionError(\n matcherUtils.matcherErrorMessage(\n matcherUtils.matcherHint(matcherName, undefined, '', options),\n `${matcherUtils.RECEIVED_COLOR('received')} value must be a promise`,\n matcherUtils.printWithType(\n 'Received',\n actual,\n matcherUtils.printReceived,\n ),\n ),\n );\n }\n\n const innerErr = new JestAssertionError();\n\n return actual.then(\n result =>\n makeThrowingMatcher(matcher, isNot, 'resolves', result, innerErr).apply(\n null,\n args,\n ),\n reason => {\n outerErr.message =\n matcherUtils.matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received promise rejected instead of resolved\\n` +\n `Rejected to value: ${matcherUtils.printReceived(reason)}`;\n return Promise.reject(outerErr);\n },\n );\n};\n\nconst makeRejectMatcher = (\n matcherName: string,\n matcher: RawMatcherFn,\n isNot: boolean,\n actual: Promise<any>,\n outerErr: JestAssertionError,\n): PromiseMatcherFn => (...args) => {\n const options = {\n isNot,\n promise: 'rejects',\n };\n\n if (!isPromise(actual)) {\n throw new JestAssertionError(\n matcherUtils.matcherErrorMessage(\n matcherUtils.matcherHint(matcherName, undefined, '', options),\n `${matcherUtils.RECEIVED_COLOR('received')} value must be a promise`,\n matcherUtils.printWithType(\n 'Received',\n actual,\n matcherUtils.printReceived,\n ),\n ),\n );\n }\n\n const innerErr = new JestAssertionError();\n\n return actual.then(\n result => {\n outerErr.message =\n matcherUtils.matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received promise resolved instead of rejected\\n` +\n `Resolved to value: ${matcherUtils.printReceived(result)}`;\n return Promise.reject(outerErr);\n },\n reason =>\n makeThrowingMatcher(matcher, isNot, 'rejects', reason, innerErr).apply(\n null,\n args,\n ),\n );\n};\n\nconst makeThrowingMatcher = (\n matcher: RawMatcherFn,\n isNot: boolean,\n promise: string,\n actual: any,\n err?: JestAssertionError,\n): ThrowingMatcherFn =>\n function throwingMatcher(...args): any {\n let throws = true;\n const utils = {...matcherUtils, iterableEquality, subsetEquality};\n\n const matcherContext: JestMatcherState = {\n // When throws is disabled, the matcher will not throw errors during test\n // execution but instead add them to the global matcher state. If a\n // matcher throws, test execution is normally stopped immediately. The\n // snapshot matcher uses it because we want to log all snapshot\n // failures in a test.\n dontThrow: () => (throws = false),\n ...getState(),\n equals,\n error: err,\n isNot,\n promise,\n utils,\n };\n\n const processResult = (\n result: SyncExpectationResult,\n asyncError?: JestAssertionError,\n ) => {\n _validateResult(result);\n\n getState().assertionCalls++;\n\n if ((result.pass && isNot) || (!result.pass && !isNot)) {\n // XOR\n const message = getMessage(result.message);\n let error;\n\n if (err) {\n error = err;\n error.message = message;\n } else if (asyncError) {\n error = asyncError;\n error.message = message;\n } else {\n error = new JestAssertionError(message);\n\n // Try to remove this function from the stack trace frame.\n // Guard for some environments (browsers) that do not support this feature.\n if (Error.captureStackTrace) {\n Error.captureStackTrace(error, throwingMatcher);\n }\n }\n // Passing the result of the matcher with the error so that a custom\n // reporter could access the actual and expected objects of the result\n // for example in order to display a custom visual diff\n error.matcherResult = result;\n\n if (throws) {\n throw error;\n } else {\n getState().suppressedErrors.push(error);\n }\n }\n };\n\n const handlError = (error: Error) => {\n if (\n (matcher as any)[INTERNAL_MATCHER_FLAG] === true &&\n !(error instanceof JestAssertionError) &&\n error.name !== 'PrettyFormatPluginError' &&\n // Guard for some environments (browsers) that do not support this feature.\n Error.captureStackTrace\n ) {\n // Try to remove this and deeper functions from the stack trace frame.\n Error.captureStackTrace(error, throwingMatcher);\n }\n throw error;\n };\n\n let potentialResult: ExpectationResult;\n\n try {\n potentialResult = matcher.apply(\n matcherContext,\n ([actual] as any).concat(args),\n );\n\n if (isPromise(potentialResult)) {\n const asyncResult = potentialResult as AsyncExpectationResult;\n const asyncError = new JestAssertionError();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(asyncError, throwingMatcher);\n }\n\n return asyncResult\n .then(aResult => processResult(aResult, asyncError))\n .catch(error => handlError(error));\n } else {\n const syncResult = potentialResult as SyncExpectationResult;\n\n return processResult(syncResult);\n }\n } catch (error) {\n return handlError(error);\n }\n };\n\nexpect.extend = (matchers: MatchersObject): void =>\n setMatchers(matchers, false, expect as any);\n\nexpect.anything = anything;\nexpect.any = any;\n\nexpect.not = {\n arrayContaining: arrayNotContaining,\n objectContaining: objectNotContaining,\n stringContaining: stringNotContaining,\n stringMatching: stringNotMatching,\n};\n\nexpect.objectContaining = objectContaining;\nexpect.arrayContaining = arrayContaining;\nexpect.stringContaining = stringContaining;\nexpect.stringMatching = stringMatching;\n\nconst _validateResult = (result: any) => {\n if (\n typeof result !== 'object' ||\n typeof result.pass !== 'boolean' ||\n (result.message &&\n (typeof result.message !== 'string' &&\n typeof result.message !== 'function'))\n ) {\n throw new Error(\n 'Unexpected return from a matcher function.\\n' +\n 'Matcher functions should ' +\n 'return an object in the following format:\\n' +\n ' {message?: string | function, pass: boolean}\\n' +\n `'${matcherUtils.stringify(result)}' was returned`,\n );\n }\n};\n\nfunction assertions(expected: number) {\n const error = new Error();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(error, assertions);\n }\n\n getState().expectedAssertionsNumber = expected;\n getState().expectedAssertionsNumberError = error;\n}\nfunction hasAssertions(...args: Array<any>) {\n const error = new Error();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(error, hasAssertions);\n }\n\n matcherUtils.ensureNoExpected(args[0], '.hasAssertions');\n getState().isExpectingAssertions = true;\n getState().isExpectingAssertionsError = error;\n}\n\n// add default jest matchers\nsetMatchers(matchers, true, expect as Expect);\nsetMatchers(spyMatchers, true, expect as Expect);\nsetMatchers(toThrowMatchers, true, expect as Expect);\n\nexpect.addSnapshotSerializer = () => void 0;\nexpect.assertions = assertions;\nexpect.hasAssertions = hasAssertions;\nexpect.getState = getState;\nexpect.setState = setState;\nexpect.extractExpectedAssertionsErrors = extractExpectedAssertionsErrors;\n\nconst expectExport = expect as Expect;\n\n// eslint-disable-next-line no-redeclare\nnamespace expectExport {\n export type MatcherState = JestMatcherState;\n export interface Matchers<R> extends MatcherInterface<R> {}\n}\n\nexport = expectExport;\n","/*\nCopyright (c) 2008-2016 Pivotal Labs\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\n\n/* eslint-disable */\n\nimport {Tester} from './types';\n\n// Extracted out of jasmine 2.5.2\nexport function equals(\n a: unknown,\n b: unknown,\n customTesters?: Array<Tester>,\n strictCheck?: boolean,\n): boolean {\n customTesters = customTesters || [];\n return eq(a, b, [], [], customTesters, strictCheck ? hasKey : hasDefinedKey);\n}\n\nconst functionToString = Function.prototype.toString;\n\nfunction isAsymmetric(obj: any) {\n return !!obj && isA('Function', obj.asymmetricMatch);\n}\n\nfunction asymmetricMatch(a: any, b: any) {\n var asymmetricA = isAsymmetric(a),\n asymmetricB = isAsymmetric(b);\n\n if (asymmetricA && asymmetricB) {\n return undefined;\n }\n\n if (asymmetricA) {\n return a.asymmetricMatch(b);\n }\n\n if (asymmetricB) {\n return b.asymmetricMatch(a);\n }\n}\n\n// Equality function lovingly adapted from isEqual in\n// [Underscore](http://underscorejs.org)\nfunction eq(\n a: any,\n b: any,\n aStack: Array<unknown>,\n bStack: Array<unknown>,\n customTesters: Array<Tester>,\n hasKey: any,\n): boolean {\n var result = true;\n\n var asymmetricResult = asymmetricMatch(a, b);\n if (asymmetricResult !== undefined) {\n return asymmetricResult;\n }\n\n for (var i = 0; i < customTesters.length; i++) {\n var customTesterResult = customTesters[i](a, b);\n if (customTesterResult !== undefined) {\n return customTesterResult;\n }\n }\n\n if (a instanceof Error && b instanceof Error) {\n return a.message == b.message;\n }\n\n if (Object.is(a, b)) {\n return true;\n }\n // A strict comparison is necessary because `null == undefined`.\n if (a === null || b === null) {\n return a === b;\n }\n var className = Object.prototype.toString.call(a);\n if (className != Object.prototype.toString.call(b)) {\n return false;\n }\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n return Object.is(Number(a), Number(b));\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return (\n a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase\n );\n }\n if (typeof a != 'object' || typeof b != 'object') {\n return false;\n }\n\n // Use DOM3 method isEqualNode (IE>=9)\n if (isDomNode(a) && isDomNode(b)) {\n return a.isEqualNode(b);\n }\n\n // Used to detect circular references.\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n // circular references at same depth are equal\n // circular reference is not equal to non-circular one\n if (aStack[length] === a) {\n return bStack[length] === b;\n } else if (bStack[length] === b) {\n return false;\n }\n }\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n var size = 0;\n // Recursively compare objects and arrays.\n // Compare array lengths to determine if a deep comparison is necessary.\n if (className == '[object Array]') {\n size = a.length;\n if (size !== b.length) {\n return false;\n }\n\n while (size--) {\n result = eq(a[size], b[size], aStack, bStack, customTesters, hasKey);\n if (!result) {\n return false;\n }\n }\n }\n\n // Deep compare objects.\n var aKeys = keys(a, className == '[object Array]', hasKey),\n key;\n size = aKeys.length;\n\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b, className == '[object Array]', hasKey).length !== size) {\n return false;\n }\n\n while (size--) {\n key = aKeys[size];\n\n // Deep compare each member\n result =\n hasKey(b, key) &&\n eq(a[key], b[key], aStack, bStack, customTesters, hasKey);\n\n if (!result) {\n return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n\n return result;\n}\n\nfunction keys(\n obj: object,\n isArray: boolean,\n hasKey: (obj: object, key: string) => boolean,\n) {\n var allKeys = (function(o) {\n var keys = [];\n for (var key in o) {\n if (hasKey(o, key)) {\n keys.push(key);\n }\n }\n return keys.concat(\n (Object.getOwnPropertySymbols(o) as Array<any>).filter(\n symbol =>\n (Object.getOwnPropertyDescriptor(o, symbol) as any).enumerable,\n ),\n );\n })(obj);\n\n if (!isArray) {\n return allKeys;\n }\n\n var extraKeys = [];\n if (allKeys.length === 0) {\n return allKeys;\n }\n\n for (var x = 0; x < allKeys.length; x++) {\n if (typeof allKeys[x] === 'symbol' || !allKeys[x].match(/^[0-9]+$/)) {\n extraKeys.push(allKeys[x]);\n }\n }\n\n return extraKeys;\n}\n\nfunction hasDefinedKey(obj: any, key: string) {\n return hasKey(obj, key) && obj[key] !== undefined;\n}\n\nfunction hasKey(obj: any, key: string) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport function isA(typeName: string, value: unknown) {\n return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';\n}\n\nfunction isDomNode(obj: any): boolean {\n return (\n obj !== null &&\n typeof obj === 'object' &&\n typeof obj.nodeType === 'number' &&\n typeof obj.nodeName === 'string' &&\n typeof obj.isEqualNode === 'function'\n );\n}\n\nexport function fnNameFor(func: Function) {\n if (func.name) {\n return func.name;\n }\n\n const matches = functionToString\n .call(func)\n .match(/^(?:async)?\\s*function\\s*\\*?\\s*([\\w$]+)\\s*\\(/);\n return matches ? matches[1] : '<anonymous>';\n}\n\nexport function isUndefined(obj: any) {\n return obj === void 0;\n}\n\nfunction getPrototype(obj: object) {\n if (Object.getPrototypeOf) {\n return Object.getPrototypeOf(obj);\n }\n\n if (obj.constructor.prototype == obj) {\n return null;\n }\n\n return obj.constructor.prototype;\n}\n\nexport function hasProperty(obj: object | null, property: string): boolean {\n if (!obj) {\n return false;\n }\n\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n return true;\n }\n\n return hasProperty(getPrototype(obj), property);\n}\n\n// SENTINEL constants are from https://github.com/facebook/immutable-js\nconst IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\nconst IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\nconst IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\nexport function isImmutableUnorderedKeyed(maybeKeyed: any) {\n return !!(\n maybeKeyed &&\n maybeKeyed[IS_KEYED_SENTINEL] &&\n !maybeKeyed[IS_ORDERED_SENTINEL]\n );\n}\n\nexport function isImmutableUnorderedSet(maybeSet: any) {\n return !!(\n maybeSet &&\n maybeSet[IS_SET_SENTINEL] &&\n !maybeSet[IS_ORDERED_SENTINEL]\n );\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {AsymmetricMatcher} from './asymmetricMatchers';\nimport {Expect, MatchersObject, SyncExpectationResult} from './types';\n\n// Global matchers object holds the list of available matchers and\n// the state, that can hold matcher specific values that change over time.\nconst JEST_MATCHERS_OBJECT = Symbol.for('$$jest-matchers-object');\n\n// Notes a built-in/internal Jest matcher.\n// Jest may override the stack trace of Errors thrown by internal matchers.\nexport const INTERNAL_MATCHER_FLAG = Symbol.for('$$jest-internal-matcher');\n\nif (!(global as any)[JEST_MATCHERS_OBJECT]) {\n Object.defineProperty(global, JEST_MATCHERS_OBJECT, {\n value: {\n matchers: Object.create(null),\n state: {\n assertionCalls: 0,\n expectedAssertionsNumber: null,\n isExpectingAssertions: false,\n suppressedErrors: [], // errors that are not thrown immediately.\n },\n },\n });\n}\n\nexport const getState = () => (global as any)[JEST_MATCHERS_OBJECT].state;\n\nexport const setState = (state: object) => {\n Object.assign((global as any)[JEST_MATCHERS_OBJECT].state, state);\n};\n\nexport const getMatchers = () => (global as any)[JEST_MATCHERS_OBJECT].matchers;\n\nexport const setMatchers = (\n matchers: MatchersObject,\n isInternal: boolean,\n expect: Expect,\n) => {\n Object.keys(matchers).forEach(key => {\n const matcher = matchers[key];\n Object.defineProperty(matcher, INTERNAL_MATCHER_FLAG, {\n value: isInternal,\n });\n\n if (!isInternal) {\n // expect is defined\n\n class CustomMatcher extends AsymmetricMatcher<[unknown, unknown]> {\n constructor(inverse: boolean = false, ...sample: [unknown, unknown]) {\n super(sample);\n this.inverse = inverse;\n }\n\n asymmetricMatch(other: unknown) {\n const {pass} = matcher(\n other,\n ...this.sample,\n ) as SyncExpectationResult;\n\n return this.inverse ? !pass : pass;\n }\n\n toString() {\n return `${this.inverse ? 'not.' : ''}${key}`;\n }\n\n getExpectedType() {\n return 'any';\n }\n\n toAsymmetricMatcher() {\n return `${this.toString()}<${this.sample.join(', ')}>`;\n }\n }\n\n expect[key] = (...sample: [unknown, unknown]) =>\n new CustomMatcher(false, ...sample);\n if (!expect.not) {\n expect.not = {};\n }\n expect.not[key] = (...sample: [unknown, unknown]) =>\n new CustomMatcher(true, ...sample);\n }\n });\n\n Object.assign((global as any)[JEST_MATCHERS_OBJECT].matchers, matchers);\n};\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport getType, {isPrimitive} from 'jest-get-type';\nimport {\n DIM_COLOR,\n EXPECTED_COLOR,\n RECEIVED_COLOR,\n SUGGEST_TO_CONTAIN_EQUAL,\n ensureExpectedIsNonNegativeInteger,\n ensureNoExpected,\n ensureNumbers,\n getLabelPrinter,\n matcherErrorMessage,\n matcherHint,\n printReceived,\n printExpected,\n printWithType,\n stringify,\n MatcherHintOptions,\n} from 'jest-matcher-utils';\nimport {MatchersObject, MatcherState} from './types';\nimport {\n printDiffOrStringify,\n printExpectedConstructorName,\n printExpectedConstructorNameNot,\n printReceivedArrayContainExpectedItem,\n printReceivedConstructorName,\n printReceivedConstructorNameNot,\n printReceivedStringContainExpectedResult,\n printReceivedStringContainExpectedSubstring,\n} from './print';\nimport {\n getObjectSubset,\n getPath,\n iterableEquality,\n sparseArrayEquality,\n subsetEquality,\n typeEquality,\n} from './utils';\nimport {equals} from './jasmineUtils';\n\n// Omit colon and one or more spaces, so can call getLabelPrinter.\nconst EXPECTED_LABEL = 'Expected';\nconst RECEIVED_LABEL = 'Received';\nconst EXPECTED_VALUE_LABEL = 'Expected value';\nconst RECEIVED_VALUE_LABEL = 'Received value';\n\nconst toStrictEqualTesters = [\n iterableEquality,\n typeEquality,\n sparseArrayEquality,\n];\n\ntype ContainIterable =\n | Array<unknown>\n | Set<unknown>\n | NodeListOf<any>\n | DOMTokenList\n | HTMLCollectionOf<any>;\n\nconst matchers: MatchersObject = {\n toBe(this: MatcherState, received: unknown, expected: unknown) {\n const matcherName = 'toBe';\n const options: MatcherHintOptions = {\n comment: 'Object.is equality',\n isNot: this.isNot,\n promise: this.promise,\n };\n\n const pass = Object.is(received, expected);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}`\n : () => {\n const expectedType = getType(expected);\n\n let deepEqualityName = null;\n if (expectedType !== 'map' && expectedType !== 'set') {\n // If deep equality passes when referential identity fails,\n // but exclude map and set until review of their equality logic.\n if (equals(received, expected, toStrictEqualTesters, true)) {\n deepEqualityName = 'toStrictEqual';\n } else if (equals(received, expected, [iterableEquality])) {\n deepEqualityName = 'toEqual';\n }\n }\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n (deepEqualityName !== null\n ? DIM_COLOR(\n `If it should pass with deep equality, replace \"${matcherName}\" with \"${deepEqualityName}\"`,\n ) + '\\n\\n'\n : '') +\n printDiffOrStringify(\n expected,\n received,\n EXPECTED_LABEL,\n RECEIVED_LABEL,\n this.expand,\n )\n );\n };\n\n // Passing the actual and expected objects so that a custom reporter\n // could access them, for example in order to display a custom visual diff,\n // or create a different error message\n return {actual: received, expected, message, name: matcherName, pass};\n },\n\n toBeCloseTo(\n this: MatcherState,\n received: number,\n expected: number,\n precision: number = 2,\n ) {\n const matcherName = 'toBeCloseTo';\n const secondArgument = arguments.length === 3 ? 'precision' : undefined;\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n secondArgument,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n let pass = false;\n let expectedDiff = 0;\n let receivedDiff = 0;\n\n if (received === Infinity && expected === Infinity) {\n pass = true; // Infinity - Infinity is NaN\n } else if (received === -Infinity && expected === -Infinity) {\n pass = true; // -Infinity - -Infinity is NaN\n } else {\n expectedDiff = Math.pow(10, -precision) / 2;\n receivedDiff = Math.abs(expected - received);\n pass = receivedDiff < expectedDiff;\n }\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}\\n` +\n (receivedDiff === 0\n ? ''\n : `Received: ${printReceived(received)}\\n` +\n '\\n' +\n `Expected precision: ${printExpected(precision)}\\n` +\n `Expected difference: not < ${printExpected(expectedDiff)}\\n` +\n `Received difference: ${printReceived(receivedDiff)}`)\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: ${printExpected(expected)}\\n` +\n `Received: ${printReceived(received)}\\n` +\n '\\n' +\n `Expected precision: ${printExpected(precision)}\\n` +\n `Expected difference: < ${printExpected(expectedDiff)}\\n` +\n `Received difference: ${printReceived(receivedDiff)}`;\n\n return {message, pass};\n },\n\n toBeDefined(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeDefined';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = received !== void 0;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeFalsy(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeFalsy';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = !received;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeGreaterThan(this: MatcherState, received: number, expected: number) {\n const matcherName = 'toBeGreaterThan';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n const pass = received > expected;\n\n const message = () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected:${isNot ? ' not' : ''} > ${printExpected(expected)}\\n` +\n `Received:${isNot ? ' ' : ''} ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeGreaterThanOrEqual(\n this: MatcherState,\n received: number,\n expected: number,\n ) {\n const matcherName = 'toBeGreaterThanOrEqual';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n const pass = received >= expected;\n\n const message = () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected:${isNot ? ' not' : ''} >= ${printExpected(expected)}\\n` +\n `Received:${isNot ? ' ' : ''} ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeInstanceOf(this: MatcherState, received: any, expected: Function) {\n const matcherName = 'toBeInstanceOf';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n\n if (typeof expected !== 'function') {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a function`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n\n const pass = received instanceof expected;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printExpectedConstructorNameNot('Expected constructor', expected) +\n (typeof received.constructor === 'function' &&\n received.constructor !== expected\n ? printReceivedConstructorNameNot(\n 'Received constructor',\n received.constructor,\n expected,\n )\n : '')\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printExpectedConstructorName('Expected constructor', expected) +\n (isPrimitive(received) || Object.getPrototypeOf(received) === null\n ? `\\nReceived value has no prototype\\nReceived value: ${printReceived(\n received,\n )}`\n : typeof received.constructor !== 'function'\n ? `\\nReceived value: ${printReceived(received)}`\n : printReceivedConstructorName(\n 'Received constructor',\n received.constructor,\n ));\n\n return {message, pass};\n },\n\n toBeLessThan(this: MatcherState, received: number, expected: number) {\n const matcherName = 'toBeLessThan';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n const pass = received < expected;\n\n const message = () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected:${isNot ? ' not' : ''} < ${printExpected(expected)}\\n` +\n `Received:${isNot ? ' ' : ''} ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeLessThanOrEqual(this: MatcherState, received: number, expected: number) {\n const matcherName = 'toBeLessThanOrEqual';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n ensureNumbers(received, expected, matcherName, options);\n\n const pass = received <= expected;\n\n const message = () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected:${isNot ? ' not' : ''} <= ${printExpected(expected)}\\n` +\n `Received:${isNot ? ' ' : ''} ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeNaN(this: MatcherState, received: any, expected: void) {\n const matcherName = 'toBeNaN';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = Number.isNaN(received);\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeNull(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeNull';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = received === null;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeTruthy(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeTruthy';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = !!received;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toBeUndefined(this: MatcherState, received: unknown, expected: void) {\n const matcherName = 'toBeUndefined';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n ensureNoExpected(expected, matcherName, options);\n\n const pass = received === void 0;\n\n const message = () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n `Received: ${printReceived(received)}`;\n\n return {message, pass};\n },\n\n toContain(\n this: MatcherState,\n received: ContainIterable | string,\n expected: unknown,\n ) {\n const matcherName = 'toContain';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n comment: 'indexOf',\n isNot,\n promise: this.promise,\n };\n\n if (received == null) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must not be null nor undefined`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n if (typeof received === 'string') {\n const index = received.indexOf(String(expected));\n const pass = index !== -1;\n\n const message = () => {\n const labelExpected = `Expected ${\n typeof expected === 'string' ? 'substring' : 'value'\n }`;\n const labelReceived = 'Received string';\n const printLabel = getLabelPrinter(labelExpected, labelReceived);\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${isNot ? 'not ' : ''}${printExpected(\n expected,\n )}\\n` +\n `${printLabel(labelReceived)}${isNot ? ' ' : ''}${\n isNot\n ? printReceivedStringContainExpectedSubstring(\n received,\n index,\n String(expected).length,\n )\n : printReceived(received)\n }`\n );\n };\n\n return {message, pass};\n }\n\n const indexable = Array.from(received);\n const index = indexable.indexOf(expected);\n const pass = index !== -1;\n\n const message = () => {\n const labelExpected = 'Expected value';\n const labelReceived = `Received ${getType(received)}`;\n const printLabel = getLabelPrinter(labelExpected, labelReceived);\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${isNot ? 'not ' : ''}${printExpected(\n expected,\n )}\\n` +\n `${printLabel(labelReceived)}${isNot ? ' ' : ''}${\n isNot && Array.isArray(received)\n ? printReceivedArrayContainExpectedItem(received, index)\n : printReceived(received)\n }` +\n (!isNot &&\n indexable.findIndex(item =>\n equals(item, expected, [iterableEquality]),\n ) !== -1\n ? `\\n\\n${SUGGEST_TO_CONTAIN_EQUAL}`\n : '')\n );\n };\n\n return {message, pass};\n },\n\n toContainEqual(\n this: MatcherState,\n received: ContainIterable,\n expected: unknown,\n ) {\n const matcherName = 'toContainEqual';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n comment: 'deep equality',\n isNot,\n promise: this.promise,\n };\n\n if (received == null) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must not be null nor undefined`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n const index = Array.from(received).findIndex(item =>\n equals(item, expected, [iterableEquality]),\n );\n const pass = index !== -1;\n\n const message = () => {\n const labelExpected = 'Expected value';\n const labelReceived = `Received ${getType(received)}`;\n const printLabel = getLabelPrinter(labelExpected, labelReceived);\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${isNot ? 'not ' : ''}${printExpected(\n expected,\n )}\\n` +\n `${printLabel(labelReceived)}${isNot ? ' ' : ''}${\n isNot && Array.isArray(received)\n ? printReceivedArrayContainExpectedItem(received, index)\n : printReceived(received)\n }`\n );\n };\n\n return {message, pass};\n },\n\n toEqual(this: MatcherState, received: unknown, expected: unknown) {\n const matcherName = 'toEqual';\n const options: MatcherHintOptions = {\n comment: 'deep equality',\n isNot: this.isNot,\n promise: this.promise,\n };\n\n const pass = equals(received, expected, [iterableEquality]);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}\\n` +\n (stringify(expected) !== stringify(received)\n ? `Received: ${printReceived(received)}`\n : '')\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printDiffOrStringify(\n expected,\n received,\n EXPECTED_LABEL,\n RECEIVED_LABEL,\n this.expand,\n );\n\n // Passing the actual and expected objects so that a custom reporter\n // could access them, for example in order to display a custom visual diff,\n // or create a different error message\n return {actual: received, expected, message, name: matcherName, pass};\n },\n\n toHaveLength(this: MatcherState, received: any, expected: number) {\n const matcherName = 'toHaveLength';\n const isNot = this.isNot;\n const options: MatcherHintOptions = {\n isNot,\n promise: this.promise,\n };\n\n if (\n typeof received !== 'string' &&\n (!received || typeof received.length !== 'number')\n ) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR(\n 'received',\n )} value must have a length property whose value must be a number`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n ensureExpectedIsNonNegativeInteger(expected, matcherName, options);\n\n const pass = received.length === expected;\n\n const message = () => {\n const labelExpected = 'Expected length';\n const labelReceivedLength = 'Received length';\n const labelReceivedValue = `Received ${getType(received)}`;\n const printLabel = getLabelPrinter(\n labelExpected,\n labelReceivedLength,\n labelReceivedValue,\n );\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${isNot ? 'not ' : ''}${printExpected(\n expected,\n )}\\n` +\n (isNot\n ? ''\n : `${printLabel(labelReceivedLength)}${printReceived(\n received.length,\n )}\\n`) +\n `${printLabel(labelReceivedValue)}${isNot ? ' ' : ''}${printReceived(\n received,\n )}`\n );\n };\n\n return {message, pass};\n },\n\n toHaveProperty(\n this: MatcherState,\n received: object,\n expectedPath: string | Array<string>,\n expectedValue?: unknown,\n ) {\n const matcherName = 'toHaveProperty';\n const expectedArgument = 'path';\n const hasValue = arguments.length === 3;\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n secondArgument: hasValue ? 'value' : '',\n };\n\n if (received === null || received === undefined) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${RECEIVED_COLOR('received')} value must not be null nor undefined`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n const expectedPathType = getType(expectedPath);\n\n if (expectedPathType !== 'string' && expectedPathType !== 'array') {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${EXPECTED_COLOR('expected')} path must be a string or array`,\n printWithType('Expected', expectedPath, printExpected),\n ),\n );\n }\n\n const expectedPathLength =\n typeof expectedPath === 'string'\n ? expectedPath.split('.').length\n : expectedPath.length;\n\n if (expectedPathType === 'array' && expectedPathLength === 0) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, expectedArgument, options),\n `${EXPECTED_COLOR('expected')} path must not be an empty array`,\n printWithType('Expected', expectedPath, printExpected),\n ),\n );\n }\n\n const result = getPath(received, expectedPath);\n const {lastTraversedObject, hasEndProp} = result;\n const receivedPath = result.traversedPath;\n const hasCompletePath = receivedPath.length === expectedPathLength;\n const receivedValue = hasCompletePath ? result.value : lastTraversedObject;\n\n const pass = hasValue\n ? equals(result.value, expectedValue, [iterableEquality])\n : Boolean(hasEndProp); // theoretically undefined if empty path\n // Remove type cast if we rewrite getPath as iterative algorithm.\n\n // Delete this unique report if future breaking change\n // removes the edge case that expected value undefined\n // also matches absence of a property with the key path.\n if (pass && !hasCompletePath) {\n const message = () =>\n matcherHint(matcherName, undefined, expectedArgument, options) +\n '\\n\\n' +\n `Expected path: ${printExpected(expectedPath)}\\n` +\n `Received path: ${printReceived(\n expectedPathType === 'array' || receivedPath.length === 0\n ? receivedPath\n : receivedPath.join('.'),\n )}\\n\\n` +\n `Expected value: not ${printExpected(expectedValue)}\\n` +\n `Received value: ${printReceived(receivedValue)}\\n\\n` +\n DIM_COLOR(\n 'Because a positive assertion passes for expected value undefined if the property does not exist, this negative assertion fails unless the property does exist and has a defined value',\n );\n\n return {message, pass};\n }\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, expectedArgument, options) +\n '\\n\\n' +\n (hasValue\n ? `Expected path: ${printExpected(expectedPath)}\\n\\n` +\n `Expected value: not ${printExpected(expectedValue)}` +\n (stringify(expectedValue) !== stringify(receivedValue)\n ? `\\nReceived value: ${printReceived(receivedValue)}`\n : '')\n : `Expected path: not ${printExpected(expectedPath)}\\n\\n` +\n `Received value: ${printReceived(receivedValue)}`)\n : () =>\n matcherHint(matcherName, undefined, expectedArgument, options) +\n '\\n\\n' +\n `Expected path: ${printExpected(expectedPath)}\\n` +\n (hasCompletePath\n ? '\\n' +\n printDiffOrStringify(\n expectedValue,\n receivedValue,\n EXPECTED_VALUE_LABEL,\n RECEIVED_VALUE_LABEL,\n this.expand,\n )\n : `Received path: ${printReceived(\n expectedPathType === 'array' || receivedPath.length === 0\n ? receivedPath\n : receivedPath.join('.'),\n )}\\n\\n` +\n (hasValue\n ? `Expected value: ${printExpected(expectedValue)}\\n`\n : '') +\n `Received value: ${printReceived(receivedValue)}`);\n\n return {message, pass};\n },\n\n toMatch(this: MatcherState, received: string, expected: string | RegExp) {\n const matcherName = 'toMatch';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n\n if (typeof received !== 'string') {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must be a string`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n if (\n !(typeof expected === 'string') &&\n !(expected && typeof expected.test === 'function')\n ) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR(\n 'expected',\n )} value must be a string or regular expression`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n\n const pass =\n typeof expected === 'string'\n ? received.includes(expected)\n : expected.test(received);\n\n const message = pass\n ? () =>\n typeof expected === 'string'\n ? matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected substring: not ${printExpected(expected)}\\n` +\n `Received string: ${printReceivedStringContainExpectedSubstring(\n received,\n received.indexOf(expected),\n expected.length,\n )}`\n : matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected pattern: not ${printExpected(expected)}\\n` +\n `Received string: ${printReceivedStringContainExpectedResult(\n received,\n typeof expected.exec === 'function'\n ? expected.exec(received)\n : null,\n )}`\n : () => {\n const labelExpected = `Expected ${\n typeof expected === 'string' ? 'substring' : 'pattern'\n }`;\n const labelReceived = 'Received string';\n const printLabel = getLabelPrinter(labelExpected, labelReceived);\n\n return (\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `${printLabel(labelExpected)}${printExpected(expected)}\\n` +\n `${printLabel(labelReceived)}${printReceived(received)}`\n );\n };\n\n return {message, pass};\n },\n\n toMatchObject(this: MatcherState, received: object, expected: object) {\n const matcherName = 'toMatchObject';\n const options: MatcherHintOptions = {\n isNot: this.isNot,\n promise: this.promise,\n };\n\n if (typeof received !== 'object' || received === null) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must be a non-null object`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n\n if (typeof expected !== 'object' || expected === null) {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a non-null object`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n\n const pass = equals(received, expected, [iterableEquality, subsetEquality]);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}` +\n (stringify(expected) !== stringify(received)\n ? `\\nReceived: ${printReceived(received)}`\n : '')\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printDiffOrStringify(\n expected,\n getObjectSubset(received, expected),\n EXPECTED_LABEL,\n RECEIVED_LABEL,\n this.expand,\n );\n\n return {message, pass};\n },\n\n toStrictEqual(this: MatcherState, received: unknown, expected: unknown) {\n const matcherName = 'toStrictEqual';\n const options: MatcherHintOptions = {\n comment: 'deep equality',\n isNot: this.isNot,\n promise: this.promise,\n };\n\n const pass = equals(received, expected, toStrictEqualTesters, true);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n `Expected: not ${printExpected(expected)}\\n` +\n (stringify(expected) !== stringify(received)\n ? `Received: ${printReceived(received)}`\n : '')\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printDiffOrStringify(\n expected,\n received,\n EXPECTED_LABEL,\n RECEIVED_LABEL,\n this.expand,\n );\n\n // Passing the actual and expected objects so that a custom reporter\n // could access them, for example in order to display a custom visual diff,\n // or create a different error message\n return {actual: received, expected, message, name: matcherName, pass};\n },\n};\n\nexport default matchers;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport getType, {isPrimitive} from 'jest-get-type';\nimport {\n EXPECTED_COLOR,\n INVERTED_COLOR,\n RECEIVED_COLOR,\n diff,\n getLabelPrinter,\n printExpected,\n printReceived,\n stringify,\n} from 'jest-matcher-utils';\nimport {isOneline} from './utils';\n\n// Format substring but do not enclose in double quote marks.\n// The replacement is compatible with pretty-format package.\nconst printSubstring = (val: string): string => val.replace(/\"|\\\\/g, '\\\\$&');\n\nexport const printReceivedStringContainExpectedSubstring = (\n received: string,\n start: number,\n length: number, // not end\n): string =>\n RECEIVED_COLOR(\n '\"' +\n printSubstring(received.slice(0, start)) +\n INVERTED_COLOR(printSubstring(received.slice(start, start + length))) +\n printSubstring(received.slice(start + length)) +\n '\"',\n );\n\nexport const printReceivedStringContainExpectedResult = (\n received: string,\n result: RegExpExecArray | null,\n): string =>\n result === null\n ? printReceived(received)\n : printReceivedStringContainExpectedSubstring(\n received,\n result.index,\n result[0].length,\n );\n\n// The serialized array is compatible with pretty-format package min option.\n// However, items have default stringify depth (instead of depth - 1)\n// so expected item looks consistent by itself and enclosed in the array.\nexport const printReceivedArrayContainExpectedItem = (\n received: Array<unknown>,\n index: number,\n): string =>\n RECEIVED_COLOR(\n '[' +\n received\n .map((item, i) => {\n const stringified = stringify(item);\n return i === index ? INVERTED_COLOR(stringified) : stringified;\n })\n .join(', ') +\n ']',\n );\n\nconst shouldPrintDiff = (expected: unknown, received: unknown): boolean => {\n const expectedType = getType(expected);\n const receivedType = getType(received);\n\n if (expectedType !== receivedType) {\n return false;\n }\n\n if (isPrimitive(expected)) {\n // Print diff only if both strings have more than one line.\n return expectedType === 'string' && !isOneline(expected, received);\n }\n\n if (\n expectedType === 'date' ||\n expectedType === 'function' ||\n expectedType === 'regexp'\n ) {\n return false;\n }\n\n if (expected instanceof Error && received instanceof Error) {\n return false;\n }\n\n return true;\n};\n\nexport const printDiffOrStringify = (\n expected: unknown,\n received: unknown,\n expectedLabel: string, // include colon and one or more spaces,\n receivedLabel: string, // same as returned by getLabelPrinter\n expand?: boolean, // diff option: true if `--expand` CLI option\n): string => {\n // Cannot use same serialization as shortcut to avoid diff,\n // because stringify (that is, pretty-format with min option)\n // omits constructor name for array or object, too bad so sad :(\n const difference = shouldPrintDiff(expected, received)\n ? diff(expected, received, {\n aAnnotation: expectedLabel,\n bAnnotation: receivedLabel,\n expand,\n }) // string | null\n : null;\n\n // Cannot reuse value of stringify(received) in report string,\n // because printReceived does inverse highlight space at end of line,\n // but RECEIVED_COLOR does not (it refers to a plain chalk method).\n if (\n typeof difference === 'string' &&\n difference.includes('- ' + expectedLabel) &&\n difference.includes('+ ' + receivedLabel)\n ) {\n return difference;\n }\n\n const printLabel = getLabelPrinter(expectedLabel, receivedLabel);\n return (\n `${printLabel(expectedLabel)}${printExpected(expected)}\\n` +\n `${printLabel(receivedLabel)}${\n stringify(expected) === stringify(received)\n ? 'serializes to the same string'\n : printReceived(received)\n }`\n );\n};\n\nexport const printExpectedConstructorName = (\n label: string,\n expected: Function,\n) => printConstructorName(label, expected, false, true) + '\\n';\n\nexport const printExpectedConstructorNameNot = (\n label: string,\n expected: Function,\n) => printConstructorName(label, expected, true, true) + '\\n';\n\nexport const printReceivedConstructorName = (\n label: string,\n received: Function,\n) => printConstructorName(label, received, false, false) + '\\n';\n\n// Do not call function if received is equal to expected.\nexport const printReceivedConstructorNameNot = (\n label: string,\n received: Function,\n expected: Function,\n) =>\n typeof expected.name === 'string' &&\n expected.name.length !== 0 &&\n typeof received.name === 'string' &&\n received.name.length !== 0\n ? printConstructorName(label, received, true, false) +\n ` ${\n Object.getPrototypeOf(received) === expected\n ? 'extends'\n : 'extends … extends'\n } ${EXPECTED_COLOR(expected.name)}` +\n '\\n'\n : printConstructorName(label, received, false, false) + '\\n';\n\nconst printConstructorName = (\n label: string,\n constructor: Function,\n isNot: boolean,\n isExpected: boolean,\n): string =>\n typeof constructor.name !== 'string'\n ? `${label} name is not a string`\n : constructor.name.length === 0\n ? `${label} name is an empty string`\n : `${label}: ${!isNot ? '' : isExpected ? 'not ' : ' '}${\n isExpected\n ? EXPECTED_COLOR(constructor.name)\n : RECEIVED_COLOR(constructor.name)\n }`;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {\n diff,\n ensureExpectedIsNumber,\n ensureNoExpected,\n EXPECTED_COLOR,\n matcherErrorMessage,\n matcherHint,\n pluralize,\n printExpected,\n printReceived,\n printWithType,\n RECEIVED_COLOR,\n} from 'jest-matcher-utils';\nimport {MatchersObject, SyncExpectationResult} from './types';\nimport {equals} from './jasmineUtils';\nimport {iterableEquality, partition, isOneline} from './utils';\n\nconst CALL_PRINT_LIMIT = 3;\nconst RETURN_PRINT_LIMIT = 5;\nconst LAST_CALL_PRINT_LIMIT = 1;\n\nconst createToBeCalledMatcher = (matcherName: string) => (\n received: any,\n expected: unknown,\n): SyncExpectationResult => {\n ensureNoExpected(expected, matcherName);\n ensureMock(received, matcherName);\n\n const receivedIsSpy = isSpy(received);\n const type = receivedIsSpy ? 'spy' : 'mock function';\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n const identifier =\n receivedIsSpy || receivedName === 'jest.fn()'\n ? type\n : `${type} \"${receivedName}\"`;\n const count = receivedIsSpy\n ? received.calls.count()\n : received.mock.calls.length;\n const calls = receivedIsSpy\n ? received.calls.all().map((x: any) => x.args)\n : received.mock.calls;\n const pass = count > 0;\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName, '') +\n '\\n\\n' +\n `Expected ${identifier} not to be called ` +\n formatReceivedCalls(calls, CALL_PRINT_LIMIT, {sameSentence: true})\n : () =>\n matcherHint(matcherName, receivedName, '') +\n '\\n\\n' +\n `Expected ${identifier} to have been called, but it was not called.`;\n\n return {message, pass};\n};\n\nconst createToReturnMatcher = (matcherName: string) => (\n received: any,\n expected: unknown,\n): SyncExpectationResult => {\n ensureNoExpected(expected, matcherName);\n ensureMock(received, matcherName);\n\n const receivedName = received.getMockName();\n const identifier =\n receivedName === 'jest.fn()'\n ? 'mock function'\n : `mock function \"${receivedName}\"`;\n\n // List of return values that correspond only to calls that returned\n const returnValues = received.mock.results\n .filter((result: any) => result.type === 'return')\n .map((result: any) => result.value);\n\n const count = returnValues.length;\n const pass = count > 0;\n\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName, '') +\n '\\n\\n' +\n `Expected ${identifier} not to have returned, but it returned:\\n` +\n ` ${getPrintedReturnValues(returnValues, RETURN_PRINT_LIMIT)}`\n : () =>\n matcherHint(matcherName, receivedName, '') +\n '\\n\\n' +\n `Expected ${identifier} to have returned.`;\n\n return {message, pass};\n};\n\nconst createToBeCalledTimesMatcher = (matcherName: string) => (\n received: any,\n expected: number,\n): SyncExpectationResult => {\n ensureExpectedIsNumber(expected, matcherName);\n ensureMock(received, matcherName);\n\n const receivedIsSpy = isSpy(received);\n const type = receivedIsSpy ? 'spy' : 'mock function';\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n const identifier =\n receivedIsSpy || receivedName === 'jest.fn()'\n ? type\n : `${type} \"${receivedName}\"`;\n const count = receivedIsSpy\n ? received.calls.count()\n : received.mock.calls.length;\n const pass = count === expected;\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName, String(expected)) +\n `\\n\\n` +\n `Expected ${identifier} not to be called ` +\n `${EXPECTED_COLOR(pluralize('time', expected))}, but it was` +\n ` called exactly ${RECEIVED_COLOR(pluralize('time', count))}.`\n : () =>\n matcherHint(matcherName, receivedName, String(expected)) +\n '\\n\\n' +\n `Expected ${identifier} to have been called ` +\n `${EXPECTED_COLOR(pluralize('time', expected))},` +\n ` but it was called ${RECEIVED_COLOR(pluralize('time', count))}.`;\n\n return {message, pass};\n};\n\nconst createToReturnTimesMatcher = (matcherName: string) => (\n received: any,\n expected: number,\n): SyncExpectationResult => {\n ensureExpectedIsNumber(expected, matcherName);\n ensureMock(received, matcherName);\n\n const receivedName = received.getMockName();\n const identifier =\n receivedName === 'jest.fn()'\n ? 'mock function'\n : `mock function \"${receivedName}\"`;\n\n // List of return results that correspond only to calls that returned\n const returnResults = received.mock.results.filter(\n (result: any) => result.type === 'return',\n );\n\n const count = returnResults.length;\n const pass = count === expected;\n\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName, String(expected)) +\n `\\n\\n` +\n `Expected ${identifier} not to have returned ` +\n `${EXPECTED_COLOR(pluralize('time', expected))}, but it` +\n ` returned exactly ${RECEIVED_COLOR(pluralize('time', count))}.`\n : () =>\n matcherHint(matcherName, receivedName, String(expected)) +\n '\\n\\n' +\n `Expected ${identifier} to have returned ` +\n `${EXPECTED_COLOR(pluralize('time', expected))},` +\n ` but it returned ${RECEIVED_COLOR(pluralize('time', count))}.`;\n\n return {message, pass};\n};\n\nconst createToBeCalledWithMatcher = (matcherName: string) => (\n received: any,\n ...expected: Array<unknown>\n): SyncExpectationResult => {\n ensureMock(received, matcherName);\n\n const receivedIsSpy = isSpy(received);\n const type = receivedIsSpy ? 'spy' : 'mock function';\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n const identifier =\n receivedIsSpy || receivedName === 'jest.fn()'\n ? type\n : `${type} \"${receivedName}\"`;\n\n const calls = receivedIsSpy\n ? received.calls.all().map((x: any) => x.args)\n : received.mock.calls;\n\n const [match, fail] = partition(calls, call =>\n equals(call, expected, [iterableEquality]),\n );\n const pass = match.length > 0;\n\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} not to have been called with:\\n` +\n ` ${printExpected(expected)}`\n : () =>\n matcherHint(matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} to have been called with:\\n` +\n formatMismatchedCalls(fail, expected, CALL_PRINT_LIMIT);\n\n return {message, pass};\n};\n\nconst createToReturnWithMatcher = (matcherName: string) => (\n received: any,\n expected: unknown,\n): SyncExpectationResult => {\n ensureMock(received, matcherName);\n\n const receivedName = received.getMockName();\n const identifier =\n receivedName === 'jest.fn()'\n ? 'mock function'\n : `mock function \"${receivedName}\"`;\n\n // List of return values that correspond only to calls that returned\n const returnValues = received.mock.results\n .filter((result: any) => result.type === 'return')\n .map((result: any) => result.value);\n\n const [match] = partition(returnValues, value =>\n equals(expected, value, [iterableEquality]),\n );\n const pass = match.length > 0;\n\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} not to have returned:\\n` +\n ` ${printExpected(expected)}\\n` +\n `But it returned exactly:\\n` +\n ` ${printReceived(expected)}`\n : () =>\n matcherHint(matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} to have returned:\\n` +\n formatMismatchedReturnValues(\n returnValues,\n expected,\n RETURN_PRINT_LIMIT,\n );\n\n return {message, pass};\n};\n\nconst createLastCalledWithMatcher = (matcherName: string) => (\n received: any,\n ...expected: Array<unknown>\n): SyncExpectationResult => {\n ensureMock(received, matcherName);\n\n const receivedIsSpy = isSpy(received);\n const type = receivedIsSpy ? 'spy' : 'mock function';\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n const identifier =\n receivedIsSpy || receivedName === 'jest.fn()'\n ? type\n : `${type} \"${receivedName}\"`;\n const calls = receivedIsSpy\n ? received.calls.all().map((x: any) => x.args)\n : received.mock.calls;\n const pass = equals(calls[calls.length - 1], expected, [iterableEquality]);\n\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} to not have been last called with:\\n` +\n ` ${printExpected(expected)}`\n : () =>\n matcherHint(matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} to have been last called with:\\n` +\n formatMismatchedCalls(calls, expected, LAST_CALL_PRINT_LIMIT);\n\n return {message, pass};\n};\n\nconst createLastReturnedMatcher = (matcherName: string) => (\n received: any,\n expected: unknown,\n): SyncExpectationResult => {\n ensureMock(received, matcherName);\n\n const receivedName = received.getMockName();\n const identifier =\n receivedName === 'jest.fn()'\n ? 'mock function'\n : `mock function \"${receivedName}\"`;\n\n const results = received.mock.results;\n const lastResult = results[results.length - 1];\n const pass =\n !!lastResult &&\n lastResult.type === 'return' &&\n equals(lastResult.value, expected, [iterableEquality]);\n\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} to not have last returned:\\n` +\n ` ${printExpected(expected)}\\n` +\n `But it last returned exactly:\\n` +\n ` ${printReceived(lastResult.value)}`\n : () =>\n matcherHint(matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} to have last returned:\\n` +\n ` ${printExpected(expected)}\\n` +\n (!lastResult\n ? `But it was ${RECEIVED_COLOR('not called')}`\n : lastResult.type === 'incomplete'\n ? `But the last call ${RECEIVED_COLOR('has not returned yet')}`\n : lastResult.type === 'throw'\n ? `But the last call ${RECEIVED_COLOR('threw an error')}`\n : `But the last call returned:\\n ${printReceived(\n lastResult.value,\n )}`);\n\n return {message, pass};\n};\n\nconst createNthCalledWithMatcher = (matcherName: string) => (\n received: any,\n nth: number,\n ...expected: Array<unknown>\n): SyncExpectationResult => {\n ensureMock(received, matcherName);\n\n const receivedIsSpy = isSpy(received);\n const type = receivedIsSpy ? 'spy' : 'mock function';\n\n // @ts-ignore\n if (typeof nth !== 'number' || parseInt(nth, 10) !== nth || nth < 1) {\n const message = () =>\n `nth value ${printReceived(\n nth,\n )} must be a positive integer greater than ${printExpected(0)}`;\n const pass = false;\n return {message, pass};\n }\n\n const receivedName = receivedIsSpy ? 'spy' : received.getMockName();\n const identifier =\n receivedIsSpy || receivedName === 'jest.fn()'\n ? type\n : `${type} \"${receivedName}\"`;\n const calls = receivedIsSpy\n ? received.calls.all().map((x: any) => x.args)\n : received.mock.calls;\n const pass = equals(calls[nth - 1], expected, [iterableEquality]);\n\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} ${nthToString(\n nth,\n )} call to not have been called with:\\n` +\n ` ${printExpected(expected)}`\n : () =>\n matcherHint(matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} ${nthToString(\n nth,\n )} call to have been called with:\\n` +\n formatMismatchedCalls(\n calls[nth - 1] ? [calls[nth - 1]] : [],\n expected,\n LAST_CALL_PRINT_LIMIT,\n );\n\n return {message, pass};\n};\n\nconst createNthReturnedWithMatcher = (matcherName: string) => (\n received: any,\n nth: number,\n expected: unknown,\n): SyncExpectationResult => {\n ensureMock(received, matcherName);\n\n //@ts-ignore\n if (typeof nth !== 'number' || parseInt(nth, 10) !== nth || nth < 1) {\n const message = () =>\n `nth value ${printReceived(\n nth,\n )} must be a positive integer greater than ${printExpected(0)}`;\n const pass = false;\n return {message, pass};\n }\n\n const receivedName = received.getMockName();\n const identifier =\n receivedName === 'jest.fn()'\n ? 'mock function'\n : `mock function \"${receivedName}\"`;\n\n const results = received.mock.results;\n const nthResult = results[nth - 1];\n const pass =\n !!nthResult &&\n nthResult.type === 'return' &&\n equals(nthResult.value, expected, [iterableEquality]);\n const nthString = nthToString(nth);\n const message = pass\n ? () =>\n matcherHint('.not' + matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} ${nthString} call to not have returned with:\\n` +\n ` ${printExpected(expected)}\\n` +\n `But the ${nthString} call returned exactly:\\n` +\n ` ${printReceived(nthResult.value)}`\n : () =>\n matcherHint(matcherName, receivedName) +\n '\\n\\n' +\n `Expected ${identifier} ${nthString} call to have returned with:\\n` +\n ` ${printExpected(expected)}\\n` +\n (results.length === 0\n ? `But it was ${RECEIVED_COLOR('not called')}`\n : nth > results.length\n ? `But it was only called ${printReceived(results.length)} times`\n : nthResult.type === 'incomplete'\n ? `But the ${nthString} call ${RECEIVED_COLOR(\n 'has not returned yet',\n )}`\n : nthResult.type === 'throw'\n ? `But the ${nthString} call ${RECEIVED_COLOR('threw an error')}`\n : `But the ${nthString} call returned with:\\n ${printReceived(\n nthResult.value,\n )}`);\n\n return {message, pass};\n};\n\nconst spyMatchers: MatchersObject = {\n lastCalledWith: createLastCalledWithMatcher('.lastCalledWith'),\n lastReturnedWith: createLastReturnedMatcher('.lastReturnedWith'),\n nthCalledWith: createNthCalledWithMatcher('.nthCalledWith'),\n nthReturnedWith: createNthReturnedWithMatcher('.nthReturnedWith'),\n toBeCalled: createToBeCalledMatcher('.toBeCalled'),\n toBeCalledTimes: createToBeCalledTimesMatcher('.toBeCalledTimes'),\n toBeCalledWith: createToBeCalledWithMatcher('.toBeCalledWith'),\n toHaveBeenCalled: createToBeCalledMatcher('.toHaveBeenCalled'),\n toHaveBeenCalledTimes: createToBeCalledTimesMatcher('.toHaveBeenCalledTimes'),\n toHaveBeenCalledWith: createToBeCalledWithMatcher('.toHaveBeenCalledWith'),\n toHaveBeenLastCalledWith: createLastCalledWithMatcher(\n '.toHaveBeenLastCalledWith',\n ),\n toHaveBeenNthCalledWith: createNthCalledWithMatcher(\n '.toHaveBeenNthCalledWith',\n ),\n toHaveLastReturnedWith: createLastReturnedMatcher('.toHaveLastReturnedWith'),\n toHaveNthReturnedWith: createNthReturnedWithMatcher('.toHaveNthReturnedWith'),\n toHaveReturned: createToReturnMatcher('.toHaveReturned'),\n toHaveReturnedTimes: createToReturnTimesMatcher('.toHaveReturnedTimes'),\n toHaveReturnedWith: createToReturnWithMatcher('.toHaveReturnedWith'),\n toReturn: createToReturnMatcher('.toReturn'),\n toReturnTimes: createToReturnTimesMatcher('.toReturnTimes'),\n toReturnWith: createToReturnWithMatcher('.toReturnWith'),\n};\n\nconst isSpy = (spy: any) => spy.calls && typeof spy.calls.count === 'function';\n\nconst ensureMock = (mockOrSpy: any, matcherName: any) => {\n if (\n !mockOrSpy ||\n ((mockOrSpy.calls === undefined || mockOrSpy.calls.all === undefined) &&\n mockOrSpy._isMockFunction !== true)\n ) {\n throw new Error(\n matcherErrorMessage(\n matcherHint('[.not]' + matcherName, 'jest.fn()', ''),\n `${RECEIVED_COLOR('received')} value must be a mock or spy function`,\n printWithType('Received', mockOrSpy, printReceived),\n ),\n );\n }\n};\n\nconst getPrintedCalls = (\n calls: Array<any>,\n limit: number,\n sep: string,\n fn: Function,\n): string => {\n const result = [];\n let i = calls.length;\n\n while (--i >= 0 && --limit >= 0) {\n result.push(fn(calls[i]));\n }\n\n return result.join(sep);\n};\n\nconst getPrintedReturnValues = (calls: Array<any>, limit: number): string => {\n const result = [];\n\n for (let i = 0; i < calls.length && i < limit; i += 1) {\n result.push(printReceived(calls[i]));\n }\n\n if (calls.length > limit) {\n result.push(`...and ${printReceived(calls.length - limit)} more`);\n }\n\n return result.join('\\n\\n ');\n};\n\nconst formatReceivedCalls = (\n calls: Array<any>,\n limit: number,\n options: any,\n) => {\n if (calls.length) {\n const but = options && options.sameSentence ? 'but' : 'But';\n const count = calls.length - limit;\n const printedCalls = getPrintedCalls(calls, limit, ', ', printReceived);\n return (\n `${but} it was called ` +\n `with:\\n ` +\n printedCalls +\n (count > 0\n ? '\\nand ' + RECEIVED_COLOR(pluralize('more call', count)) + '.'\n : '')\n );\n } else {\n return `But it was ${RECEIVED_COLOR('not called')}.`;\n }\n};\n\nconst formatMismatchedCalls = (\n calls: Array<any>,\n expected: any,\n limit: number,\n): string => {\n if (calls.length) {\n return getPrintedCalls(\n calls,\n limit,\n '\\n\\n',\n formatMismatchedArgs.bind(null, expected),\n );\n } else {\n return (\n ` ${printExpected(expected)}\\n` +\n `But it was ${RECEIVED_COLOR('not called')}.`\n );\n }\n};\n\nconst formatMismatchedReturnValues = (\n returnValues: Array<any>,\n expected: any,\n limit: number,\n): string => {\n if (returnValues.length) {\n return (\n ` ${printExpected(expected)}\\n` +\n `But it returned:\\n` +\n ` ${getPrintedReturnValues(returnValues, limit)}`\n );\n } else {\n return (\n ` ${printExpected(expected)}\\n` +\n `But it did ${RECEIVED_COLOR('not return')}.`\n );\n }\n};\n\nconst formatMismatchedArgs = (expected: any, received: any): string => {\n const length = Math.max(expected.length, received.length);\n\n const printedArgs = [];\n for (let i = 0; i < length; i++) {\n if (!equals(expected[i], received[i], [iterableEquality])) {\n const oneline = isOneline(expected[i], received[i]);\n const diffString = diff(expected[i], received[i]);\n printedArgs.push(\n ` ${printExpected(expected[i])}\\n` +\n `as argument ${i + 1}, but it was called with\\n` +\n ` ${printReceived(received[i])}.` +\n (diffString && !oneline ? `\\n\\nDifference:\\n\\n${diffString}` : ''),\n );\n } else if (i >= expected.length) {\n printedArgs.push(\n ` Did not expect argument ${i + 1} ` +\n `but it was called with ${printReceived(received[i])}.`,\n );\n }\n }\n\n return printedArgs.join('\\n');\n};\n\nconst nthToString = (nth: number): string => {\n switch (nth) {\n case 1:\n return 'first';\n case 2:\n return 'second';\n case 3:\n return 'third';\n }\n return `${nth}th`;\n};\n\nexport default spyMatchers;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {formatStackTrace, separateMessageFromStack} from 'jest-message-util';\nimport {\n EXPECTED_COLOR,\n RECEIVED_COLOR,\n matcherErrorMessage,\n matcherHint,\n printExpected,\n printReceived,\n printWithType,\n MatcherHintOptions,\n} from 'jest-matcher-utils';\nimport {\n printExpectedConstructorName,\n printExpectedConstructorNameNot,\n printReceivedConstructorName,\n printReceivedConstructorNameNot,\n printReceivedStringContainExpectedResult,\n printReceivedStringContainExpectedSubstring,\n} from './print';\nimport {\n MatchersObject,\n MatcherState,\n RawMatcherFn,\n SyncExpectationResult,\n} from './types';\nimport {isError} from './utils';\n\nconst DID_NOT_THROW = 'Received function did not throw';\n\ntype Thrown =\n | {\n hasMessage: true;\n isError: true;\n message: string;\n value: Error;\n }\n | {\n hasMessage: boolean;\n isError: false;\n message: string;\n value: any;\n };\n\nconst getThrown = (e: any): Thrown => {\n const hasMessage =\n e !== null && e !== undefined && typeof e.message === 'string';\n\n if (hasMessage && typeof e.name === 'string' && typeof e.stack === 'string') {\n return {\n hasMessage,\n isError: true,\n message: e.message,\n value: e,\n };\n }\n\n return {\n hasMessage,\n isError: false,\n message: hasMessage ? e.message : String(e),\n value: e,\n };\n};\n\nexport const createMatcher = (\n matcherName: string,\n fromPromise?: boolean,\n): RawMatcherFn =>\n function(this: MatcherState, received: Function, expected: any) {\n const options = {\n isNot: this.isNot,\n promise: this.promise,\n };\n\n let thrown = null;\n\n if (fromPromise && isError(received)) {\n thrown = getThrown(received);\n } else {\n if (typeof received !== 'function') {\n if (!fromPromise) {\n const placeholder = expected === undefined ? '' : 'expected';\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, placeholder, options),\n `${RECEIVED_COLOR('received')} value must be a function`,\n printWithType('Received', received, printReceived),\n ),\n );\n }\n } else {\n try {\n received();\n } catch (e) {\n thrown = getThrown(e);\n }\n }\n }\n\n if (expected === undefined) {\n return toThrow(matcherName, options, thrown);\n } else if (typeof expected === 'function') {\n return toThrowExpectedClass(matcherName, options, thrown, expected);\n } else if (typeof expected === 'string') {\n return toThrowExpectedString(matcherName, options, thrown, expected);\n } else if (expected !== null && typeof expected.test === 'function') {\n return toThrowExpectedRegExp(matcherName, options, thrown, expected);\n } else if (\n expected !== null &&\n typeof expected.asymmetricMatch === 'function'\n ) {\n return toThrowExpectedAsymmetric(matcherName, options, thrown, expected);\n } else if (expected !== null && typeof expected === 'object') {\n return toThrowExpectedObject(matcherName, options, thrown, expected);\n } else {\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherName, undefined, undefined, options),\n `${EXPECTED_COLOR(\n 'expected',\n )} value must be a string or regular expression or class or error`,\n printWithType('Expected', expected, printExpected),\n ),\n );\n }\n };\n\nconst matchers: MatchersObject = {\n toThrow: createMatcher('toThrow'),\n toThrowError: createMatcher('toThrowError'),\n};\n\nconst toThrowExpectedRegExp = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: RegExp,\n): SyncExpectationResult => {\n const pass = thrown !== null && expected.test(thrown.message);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected pattern: not ', expected) +\n (thrown !== null && thrown.hasMessage\n ? formatReceived(\n 'Received message: ',\n thrown,\n 'message',\n expected,\n ) + formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected pattern: ', expected) +\n (thrown === null\n ? '\\n' + DID_NOT_THROW\n : thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'));\n\n return {message, pass};\n};\n\ntype AsymmetricMatcher = {\n asymmetricMatch: (received: unknown) => boolean;\n};\n\nconst toThrowExpectedAsymmetric = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: AsymmetricMatcher,\n): SyncExpectationResult => {\n const pass = thrown !== null && expected.asymmetricMatch(thrown.value);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected asymmetric matcher: not ', expected) +\n '\\n' +\n (thrown !== null && thrown.hasMessage\n ? formatReceived('Received name: ', thrown, 'name') +\n formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Thrown value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected asymmetric matcher: ', expected) +\n '\\n' +\n (thrown === null\n ? DID_NOT_THROW\n : thrown.hasMessage\n ? formatReceived('Received name: ', thrown, 'name') +\n formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Thrown value: ', thrown, 'value'));\n\n return {message, pass};\n};\n\nconst toThrowExpectedObject = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: any,\n): SyncExpectationResult => {\n const pass = thrown !== null && thrown.message === expected.message;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected message: not ', expected.message) +\n (thrown !== null && thrown.hasMessage\n ? formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected message: ', expected.message) +\n (thrown === null\n ? '\\n' + DID_NOT_THROW\n : thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'));\n\n return {message, pass};\n};\n\nconst toThrowExpectedClass = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: Function,\n): SyncExpectationResult => {\n const pass = thrown !== null && thrown.value instanceof expected;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printExpectedConstructorNameNot('Expected constructor', expected) +\n (thrown !== null &&\n thrown.value != null &&\n typeof thrown.value.constructor === 'function' &&\n thrown.value.constructor !== expected\n ? printReceivedConstructorNameNot(\n 'Received constructor',\n thrown.value.constructor,\n expected,\n )\n : '') +\n '\\n' +\n (thrown !== null && thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n printExpectedConstructorName('Expected constructor', expected) +\n (thrown === null\n ? '\\n' + DID_NOT_THROW\n : (thrown.value != null &&\n typeof thrown.value.constructor === 'function'\n ? printReceivedConstructorName(\n 'Received constructor',\n thrown.value.constructor,\n )\n : '') +\n '\\n' +\n (thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value')));\n\n return {message, pass};\n};\n\nconst toThrowExpectedString = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n expected: string,\n): SyncExpectationResult => {\n const pass = thrown !== null && thrown.message.includes(expected);\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected substring: not ', expected) +\n (thrown !== null && thrown.hasMessage\n ? formatReceived(\n 'Received message: ',\n thrown,\n 'message',\n expected,\n ) + formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, undefined, options) +\n '\\n\\n' +\n formatExpected('Expected substring: ', expected) +\n (thrown === null\n ? '\\n' + DID_NOT_THROW\n : thrown.hasMessage\n ? formatReceived('Received message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Received value: ', thrown, 'value'));\n\n return {message, pass};\n};\n\nconst toThrow = (\n matcherName: string,\n options: MatcherHintOptions,\n thrown: Thrown | null,\n): SyncExpectationResult => {\n const pass = thrown !== null;\n\n const message = pass\n ? () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n (thrown !== null && thrown.hasMessage\n ? formatReceived('Error name: ', thrown, 'name') +\n formatReceived('Error message: ', thrown, 'message') +\n formatStack(thrown)\n : formatReceived('Thrown value: ', thrown, 'value'))\n : () =>\n matcherHint(matcherName, undefined, '', options) +\n '\\n\\n' +\n DID_NOT_THROW;\n\n return {message, pass};\n};\n\nconst formatExpected = (label: string, expected: unknown) =>\n label + printExpected(expected) + '\\n';\n\nconst formatReceived = (\n label: string,\n thrown: Thrown | null,\n key: string,\n expected?: string | RegExp,\n) => {\n if (thrown === null) {\n return '';\n }\n\n if (key === 'message') {\n const message = thrown.message;\n\n if (typeof expected === 'string') {\n const index = message.indexOf(expected);\n if (index !== -1) {\n return (\n label +\n printReceivedStringContainExpectedSubstring(\n message,\n index,\n expected.length,\n ) +\n '\\n'\n );\n }\n } else if (expected instanceof RegExp) {\n return (\n label +\n printReceivedStringContainExpectedResult(\n message,\n typeof expected.exec === 'function' ? expected.exec(message) : null,\n ) +\n '\\n'\n );\n }\n\n return label + printReceived(message) + '\\n';\n }\n\n if (key === 'name') {\n return thrown.isError\n ? label + printReceived(thrown.value.name) + '\\n'\n : '';\n }\n\n if (key === 'value') {\n return thrown.isError ? '' : label + printReceived(thrown.value) + '\\n';\n }\n\n return '';\n};\n\nconst formatStack = (thrown: Thrown | null) =>\n thrown === null || !thrown.isError\n ? ''\n : formatStackTrace(\n separateMessageFromStack(thrown.value.stack!).stack,\n {\n rootDir: process.cwd(),\n testMatch: [],\n },\n {\n noStackTrace: false,\n },\n );\n\nexport default matchers;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {isPrimitive} from 'jest-get-type';\nimport {\n equals,\n isA,\n isImmutableUnorderedKeyed,\n isImmutableUnorderedSet,\n} from './jasmineUtils';\n\ntype GetPath = {\n hasEndProp?: boolean;\n lastTraversedObject: unknown;\n traversedPath: Array<string>;\n value?: unknown;\n};\n\n// Return whether object instance inherits getter from its class.\nconst hasGetterFromConstructor = (object: object, key: string) => {\n const constructor = object.constructor;\n if (constructor === Object) {\n // A literal object has Object as constructor.\n // Therefore, it cannot inherit application-specific getters.\n // Furthermore, Object has __proto__ getter which is not relevant.\n // Array, Boolean, Number, String constructors don’t have any getters.\n return false;\n }\n if (typeof constructor !== 'function') {\n // Object.create(null) constructs object with no constructor nor prototype.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects\n return false;\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(\n constructor.prototype,\n key,\n );\n return descriptor !== undefined && typeof descriptor.get === 'function';\n};\n\nexport const hasOwnProperty = (object: object, key: string) =>\n Object.prototype.hasOwnProperty.call(object, key) ||\n hasGetterFromConstructor(object, key);\n\nexport const getPath = (\n object: object,\n propertyPath: string | Array<string>,\n): GetPath => {\n if (!Array.isArray(propertyPath)) {\n propertyPath = (propertyPath as string).split('.');\n }\n\n if (propertyPath.length) {\n const lastProp = propertyPath.length === 1;\n const prop = propertyPath[0];\n const newObject = (object as any)[prop];\n\n if (!lastProp && (newObject === null || newObject === undefined)) {\n // This is not the last prop in the chain. If we keep recursing it will\n // hit a `can't access property X of undefined | null`. At this point we\n // know that the chain has broken and we can return right away.\n return {\n hasEndProp: false,\n lastTraversedObject: object,\n traversedPath: [],\n };\n }\n\n const result = getPath(newObject, propertyPath.slice(1));\n\n if (result.lastTraversedObject === null) {\n result.lastTraversedObject = object;\n }\n\n result.traversedPath.unshift(prop);\n\n if (lastProp) {\n // Does object have the property with an undefined value?\n // Although primitive values support bracket notation (above)\n // they would throw TypeError for in operator (below).\n result.hasEndProp =\n newObject !== undefined || (!isPrimitive(object) && prop in object);\n\n if (!result.hasEndProp) {\n result.traversedPath.shift();\n }\n }\n\n return result;\n }\n\n return {\n lastTraversedObject: null,\n traversedPath: [],\n value: object,\n };\n};\n\n// Strip properties from object that are not present in the subset. Useful for\n// printing the diff for toMatchObject() without adding unrelated noise.\nexport const getObjectSubset = (object: any, subset: any): any => {\n if (Array.isArray(object)) {\n if (Array.isArray(subset) && subset.length === object.length) {\n return subset.map((sub: any, i: number) =>\n getObjectSubset(object[i], sub),\n );\n }\n } else if (object instanceof Date) {\n return object;\n } else if (\n typeof object === 'object' &&\n object !== null &&\n typeof subset === 'object' &&\n subset !== null\n ) {\n const trimmed: any = {};\n Object.keys(subset)\n .filter(key => hasOwnProperty(object, key))\n .forEach(\n key => (trimmed[key] = getObjectSubset(object[key], subset[key])),\n );\n\n if (Object.keys(trimmed).length > 0) {\n return trimmed;\n }\n }\n return object;\n};\n\nconst IteratorSymbol = Symbol.iterator;\n\nconst hasIterator = (object: any) =>\n !!(object != null && object[IteratorSymbol]);\n\nexport const iterableEquality = (\n a: any,\n b: any,\n aStack: Array<any> = [],\n bStack: Array<any> = [],\n) => {\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n Array.isArray(a) ||\n Array.isArray(b) ||\n !hasIterator(a) ||\n !hasIterator(b)\n ) {\n return undefined;\n }\n if (a.constructor !== b.constructor) {\n return false;\n }\n\n let length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n // circular references at same depth are equal\n // circular reference is not equal to non-circular one\n if (aStack[length] === a) {\n return bStack[length] === b;\n }\n }\n aStack.push(a);\n bStack.push(b);\n\n const iterableEqualityWithStack = (a: any, b: any) =>\n iterableEquality(a, b, [...aStack], [...bStack]);\n\n if (a.size !== undefined) {\n if (a.size !== b.size) {\n return false;\n } else if (isA('Set', a) || isImmutableUnorderedSet(a)) {\n let allFound = true;\n for (const aValue of a) {\n if (!b.has(aValue)) {\n let has = false;\n for (const bValue of b) {\n const isEqual = equals(aValue, bValue, [iterableEqualityWithStack]);\n if (isEqual === true) {\n has = true;\n }\n }\n\n if (has === false) {\n allFound = false;\n break;\n }\n }\n }\n // Remove the first value from the stack of traversed values.\n aStack.pop();\n bStack.pop();\n return allFound;\n } else if (isA('Map', a) || isImmutableUnorderedKeyed(a)) {\n let allFound = true;\n for (const aEntry of a) {\n if (\n !b.has(aEntry[0]) ||\n !equals(aEntry[1], b.get(aEntry[0]), [iterableEqualityWithStack])\n ) {\n let has = false;\n for (const bEntry of b) {\n const matchedKey = equals(aEntry[0], bEntry[0], [\n iterableEqualityWithStack,\n ]);\n\n let matchedValue = false;\n if (matchedKey === true) {\n matchedValue = equals(aEntry[1], bEntry[1], [\n iterableEqualityWithStack,\n ]);\n }\n if (matchedValue === true) {\n has = true;\n }\n }\n\n if (has === false) {\n allFound = false;\n break;\n }\n }\n }\n // Remove the first value from the stack of traversed values.\n aStack.pop();\n bStack.pop();\n return allFound;\n }\n }\n\n const bIterator = b[IteratorSymbol]();\n\n for (const aValue of a) {\n const nextB = bIterator.next();\n if (\n nextB.done ||\n !equals(aValue, nextB.value, [iterableEqualityWithStack])\n ) {\n return false;\n }\n }\n if (!bIterator.next().done) {\n return false;\n }\n\n // Remove the first value from the stack of traversed values.\n aStack.pop();\n bStack.pop();\n return true;\n};\n\nconst isObjectWithKeys = (a: any) =>\n a !== null &&\n typeof a === 'object' &&\n !(a instanceof Error) &&\n !(a instanceof Array) &&\n !(a instanceof Date);\n\nexport const subsetEquality = (\n object: any,\n subset: any,\n): undefined | boolean => {\n if (!isObjectWithKeys(subset)) {\n return undefined;\n }\n\n return Object.keys(subset).every(\n key =>\n object != null &&\n hasOwnProperty(object, key) &&\n equals(object[key], subset[key], [iterableEquality, subsetEquality]),\n );\n};\n\nexport const typeEquality = (a: any, b: any) => {\n if (a == null || b == null || a.constructor === b.constructor) {\n return undefined;\n }\n\n return false;\n};\n\nexport const sparseArrayEquality = (a: unknown, b: unknown) => {\n if (!Array.isArray(a) || !Array.isArray(b)) {\n return undefined;\n }\n\n // A sparse array [, , 1] will have keys [\"2\"] whereas [undefined, undefined, 1] will have keys [\"0\", \"1\", \"2\"]\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n return (\n equals(a, b, [iterableEquality, typeEquality], true) && equals(aKeys, bKeys)\n );\n};\n\nexport const partition = <T>(\n items: Array<T>,\n predicate: (arg: T) => boolean,\n): [Array<T>, Array<T>] => {\n const result: [Array<T>, Array<T>] = [[], []];\n\n items.forEach(item => result[predicate(item) ? 0 : 1].push(item));\n\n return result;\n};\n\n// Copied from https://github.com/graingert/angular.js/blob/a43574052e9775cbc1d7dd8a086752c979b0f020/src/Angular.js#L685-L693\nexport const isError = (value: unknown) => {\n switch (Object.prototype.toString.call(value)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return value instanceof Error;\n }\n};\n\nexport function emptyObject(obj: any) {\n return obj && typeof obj === 'object' ? !Object.keys(obj).length : false;\n}\n\nconst MULTILINE_REGEXP = /[\\r\\n]/;\n\nexport const isOneline = (expected: any, received: any): boolean =>\n typeof expected === 'string' &&\n typeof received === 'string' &&\n (!MULTILINE_REGEXP.test(expected) || !MULTILINE_REGEXP.test(received));\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.SIMILAR_MESSAGE = exports.NO_DIFF_MESSAGE = void 0;\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst NO_DIFF_MESSAGE = _chalk.default.dim(\n 'Compared values have no visual difference.'\n);\n\nexports.NO_DIFF_MESSAGE = NO_DIFF_MESSAGE;\n\nconst SIMILAR_MESSAGE = _chalk.default.dim(\n 'Compared values serialize to the same structure.\\n' +\n 'Printing internal object structure without calling `toJSON` instead.'\n);\n\nexports.SIMILAR_MESSAGE = SIMILAR_MESSAGE;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = void 0;\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nvar _diffSequences = _interopRequireDefault(require('diff-sequences'));\n\nvar _constants = require('./constants');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst DIFF_CONTEXT_DEFAULT = 5;\nconst fgPatchMark = _chalk.default.yellow;\nconst fgDelete = _chalk.default.green;\nconst fgInsert = _chalk.default.red;\nconst fgCommon = _chalk.default.dim; // common lines (even indentation same)\n\nconst fgIndent = _chalk.default.cyan; // common lines (only indentation different)\n\nconst bgCommon = _chalk.default.bgYellow; // edge spaces in common line (even indentation same)\n\nconst bgInverse = _chalk.default.inverse; // edge spaces in any other lines\n// ONLY trailing if expected value is snapshot or multiline string.\n\nconst highlightTrailingSpaces = (line, bgColor) =>\n line.replace(/\\s+$/, bgColor('$&')); // BOTH leading AND trailing if expected value is data structure.\n\nconst highlightLeadingTrailingSpaces = (\n line,\n bgColor // If line consists of ALL spaces: highlight all of them.\n) =>\n highlightTrailingSpaces(line, bgColor).replace(\n // If line has an ODD length of leading spaces: highlight only the LAST.\n /^(\\s\\s)*(\\s)(?=[^\\s])/,\n '$1' + bgColor('$2')\n );\n\nconst getHighlightSpaces = bothEdges =>\n bothEdges ? highlightLeadingTrailingSpaces : highlightTrailingSpaces;\n\nconst getAnnotation = options =>\n fgDelete('- ' + ((options && options.aAnnotation) || 'Expected')) +\n '\\n' +\n fgInsert('+ ' + ((options && options.bAnnotation) || 'Received')) +\n '\\n\\n';\n\n// Given index interval in expected lines, put formatted delete lines.\nconst formatDelete = (aStart, aEnd, aLinesUn, aLinesIn, put) => {\n const highlightSpaces = getHighlightSpaces(aLinesUn !== aLinesIn);\n\n for (let aIndex = aStart; aIndex !== aEnd; aIndex += 1) {\n const aLineUn = aLinesUn[aIndex];\n const aLineIn = aLinesIn[aIndex];\n const indentation = aLineIn.slice(0, aLineIn.length - aLineUn.length);\n put(fgDelete('- ' + indentation + highlightSpaces(aLineUn, bgInverse)));\n }\n}; // Given index interval in received lines, put formatted insert lines.\n\nconst formatInsert = (bStart, bEnd, bLinesUn, bLinesIn, put) => {\n const highlightSpaces = getHighlightSpaces(bLinesUn !== bLinesIn);\n\n for (let bIndex = bStart; bIndex !== bEnd; bIndex += 1) {\n const bLineUn = bLinesUn[bIndex];\n const bLineIn = bLinesIn[bIndex];\n const indentation = bLineIn.slice(0, bLineIn.length - bLineUn.length);\n put(fgInsert('+ ' + indentation + highlightSpaces(bLineUn, bgInverse)));\n }\n}; // Given the number of items and starting indexes of a common subsequence,\n// put formatted common lines.\n\nconst formatCommon = (\n nCommon,\n aCommon,\n bCommon,\n aLinesIn,\n bLinesUn,\n bLinesIn,\n put\n) => {\n const highlightSpaces = getHighlightSpaces(bLinesUn !== bLinesIn);\n\n for (; nCommon !== 0; nCommon -= 1, aCommon += 1, bCommon += 1) {\n const bLineUn = bLinesUn[bCommon];\n const bLineIn = bLinesIn[bCommon];\n const bLineInLength = bLineIn.length; // For common lines, received indentation seems more intuitive.\n\n const indentation = bLineIn.slice(0, bLineInLength - bLineUn.length); // Color shows whether expected and received line has same indentation.\n\n const hasSameIndentation = aLinesIn[aCommon].length === bLineInLength;\n const fg = hasSameIndentation ? fgCommon : fgIndent;\n const bg = hasSameIndentation ? bgCommon : bgInverse;\n put(fg(' ' + indentation + highlightSpaces(bLineUn, bg)));\n }\n}; // jest --expand\n// Return formatted diff as joined string of all lines.\n\nconst diffExpand = (aLinesUn, bLinesUn, aLinesIn, bLinesIn) => {\n const isCommon = (aIndex, bIndex) => aLinesUn[aIndex] === bLinesUn[bIndex];\n\n const array = [];\n\n const put = line => {\n array.push(line);\n };\n\n let aStart = 0;\n let bStart = 0;\n\n const foundSubsequence = (nCommon, aCommon, bCommon) => {\n formatDelete(aStart, aCommon, aLinesUn, aLinesIn, put);\n formatInsert(bStart, bCommon, bLinesUn, bLinesIn, put);\n formatCommon(nCommon, aCommon, bCommon, aLinesIn, bLinesUn, bLinesIn, put);\n aStart = aCommon + nCommon;\n bStart = bCommon + nCommon;\n };\n\n const aLength = aLinesUn.length;\n const bLength = bLinesUn.length;\n (0, _diffSequences.default)(aLength, bLength, isCommon, foundSubsequence); // After the last common subsequence, format remaining change lines.\n\n formatDelete(aStart, aLength, aLinesUn, aLinesIn, put);\n formatInsert(bStart, bLength, bLinesUn, bLinesIn, put);\n return array.join('\\n');\n}; // In GNU diff format, indexes are one-based instead of zero-based.\n\nconst createPatchMark = (aStart, aEnd, bStart, bEnd) =>\n fgPatchMark(\n `@@ -${aStart + 1},${aEnd - aStart} +${bStart + 1},${bEnd - bStart} @@`\n );\n\nconst getContextLines = options =>\n options &&\n typeof options.contextLines === 'number' &&\n options.contextLines >= 0\n ? options.contextLines\n : DIFF_CONTEXT_DEFAULT; // jest --no-expand\n// Return joined string of formatted diff for all change lines,\n// but if some common lines are omitted because there are more than the context,\n// then a “patch mark” precedes each set of adjacent changed and common lines.\n\nconst diffNoExpand = (\n aLinesUn,\n bLinesUn,\n aLinesIn,\n bLinesIn,\n nContextLines\n) => {\n const isCommon = (aIndex, bIndex) => aLinesUn[aIndex] === bLinesUn[bIndex];\n\n let iPatchMark = 0; // index of placeholder line for patch mark\n\n const array = [''];\n\n const put = line => {\n array.push(line);\n };\n\n let isAtEnd = false;\n const aLength = aLinesUn.length;\n const bLength = bLinesUn.length;\n const nContextLines2 = nContextLines + nContextLines; // Initialize the first patch for changes at the start,\n // especially for edge case in which there is no common subsequence.\n\n let aStart = 0;\n let aEnd = 0;\n let bStart = 0;\n let bEnd = 0; // Given the number of items and starting indexes of each common subsequence,\n // format any preceding change lines, and then common context lines.\n\n const foundSubsequence = (nCommon, aStartCommon, bStartCommon) => {\n const aEndCommon = aStartCommon + nCommon;\n const bEndCommon = bStartCommon + nCommon;\n isAtEnd = aEndCommon === aLength && bEndCommon === bLength; // If common subsequence is at start, re-initialize the first patch.\n\n if (aStartCommon === 0 && bStartCommon === 0) {\n const nLines = nContextLines < nCommon ? nContextLines : nCommon;\n aStart = aEndCommon - nLines;\n bStart = bEndCommon - nLines;\n formatCommon(nLines, aStart, bStart, aLinesIn, bLinesUn, bLinesIn, put);\n aEnd = aEndCommon;\n bEnd = bEndCommon;\n return;\n } // Format preceding change lines.\n\n formatDelete(aEnd, aStartCommon, aLinesUn, aLinesIn, put);\n formatInsert(bEnd, bStartCommon, bLinesUn, bLinesIn, put);\n aEnd = aStartCommon;\n bEnd = bStartCommon; // If common subsequence is at end, then context follows preceding changes;\n // else context follows preceding changes AND precedes following changes.\n\n const maxContextLines = isAtEnd ? nContextLines : nContextLines2;\n\n if (nCommon <= maxContextLines) {\n // The patch includes all lines in the common subsequence.\n formatCommon(nCommon, aEnd, bEnd, aLinesIn, bLinesUn, bLinesIn, put);\n aEnd += nCommon;\n bEnd += nCommon;\n return;\n } // The patch ends because context is less than number of common lines.\n\n formatCommon(nContextLines, aEnd, bEnd, aLinesIn, bLinesUn, bLinesIn, put);\n aEnd += nContextLines;\n bEnd += nContextLines;\n array[iPatchMark] = createPatchMark(aStart, aEnd, bStart, bEnd); // If common subsequence is not at end, another patch follows it.\n\n if (!isAtEnd) {\n iPatchMark = array.length; // index of placeholder line\n\n array[iPatchMark] = '';\n const nLines = nContextLines < nCommon ? nContextLines : nCommon;\n aStart = aEndCommon - nLines;\n bStart = bEndCommon - nLines;\n formatCommon(nLines, aStart, bStart, aLinesIn, bLinesUn, bLinesIn, put);\n aEnd = aEndCommon;\n bEnd = bEndCommon;\n }\n };\n\n (0, _diffSequences.default)(aLength, bLength, isCommon, foundSubsequence); // If no common subsequence or last was not at end, format remaining change lines.\n\n if (!isAtEnd) {\n formatDelete(aEnd, aLength, aLinesUn, aLinesIn, put);\n formatInsert(bEnd, bLength, bLinesUn, bLinesIn, put);\n aEnd = aLength;\n bEnd = bLength;\n }\n\n if (aStart === 0 && aEnd === aLength && bStart === 0 && bEnd === bLength) {\n array.splice(0, 1); // delete placeholder line for patch mark\n } else {\n array[iPatchMark] = createPatchMark(aStart, aEnd, bStart, bEnd);\n }\n\n return array.join('\\n');\n};\n\nvar _default = (a, b, options, original) => {\n if (a === b) {\n return _constants.NO_DIFF_MESSAGE;\n }\n\n let aLinesUn = a.split('\\n');\n let bLinesUn = b.split('\\n'); // Indentation is unknown if expected value is snapshot or multiline string.\n\n let aLinesIn = aLinesUn;\n let bLinesIn = bLinesUn;\n\n if (original) {\n // Indentation is known if expected value is data structure:\n // Compare lines without indentation and format lines with indentation.\n aLinesIn = original.a.split('\\n');\n bLinesIn = original.b.split('\\n');\n\n if (\n aLinesUn.length !== aLinesIn.length ||\n bLinesUn.length !== bLinesIn.length\n ) {\n // Fall back if unindented and indented lines are inconsistent.\n aLinesUn = aLinesIn;\n bLinesUn = bLinesIn;\n }\n }\n\n return (\n getAnnotation(options) +\n (options && options.expand === false\n ? diffNoExpand(\n aLinesUn,\n bLinesUn,\n aLinesIn,\n bLinesIn,\n getContextLines(options)\n )\n : diffExpand(aLinesUn, bLinesUn, aLinesIn, bLinesIn))\n );\n};\n\nexports.default = _default;\n","'use strict';\n\nvar _prettyFormat = _interopRequireDefault(require('pretty-format'));\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nvar _jestGetType = _interopRequireDefault(require('jest-get-type'));\n\nvar _diffStrings = _interopRequireDefault(require('./diffStrings'));\n\nvar _constants = require('./constants');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(\n Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n })\n );\n }\n ownKeys.forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n }\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nconst _prettyFormat$plugins = _prettyFormat.default.plugins,\n AsymmetricMatcher = _prettyFormat$plugins.AsymmetricMatcher,\n DOMCollection = _prettyFormat$plugins.DOMCollection,\n DOMElement = _prettyFormat$plugins.DOMElement,\n Immutable = _prettyFormat$plugins.Immutable,\n ReactElement = _prettyFormat$plugins.ReactElement,\n ReactTestComponent = _prettyFormat$plugins.ReactTestComponent;\nconst PLUGINS = [\n ReactTestComponent,\n ReactElement,\n DOMElement,\n DOMCollection,\n Immutable,\n AsymmetricMatcher\n];\nconst FORMAT_OPTIONS = {\n plugins: PLUGINS\n};\n\nconst FORMAT_OPTIONS_0 = _objectSpread({}, FORMAT_OPTIONS, {\n indent: 0\n});\n\nconst FALLBACK_FORMAT_OPTIONS = {\n callToJSON: false,\n maxDepth: 10,\n plugins: PLUGINS\n};\n\nconst FALLBACK_FORMAT_OPTIONS_0 = _objectSpread({}, FALLBACK_FORMAT_OPTIONS, {\n indent: 0\n}); // Generate a string that will highlight the difference between two values\n// with green and red. (similar to how github does code diffing)\n\nfunction diff(a, b, options) {\n if (Object.is(a, b)) {\n return _constants.NO_DIFF_MESSAGE;\n }\n\n const aType = (0, _jestGetType.default)(a);\n let expectedType = aType;\n let omitDifference = false;\n\n if (aType === 'object' && typeof a.asymmetricMatch === 'function') {\n if (a.$$typeof !== Symbol.for('jest.asymmetricMatcher')) {\n // Do not know expected type of user-defined asymmetric matcher.\n return null;\n }\n\n if (typeof a.getExpectedType !== 'function') {\n // For example, expect.anything() matches either null or undefined\n return null;\n }\n\n expectedType = a.getExpectedType(); // Primitive types boolean and number omit difference below.\n // For example, omit difference for expect.stringMatching(regexp)\n\n omitDifference = expectedType === 'string';\n }\n\n if (expectedType !== (0, _jestGetType.default)(b)) {\n return (\n ' Comparing two different types of values.' +\n ` Expected ${_chalk.default.green(expectedType)} but ` +\n `received ${_chalk.default.red((0, _jestGetType.default)(b))}.`\n );\n }\n\n if (omitDifference) {\n return null;\n }\n\n switch (aType) {\n case 'string':\n return (0, _diffStrings.default)(a, b, options);\n\n case 'boolean':\n case 'number':\n return comparePrimitive(a, b, options);\n\n case 'map':\n return compareObjects(sortMap(a), sortMap(b), options);\n\n case 'set':\n return compareObjects(sortSet(a), sortSet(b), options);\n\n default:\n return compareObjects(a, b, options);\n }\n}\n\nfunction comparePrimitive(a, b, options) {\n return (0, _diffStrings.default)(\n (0, _prettyFormat.default)(a, FORMAT_OPTIONS),\n (0, _prettyFormat.default)(b, FORMAT_OPTIONS),\n options\n );\n}\n\nfunction sortMap(map) {\n return new Map(Array.from(map.entries()).sort());\n}\n\nfunction sortSet(set) {\n return new Set(Array.from(set.values()).sort());\n}\n\nfunction compareObjects(a, b, options) {\n let diffMessage;\n let hasThrown = false;\n\n try {\n diffMessage = (0, _diffStrings.default)(\n (0, _prettyFormat.default)(a, FORMAT_OPTIONS_0),\n (0, _prettyFormat.default)(b, FORMAT_OPTIONS_0),\n options,\n {\n a: (0, _prettyFormat.default)(a, FORMAT_OPTIONS),\n b: (0, _prettyFormat.default)(b, FORMAT_OPTIONS)\n }\n );\n } catch (e) {\n hasThrown = true;\n } // If the comparison yields no results, compare again but this time\n // without calling `toJSON`. It's also possible that toJSON might throw.\n\n if (!diffMessage || diffMessage === _constants.NO_DIFF_MESSAGE) {\n diffMessage = (0, _diffStrings.default)(\n (0, _prettyFormat.default)(a, FALLBACK_FORMAT_OPTIONS_0),\n (0, _prettyFormat.default)(b, FALLBACK_FORMAT_OPTIONS_0),\n options,\n {\n a: (0, _prettyFormat.default)(a, FALLBACK_FORMAT_OPTIONS),\n b: (0, _prettyFormat.default)(b, FALLBACK_FORMAT_OPTIONS)\n }\n );\n\n if (diffMessage !== _constants.NO_DIFF_MESSAGE && !hasThrown) {\n diffMessage = _constants.SIMILAR_MESSAGE + '\\n\\n' + diffMessage;\n }\n }\n\n return diffMessage;\n} // eslint-disable-next-line no-redeclare\n\nmodule.exports = diff;\n","'use strict';\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// get the type of a value with handling the edge cases like `typeof []`\n// and `typeof null`\nfunction getType(value) {\n if (value === undefined) {\n return 'undefined';\n } else if (value === null) {\n return 'null';\n } else if (Array.isArray(value)) {\n return 'array';\n } else if (typeof value === 'boolean') {\n return 'boolean';\n } else if (typeof value === 'function') {\n return 'function';\n } else if (typeof value === 'number') {\n return 'number';\n } else if (typeof value === 'string') {\n return 'string';\n } else if (typeof value === 'object') {\n if (value != null) {\n if (value.constructor === RegExp) {\n return 'regexp';\n } else if (value.constructor === Map) {\n return 'map';\n } else if (value.constructor === Set) {\n return 'set';\n } else if (value.constructor === Date) {\n return 'date';\n }\n }\n\n return 'object';\n } else if (typeof value === 'symbol') {\n return 'symbol';\n }\n\n throw new Error(`value of unknown type: ${value}`);\n}\n\ngetType.isPrimitive = value => Object(value) !== value;\n\nmodule.exports = getType;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nObject.defineProperty(exports, 'DiffOptions', {\n enumerable: true,\n get: function get() {\n return _jestDiff.DiffOptions;\n }\n});\nexports.matcherHint = exports.matcherErrorMessage = exports.getLabelPrinter = exports.pluralize = exports.diff = exports.ensureExpectedIsNonNegativeInteger = exports.ensureNumbers = exports.ensureExpectedIsNumber = exports.ensureActualIsNumber = exports.ensureNoExpected = exports.printWithType = exports.printExpected = exports.printReceived = exports.highlightTrailingWhitespace = exports.stringify = exports.SUGGEST_TO_CONTAIN_EQUAL = exports.DIM_COLOR = exports.BOLD_WEIGHT = exports.INVERTED_COLOR = exports.RECEIVED_COLOR = exports.EXPECTED_COLOR = void 0;\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nvar _jestDiff = _interopRequireWildcard(require('jest-diff'));\n\nvar _jestGetType = _interopRequireDefault(require('jest-get-type'));\n\nvar _prettyFormat = _interopRequireDefault(require('pretty-format'));\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc =\n Object.defineProperty && Object.getOwnPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : {};\n if (desc.get || desc.set) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst _prettyFormat$plugins = _prettyFormat.default.plugins,\n AsymmetricMatcher = _prettyFormat$plugins.AsymmetricMatcher,\n DOMCollection = _prettyFormat$plugins.DOMCollection,\n DOMElement = _prettyFormat$plugins.DOMElement,\n Immutable = _prettyFormat$plugins.Immutable,\n ReactElement = _prettyFormat$plugins.ReactElement,\n ReactTestComponent = _prettyFormat$plugins.ReactTestComponent;\nconst PLUGINS = [\n ReactTestComponent,\n ReactElement,\n DOMElement,\n DOMCollection,\n Immutable,\n AsymmetricMatcher\n];\nconst EXPECTED_COLOR = _chalk.default.green;\nexports.EXPECTED_COLOR = EXPECTED_COLOR;\nconst RECEIVED_COLOR = _chalk.default.red;\nexports.RECEIVED_COLOR = RECEIVED_COLOR;\nconst INVERTED_COLOR = _chalk.default.inverse;\nexports.INVERTED_COLOR = INVERTED_COLOR;\nconst BOLD_WEIGHT = _chalk.default.bold;\nexports.BOLD_WEIGHT = BOLD_WEIGHT;\nconst DIM_COLOR = _chalk.default.dim;\nexports.DIM_COLOR = DIM_COLOR;\nconst NUMBERS = [\n 'zero',\n 'one',\n 'two',\n 'three',\n 'four',\n 'five',\n 'six',\n 'seven',\n 'eight',\n 'nine',\n 'ten',\n 'eleven',\n 'twelve',\n 'thirteen'\n];\n\nconst SUGGEST_TO_CONTAIN_EQUAL = _chalk.default.dim(\n 'Looks like you wanted to test for object/array equality with the stricter `toContain` matcher. You probably need to use `toContainEqual` instead.'\n);\n\nexports.SUGGEST_TO_CONTAIN_EQUAL = SUGGEST_TO_CONTAIN_EQUAL;\n\nconst stringify = (object, maxDepth = 10) => {\n const MAX_LENGTH = 10000;\n let result;\n\n try {\n result = (0, _prettyFormat.default)(object, {\n maxDepth,\n min: true,\n plugins: PLUGINS\n });\n } catch (e) {\n result = (0, _prettyFormat.default)(object, {\n callToJSON: false,\n maxDepth,\n min: true,\n plugins: PLUGINS\n });\n }\n\n return result.length >= MAX_LENGTH && maxDepth > 1\n ? stringify(object, Math.floor(maxDepth / 2))\n : result;\n};\n\nexports.stringify = stringify;\n\nconst highlightTrailingWhitespace = text =>\n text.replace(/\\s+$/gm, _chalk.default.inverse('$&'));\n\nexports.highlightTrailingWhitespace = highlightTrailingWhitespace;\n\nconst printReceived = object =>\n RECEIVED_COLOR(highlightTrailingWhitespace(stringify(object)));\n\nexports.printReceived = printReceived;\n\nconst printExpected = value =>\n EXPECTED_COLOR(highlightTrailingWhitespace(stringify(value)));\n\nexports.printExpected = printExpected;\n\nconst printWithType = (\n name,\n value,\n print // printExpected or printReceived\n) => {\n const type = (0, _jestGetType.default)(value);\n const hasType =\n type !== 'null' && type !== 'undefined'\n ? `${name} has type: ${type}\\n`\n : '';\n const hasValue = `${name} has value: ${print(value)}`;\n return hasType + hasValue;\n};\n\nexports.printWithType = printWithType;\n\nconst ensureNoExpected = (expected, matcherName, options) => {\n if (typeof expected !== 'undefined') {\n // Prepend maybe not only for backward compatibility.\n const matcherString = (options ? '' : '[.not]') + matcherName;\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherString, undefined, '', options), // Because expected is omitted in hint above,\n 'this matcher must not have an expected argument',\n printWithType('Expected', expected, printExpected)\n )\n );\n }\n};\n\nexports.ensureNoExpected = ensureNoExpected;\n\nconst ensureActualIsNumber = (actual, matcherName, options) => {\n if (typeof actual !== 'number') {\n // Prepend maybe not only for backward compatibility.\n const matcherString = (options ? '' : '[.not]') + matcherName;\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherString, undefined, undefined, options),\n `${RECEIVED_COLOR('received')} value must be a number`,\n printWithType('Received', actual, printReceived)\n )\n );\n }\n};\n\nexports.ensureActualIsNumber = ensureActualIsNumber;\n\nconst ensureExpectedIsNumber = (expected, matcherName, options) => {\n if (typeof expected !== 'number') {\n // Prepend maybe not only for backward compatibility.\n const matcherString = (options ? '' : '[.not]') + matcherName;\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherString, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a number`,\n printWithType('Expected', expected, printExpected)\n )\n );\n }\n};\n\nexports.ensureExpectedIsNumber = ensureExpectedIsNumber;\n\nconst ensureNumbers = (actual, expected, matcherName, options) => {\n ensureActualIsNumber(actual, matcherName, options);\n ensureExpectedIsNumber(expected, matcherName, options);\n};\n\nexports.ensureNumbers = ensureNumbers;\n\nconst ensureExpectedIsNonNegativeInteger = (expected, matcherName, options) => {\n if (\n typeof expected !== 'number' ||\n !Number.isSafeInteger(expected) ||\n expected < 0\n ) {\n // Prepend maybe not only for backward compatibility.\n const matcherString = (options ? '' : '[.not]') + matcherName;\n throw new Error(\n matcherErrorMessage(\n matcherHint(matcherString, undefined, undefined, options),\n `${EXPECTED_COLOR('expected')} value must be a non-negative integer`,\n printWithType('Expected', expected, printExpected)\n )\n );\n }\n}; // Sometimes, e.g. when comparing two numbers, the output from jest-diff\n// does not contain more information than the `Expected:` / `Received:` already gives.\n// In those cases, we do not print a diff to make the output shorter and not redundant.\n\nexports.ensureExpectedIsNonNegativeInteger = ensureExpectedIsNonNegativeInteger;\n\nconst shouldPrintDiff = (actual, expected) => {\n if (typeof actual === 'number' && typeof expected === 'number') {\n return false;\n }\n\n if (typeof actual === 'boolean' && typeof expected === 'boolean') {\n return false;\n }\n\n return true;\n};\n\nconst diff = (a, b, options) =>\n shouldPrintDiff(a, b) ? (0, _jestDiff.default)(a, b, options) : null;\n\nexports.diff = diff;\n\nconst pluralize = (word, count) =>\n (NUMBERS[count] || count) + ' ' + word + (count === 1 ? '' : 's'); // To display lines of labeled values as two columns with monospace alignment:\n// given the strings which will describe the values,\n// return function which given each string, returns the label:\n// string, colon, space, and enough padding spaces to align the value.\n\nexports.pluralize = pluralize;\n\nconst getLabelPrinter = (...strings) => {\n const maxLength = strings.reduce(\n (max, string) => (string.length > max ? string.length : max),\n 0\n );\n return string => `${string}: ${' '.repeat(maxLength - string.length)}`;\n};\n\nexports.getLabelPrinter = getLabelPrinter;\n\nconst matcherErrorMessage = (\n hint,\n generic,\n specific // incorrect value returned from call to printWithType\n) =>\n `${hint}\\n\\n${_chalk.default.bold(\n 'Matcher error'\n )}: ${generic}\\n\\n${specific}`; // Display assertion for the report when a test fails.\n// New format: rejects/resolves, not, and matcher name have black color\n// Old format: matcher name has dim color\n\nexports.matcherErrorMessage = matcherErrorMessage;\n\nconst matcherHint = (\n matcherName,\n received = 'received',\n expected = 'expected',\n options = {}\n) => {\n const _options$comment = options.comment,\n comment = _options$comment === void 0 ? '' : _options$comment,\n _options$isDirectExpe = options.isDirectExpectCall,\n isDirectExpectCall =\n _options$isDirectExpe === void 0 ? false : _options$isDirectExpe,\n _options$isNot = options.isNot,\n isNot = _options$isNot === void 0 ? false : _options$isNot,\n _options$promise = options.promise,\n promise = _options$promise === void 0 ? '' : _options$promise,\n _options$secondArgume = options.secondArgument,\n secondArgument =\n _options$secondArgume === void 0 ? '' : _options$secondArgume;\n let hint = '';\n let dimString = 'expect'; // concatenate adjacent dim substrings\n\n if (!isDirectExpectCall && received !== '') {\n hint += DIM_COLOR(dimString + '(') + RECEIVED_COLOR(received);\n dimString = ')';\n }\n\n if (promise !== '') {\n hint += DIM_COLOR(dimString + '.') + promise;\n dimString = '';\n }\n\n if (isNot) {\n hint += DIM_COLOR(dimString + '.') + 'not';\n dimString = '';\n }\n\n if (matcherName.includes('.')) {\n // Old format: for backward compatibility,\n // especially without promise or isNot options\n dimString += matcherName;\n } else {\n // New format: omit period from matcherName arg\n hint += DIM_COLOR(dimString + '.') + matcherName;\n dimString = '';\n }\n\n if (expected === '') {\n dimString += '()';\n } else {\n hint += DIM_COLOR(dimString + '(') + EXPECTED_COLOR(expected);\n\n if (secondArgument) {\n hint += DIM_COLOR(', ') + EXPECTED_COLOR(secondArgument);\n }\n\n dimString = ')';\n }\n\n if (comment !== '') {\n dimString += ' // ' + comment;\n }\n\n if (dimString !== '') {\n hint += DIM_COLOR(dimString);\n }\n\n return hint;\n};\n\nexports.matcherHint = matcherHint;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nObject.defineProperty(exports, 'Frame', {\n enumerable: true,\n get: function get() {\n return _types.Frame;\n }\n});\nexports.separateMessageFromStack = exports.formatResultsErrors = exports.formatStackTrace = exports.getTopFrame = exports.getStackTraceLines = exports.formatExecError = void 0;\n\nvar _fs = _interopRequireDefault(require('fs'));\n\nvar _path = _interopRequireDefault(require('path'));\n\nvar _chalk = _interopRequireDefault(require('chalk'));\n\nvar _micromatch = _interopRequireDefault(require('micromatch'));\n\nvar _slash = _interopRequireDefault(require('slash'));\n\nvar _codeFrame = require('@babel/code-frame');\n\nvar _stackUtils = _interopRequireDefault(require('stack-utils'));\n\nvar _types = require('./types');\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\n\nvar jestReadFile =\n global[Symbol.for('jest-native-read-file')] || _fs.default.readFileSync;\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\n// stack utils tries to create pretty stack by making paths relative.\nconst stackUtils = new _stackUtils.default({\n cwd: 'something which does not exist'\n});\nlet nodeInternals = [];\n\ntry {\n nodeInternals = _stackUtils.default.nodeInternals();\n} catch (e) {\n // `StackUtils.nodeInternals()` fails in browsers. We don't need to remove\n // node internals in the browser though, so no issue.\n}\n\nconst PATH_NODE_MODULES = `${_path.default.sep}node_modules${\n _path.default.sep\n}`;\nconst PATH_JEST_PACKAGES = `${_path.default.sep}jest${\n _path.default.sep\n}packages${_path.default.sep}`; // filter for noisy stack trace lines\n\nconst JASMINE_IGNORE = /^\\s+at(?:(?:.jasmine\\-)|\\s+jasmine\\.buildExpectationResult)/;\nconst JEST_INTERNALS_IGNORE = /^\\s+at.*?jest(-.*?)?(\\/|\\\\)(build|node_modules|packages)(\\/|\\\\)/;\nconst ANONYMOUS_FN_IGNORE = /^\\s+at <anonymous>.*$/;\nconst ANONYMOUS_PROMISE_IGNORE = /^\\s+at (new )?Promise \\(<anonymous>\\).*$/;\nconst ANONYMOUS_GENERATOR_IGNORE = /^\\s+at Generator.next \\(<anonymous>\\).*$/;\nconst NATIVE_NEXT_IGNORE = /^\\s+at next \\(native\\).*$/;\nconst TITLE_INDENT = ' ';\nconst MESSAGE_INDENT = ' ';\nconst STACK_INDENT = ' ';\nconst ANCESTRY_SEPARATOR = ' \\u203A ';\n\nconst TITLE_BULLET = _chalk.default.bold('\\u25cf ');\n\nconst STACK_TRACE_COLOR = _chalk.default.dim;\nconst STACK_PATH_REGEXP = /\\s*at.*\\(?(\\:\\d*\\:\\d*|native)\\)?/;\nconst EXEC_ERROR_MESSAGE = 'Test suite failed to run';\nconst NOT_EMPTY_LINE_REGEXP = /^(?!$)/gm;\n\nconst indentAllLines = (lines, indent) =>\n lines.replace(NOT_EMPTY_LINE_REGEXP, indent);\n\nconst trim = string => (string || '').trim(); // Some errors contain not only line numbers in stack traces\n// e.g. SyntaxErrors can contain snippets of code, and we don't\n// want to trim those, because they may have pointers to the column/character\n// which will get misaligned.\n\nconst trimPaths = string =>\n string.match(STACK_PATH_REGEXP) ? trim(string) : string;\n\nconst getRenderedCallsite = (fileContent, line, column) => {\n let renderedCallsite = (0, _codeFrame.codeFrameColumns)(\n fileContent,\n {\n start: {\n column,\n line\n }\n },\n {\n highlightCode: true\n }\n );\n renderedCallsite = indentAllLines(renderedCallsite, MESSAGE_INDENT);\n renderedCallsite = `\\n${renderedCallsite}\\n`;\n return renderedCallsite;\n}; // ExecError is an error thrown outside of the test suite (not inside an `it` or\n// `before/after each` hooks). If it's thrown, none of the tests in the file\n// are executed.\n\nconst formatExecError = (error, config, options, testPath, reuseMessage) => {\n if (!error || typeof error === 'number') {\n error = new Error(`Expected an Error, but \"${String(error)}\" was thrown`);\n error.stack = '';\n }\n\n let message, stack;\n\n if (typeof error === 'string' || !error) {\n error || (error = 'EMPTY ERROR');\n message = '';\n stack = error;\n } else {\n message = error.message;\n stack = error.stack;\n }\n\n const separated = separateMessageFromStack(stack || '');\n stack = separated.stack;\n\n if (separated.message.indexOf(trim(message)) !== -1) {\n // Often stack trace already contains the duplicate of the message\n message = separated.message;\n }\n\n message = indentAllLines(message, MESSAGE_INDENT);\n stack =\n stack && !options.noStackTrace\n ? '\\n' + formatStackTrace(stack, config, options, testPath)\n : '';\n\n if (message.match(/^\\s*$/) && stack.match(/^\\s*$/)) {\n // this can happen if an empty object is thrown.\n message = MESSAGE_INDENT + 'Error: No message was provided';\n }\n\n let messageToUse;\n\n if (reuseMessage) {\n messageToUse = ` ${message.trim()}`;\n } else {\n messageToUse = `${EXEC_ERROR_MESSAGE}\\n\\n${message}`;\n }\n\n return TITLE_INDENT + TITLE_BULLET + messageToUse + stack + '\\n';\n};\n\nexports.formatExecError = formatExecError;\n\nconst removeInternalStackEntries = (lines, options) => {\n let pathCounter = 0;\n return lines.filter(line => {\n if (ANONYMOUS_FN_IGNORE.test(line)) {\n return false;\n }\n\n if (ANONYMOUS_PROMISE_IGNORE.test(line)) {\n return false;\n }\n\n if (ANONYMOUS_GENERATOR_IGNORE.test(line)) {\n return false;\n }\n\n if (NATIVE_NEXT_IGNORE.test(line)) {\n return false;\n }\n\n if (nodeInternals.some(internal => internal.test(line))) {\n return false;\n }\n\n if (!STACK_PATH_REGEXP.test(line)) {\n return true;\n }\n\n if (JASMINE_IGNORE.test(line)) {\n return false;\n }\n\n if (++pathCounter === 1) {\n return true; // always keep the first line even if it's from Jest\n }\n\n if (options.noStackTrace) {\n return false;\n }\n\n if (JEST_INTERNALS_IGNORE.test(line)) {\n return false;\n }\n\n return true;\n });\n};\n\nconst formatPaths = (config, relativeTestPath, line) => {\n // Extract the file path from the trace line.\n const match = line.match(/(^\\s*at .*?\\(?)([^()]+)(:[0-9]+:[0-9]+\\)?.*$)/);\n\n if (!match) {\n return line;\n }\n\n let filePath = (0, _slash.default)(\n _path.default.relative(config.rootDir, match[2])\n ); // highlight paths from the current test file\n\n if (\n (config.testMatch &&\n config.testMatch.length &&\n _micromatch.default.some(filePath, config.testMatch)) ||\n filePath === relativeTestPath\n ) {\n filePath = _chalk.default.reset.cyan(filePath);\n }\n\n return STACK_TRACE_COLOR(match[1]) + filePath + STACK_TRACE_COLOR(match[3]);\n};\n\nconst getStackTraceLines = (\n stack,\n options = {\n noStackTrace: false\n }\n) => removeInternalStackEntries(stack.split(/\\n/), options);\n\nexports.getStackTraceLines = getStackTraceLines;\n\nconst getTopFrame = lines => {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (\n var _iterator = lines[Symbol.iterator](), _step;\n !(_iteratorNormalCompletion = (_step = _iterator.next()).done);\n _iteratorNormalCompletion = true\n ) {\n const line = _step.value;\n\n if (\n line.includes(PATH_NODE_MODULES) ||\n line.includes(PATH_JEST_PACKAGES)\n ) {\n continue;\n }\n\n const parsedFrame = stackUtils.parseLine(line.trim());\n\n if (parsedFrame && parsedFrame.file) {\n return parsedFrame;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return null;\n};\n\nexports.getTopFrame = getTopFrame;\n\nconst formatStackTrace = (stack, config, options, testPath) => {\n const lines = getStackTraceLines(stack, options);\n const topFrame = getTopFrame(lines);\n let renderedCallsite = '';\n const relativeTestPath = testPath\n ? (0, _slash.default)(_path.default.relative(config.rootDir, testPath))\n : null;\n\n if (topFrame) {\n const column = topFrame.column,\n filename = topFrame.file,\n line = topFrame.line;\n\n if (line && filename && _path.default.isAbsolute(filename)) {\n let fileContent;\n\n try {\n // TODO: check & read HasteFS instead of reading the filesystem:\n // see: https://github.com/facebook/jest/pull/5405#discussion_r164281696\n fileContent = jestReadFile(filename, 'utf8');\n renderedCallsite = getRenderedCallsite(fileContent, line, column);\n } catch (e) {\n // the file does not exist or is inaccessible, we ignore\n }\n }\n }\n\n const stacktrace = lines\n .filter(Boolean)\n .map(\n line =>\n STACK_INDENT + formatPaths(config, relativeTestPath, trimPaths(line))\n )\n .join('\\n');\n return `${renderedCallsite}\\n${stacktrace}`;\n};\n\nexports.formatStackTrace = formatStackTrace;\n\nconst formatResultsErrors = (testResults, config, options, testPath) => {\n const failedResults = testResults.reduce((errors, result) => {\n result.failureMessages.forEach(content =>\n errors.push({\n content,\n result\n })\n );\n return errors;\n }, []);\n\n if (!failedResults.length) {\n return null;\n }\n\n return failedResults\n .map(({result, content}) => {\n let _separateMessageFromS = separateMessageFromStack(content),\n message = _separateMessageFromS.message,\n stack = _separateMessageFromS.stack;\n\n stack = options.noStackTrace\n ? ''\n : STACK_TRACE_COLOR(\n formatStackTrace(stack, config, options, testPath)\n ) + '\\n';\n message = indentAllLines(message, MESSAGE_INDENT);\n const title =\n _chalk.default.bold.red(\n TITLE_INDENT +\n TITLE_BULLET +\n result.ancestorTitles.join(ANCESTRY_SEPARATOR) +\n (result.ancestorTitles.length ? ANCESTRY_SEPARATOR : '') +\n result.title\n ) + '\\n';\n return title + '\\n' + message + '\\n' + stack;\n })\n .join('\\n');\n}; // jasmine and worker farm sometimes don't give us access to the actual\n// Error object, so we have to regexp out the message from the stack string\n// to format it.\n\nexports.formatResultsErrors = formatResultsErrors;\n\nconst separateMessageFromStack = content => {\n if (!content) {\n return {\n message: '',\n stack: ''\n };\n } // All lines up to what looks like a stack -- or if nothing looks like a stack\n // (maybe it's a code frame instead), just the first non-empty line.\n // If the error is a plain \"Error:\" instead of a SyntaxError or TypeError we\n // remove the prefix from the message because it is generally not useful.\n\n const messageMatch = content.match(\n /^(?:Error: )?([\\s\\S]*?(?=\\n\\s*at\\s.*\\:\\d*\\:\\d*)|\\s*.*)([\\s\\S]*)$/\n );\n\n if (!messageMatch) {\n // For flow\n throw new Error('If you hit this error, the regex above is buggy.');\n }\n\n const message = messageMatch[1];\n const stack = messageMatch[2];\n return {\n message,\n stack\n };\n};\n\nexports.separateMessageFromStack = separateMessageFromStack;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printIteratorEntries = printIteratorEntries;\nexports.printIteratorValues = printIteratorValues;\nexports.printListItems = printListItems;\nexports.printObjectProperties = printObjectProperties;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst getKeysOfEnumerableProperties = object => {\n const keys = Object.keys(object).sort();\n\n if (Object.getOwnPropertySymbols) {\n Object.getOwnPropertySymbols(object).forEach(symbol => {\n if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {\n keys.push(symbol);\n }\n });\n }\n\n return keys;\n};\n/**\n * Return entries (for example, of a map)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printIteratorEntries( // Flow 0.51.0: property `@@iterator` of $Iterator not found in Object\n // To allow simplistic getRecordIterator in immutable.js\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer, // Too bad, so sad that separator for ECMAScript Map has been ' => '\n // What a distracting diff if you change a data structure to/from\n separator = ': '\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n const name = printer(\n current.value[0],\n config,\n indentationNext,\n depth,\n refs\n );\n const value = printer(\n current.value[1],\n config,\n indentationNext,\n depth,\n refs\n );\n result += indentationNext + name + separator + value;\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return values (for example, of a set)\n * with spacing, indentation, and comma\n * without surrounding punctuation (braces or brackets)\n */\n\nfunction printIteratorValues(\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n result +=\n indentationNext +\n printer(current.value, config, indentationNext, depth, refs);\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return items (for example, of an array)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, brackets)\n **/\n\nfunction printListItems(list, config, indentation, depth, refs, printer) {\n let result = '';\n\n if (list.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < list.length; i++) {\n result +=\n indentationNext +\n printer(list[i], config, indentationNext, depth, refs);\n\n if (i < list.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return properties of an object\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printObjectProperties(val, config, indentation, depth, refs, printer) {\n let result = '';\n const keys = getKeysOfEnumerableProperties(val);\n\n if (keys.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = printer(key, config, indentationNext, depth, refs);\n const value = printer(val[key], config, indentationNext, depth, refs);\n result += indentationNext + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n","'use strict';\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nvar _collections = require('./collections');\n\nvar _AsymmetricMatcher = _interopRequireDefault(\n require('./plugins/AsymmetricMatcher')\n);\n\nvar _ConvertAnsi = _interopRequireDefault(require('./plugins/ConvertAnsi'));\n\nvar _DOMCollection = _interopRequireDefault(require('./plugins/DOMCollection'));\n\nvar _DOMElement = _interopRequireDefault(require('./plugins/DOMElement'));\n\nvar _Immutable = _interopRequireDefault(require('./plugins/Immutable'));\n\nvar _ReactElement = _interopRequireDefault(require('./plugins/ReactElement'));\n\nvar _ReactTestComponent = _interopRequireDefault(\n require('./plugins/ReactTestComponent')\n);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = Symbol.prototype.toString;\n/**\n * Explicitly comparing typeof constructor to function avoids undefined as name\n * when mock identity-obj-proxy returns the key as the value for any key.\n */\n\nconst getConstructorName = val =>\n (typeof val.constructor === 'function' && val.constructor.name) || 'Object';\n/* global window */\n\n/** Is val is equal to global window object? Works even if it does not exist :) */\n\nconst isWindow = val => typeof window !== 'undefined' && val === window;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/gi;\n\nclass PrettyFormatPluginError extends Error {\n constructor(message, stack) {\n super(message);\n this.stack = stack;\n this.name = this.constructor.name;\n }\n}\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n return Object.is(val, -0) ? '-0' : String(val);\n}\n\nfunction printBigInt(val) {\n return String(`${val}n`);\n}\n\nfunction printFunction(val, printFunctionName) {\n if (!printFunctionName) {\n return '[Function]';\n }\n\n return '[Function ' + (val.name || 'anonymous') + ']';\n}\n\nfunction printSymbol(val) {\n return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n/**\n * The first port of call for printing an object, handles most of the\n * data-types in JS.\n */\n\nfunction printBasicValue(val, printFunctionName, escapeRegex, escapeString) {\n if (val === true || val === false) {\n return '' + val;\n }\n\n if (val === undefined) {\n return 'undefined';\n }\n\n if (val === null) {\n return 'null';\n }\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') {\n return printNumber(val);\n }\n\n if (typeOf === 'bigint') {\n return printBigInt(val);\n }\n\n if (typeOf === 'string') {\n if (escapeString) {\n return '\"' + val.replace(/\"|\\\\/g, '\\\\$&') + '\"';\n }\n\n return '\"' + val + '\"';\n }\n\n if (typeOf === 'function') {\n return printFunction(val, printFunctionName);\n }\n\n if (typeOf === 'symbol') {\n return printSymbol(val);\n }\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') {\n return 'WeakMap {}';\n }\n\n if (toStringed === '[object WeakSet]') {\n return 'WeakSet {}';\n }\n\n if (\n toStringed === '[object Function]' ||\n toStringed === '[object GeneratorFunction]'\n ) {\n return printFunction(val, printFunctionName);\n }\n\n if (toStringed === '[object Symbol]') {\n return printSymbol(val);\n }\n\n if (toStringed === '[object Date]') {\n return isNaN(+val) ? 'Date { NaN }' : toISOString.call(val);\n }\n\n if (toStringed === '[object Error]') {\n return printError(val);\n }\n\n if (toStringed === '[object RegExp]') {\n if (escapeRegex) {\n // https://github.com/benjamingr/RegExp.escape/blob/master/polyfill.js\n return regExpToString.call(val).replace(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n return regExpToString.call(val);\n }\n\n if (val instanceof Error) {\n return printError(val);\n }\n\n return null;\n}\n/**\n * Handles more complex objects ( such as objects with circular references.\n * maps and sets etc )\n */\n\nfunction printComplexValue(\n val,\n config,\n indentation,\n depth,\n refs,\n hasCalledToJSON\n) {\n if (refs.indexOf(val) !== -1) {\n return '[Circular]';\n }\n\n refs = refs.slice();\n refs.push(val);\n const hitMaxDepth = ++depth > config.maxDepth;\n const min = config.min;\n\n if (\n config.callToJSON &&\n !hitMaxDepth &&\n val.toJSON &&\n typeof val.toJSON === 'function' &&\n !hasCalledToJSON\n ) {\n return printer(val.toJSON(), config, indentation, depth, refs, true);\n }\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth\n ? '[Arguments]'\n : (min ? '' : 'Arguments ') +\n '[' +\n (0, _collections.printListItems)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n }\n\n if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth\n ? '[' + val.constructor.name + ']'\n : (min ? '' : val.constructor.name + ' ') +\n '[' +\n (0, _collections.printListItems)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n }\n\n if (toStringed === '[object Map]') {\n return hitMaxDepth\n ? '[Map]'\n : 'Map {' +\n (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer,\n ' => '\n ) +\n '}';\n }\n\n if (toStringed === '[object Set]') {\n return hitMaxDepth\n ? '[Set]'\n : 'Set {' +\n (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n } // Avoid failure to serialize global window object in jsdom test environment.\n // For example, not even relevant if window is prop of React element.\n\n return hitMaxDepth || isWindow(val)\n ? '[' + getConstructorName(val) + ']'\n : (min ? '' : getConstructorName(val) + ' ') +\n '{' +\n (0, _collections.printObjectProperties)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n}\n\nfunction isNewPlugin(plugin) {\n return plugin.serialize != null;\n}\n\nfunction printPlugin(plugin, val, config, indentation, depth, refs) {\n let printed;\n\n try {\n printed = isNewPlugin(plugin)\n ? plugin.serialize(val, config, indentation, depth, refs, printer)\n : plugin.print(\n val,\n valChild => printer(valChild, config, indentation, depth, refs),\n str => {\n const indentationNext = indentation + config.indent;\n return (\n indentationNext +\n str.replace(NEWLINE_REGEXP, '\\n' + indentationNext)\n );\n },\n {\n edgeSpacing: config.spacingOuter,\n min: config.min,\n spacing: config.spacingInner\n },\n config.colors\n );\n } catch (error) {\n throw new PrettyFormatPluginError(error.message, error.stack);\n }\n\n if (typeof printed !== 'string') {\n throw new Error(\n `pretty-format: Plugin must return type \"string\" but instead returned \"${typeof printed}\".`\n );\n }\n\n return printed;\n}\n\nfunction findPlugin(plugins, val) {\n for (let p = 0; p < plugins.length; p++) {\n try {\n if (plugins[p].test(val)) {\n return plugins[p];\n }\n } catch (error) {\n throw new PrettyFormatPluginError(error.message, error.stack);\n }\n }\n\n return null;\n}\n\nfunction printer(val, config, indentation, depth, refs, hasCalledToJSON) {\n const plugin = findPlugin(config.plugins, val);\n\n if (plugin !== null) {\n return printPlugin(plugin, val, config, indentation, depth, refs);\n }\n\n const basicResult = printBasicValue(\n val,\n config.printFunctionName,\n config.escapeRegex,\n config.escapeString\n );\n\n if (basicResult !== null) {\n return basicResult;\n }\n\n return printComplexValue(\n val,\n config,\n indentation,\n depth,\n refs,\n hasCalledToJSON\n );\n}\n\nconst DEFAULT_THEME = {\n comment: 'gray',\n content: 'reset',\n prop: 'yellow',\n tag: 'cyan',\n value: 'green'\n};\nconst DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);\nconst DEFAULT_OPTIONS = {\n callToJSON: true,\n escapeRegex: false,\n escapeString: true,\n highlight: false,\n indent: 2,\n maxDepth: Infinity,\n min: false,\n plugins: [],\n printFunctionName: true,\n theme: DEFAULT_THEME\n};\n\nfunction validateOptions(options) {\n Object.keys(options).forEach(key => {\n if (!DEFAULT_OPTIONS.hasOwnProperty(key)) {\n throw new Error(`pretty-format: Unknown option \"${key}\".`);\n }\n });\n\n if (options.min && options.indent !== undefined && options.indent !== 0) {\n throw new Error(\n 'pretty-format: Options \"min\" and \"indent\" cannot be used together.'\n );\n }\n\n if (options.theme !== undefined) {\n if (options.theme === null) {\n throw new Error(`pretty-format: Option \"theme\" must not be null.`);\n }\n\n if (typeof options.theme !== 'object') {\n throw new Error(\n `pretty-format: Option \"theme\" must be of type \"object\" but instead received \"${typeof options.theme}\".`\n );\n }\n }\n}\n\nconst getColorsHighlight = options =>\n DEFAULT_THEME_KEYS.reduce((colors, key) => {\n const value =\n options.theme && options.theme[key] !== undefined\n ? options.theme[key]\n : DEFAULT_THEME[key];\n const color = _ansiStyles.default[value];\n\n if (\n color &&\n typeof color.close === 'string' &&\n typeof color.open === 'string'\n ) {\n colors[key] = color;\n } else {\n throw new Error(\n `pretty-format: Option \"theme\" has a key \"${key}\" whose value \"${value}\" is undefined in ansi-styles.`\n );\n }\n\n return colors;\n }, Object.create(null));\n\nconst getColorsEmpty = () =>\n DEFAULT_THEME_KEYS.reduce((colors, key) => {\n colors[key] = {\n close: '',\n open: ''\n };\n return colors;\n }, Object.create(null));\n\nconst getPrintFunctionName = options =>\n options && options.printFunctionName !== undefined\n ? options.printFunctionName\n : DEFAULT_OPTIONS.printFunctionName;\n\nconst getEscapeRegex = options =>\n options && options.escapeRegex !== undefined\n ? options.escapeRegex\n : DEFAULT_OPTIONS.escapeRegex;\n\nconst getEscapeString = options =>\n options && options.escapeString !== undefined\n ? options.escapeString\n : DEFAULT_OPTIONS.escapeString;\n\nconst getConfig = options => ({\n callToJSON:\n options && options.callToJSON !== undefined\n ? options.callToJSON\n : DEFAULT_OPTIONS.callToJSON,\n colors:\n options && options.highlight\n ? getColorsHighlight(options)\n : getColorsEmpty(),\n escapeRegex: getEscapeRegex(options),\n escapeString: getEscapeString(options),\n indent:\n options && options.min\n ? ''\n : createIndent(\n options && options.indent !== undefined\n ? options.indent\n : DEFAULT_OPTIONS.indent\n ),\n maxDepth:\n options && options.maxDepth !== undefined\n ? options.maxDepth\n : DEFAULT_OPTIONS.maxDepth,\n min: options && options.min !== undefined ? options.min : DEFAULT_OPTIONS.min,\n plugins:\n options && options.plugins !== undefined\n ? options.plugins\n : DEFAULT_OPTIONS.plugins,\n printFunctionName: getPrintFunctionName(options),\n spacingInner: options && options.min ? ' ' : '\\n',\n spacingOuter: options && options.min ? '' : '\\n'\n});\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n/**\n * Returns a presentation string of your `val` object\n * @param val any potential JavaScript object\n * @param options Custom settings\n */\n\nfunction prettyFormat(val, options) {\n if (options) {\n validateOptions(options);\n\n if (options.plugins) {\n const plugin = findPlugin(options.plugins, val);\n\n if (plugin !== null) {\n return printPlugin(plugin, val, getConfig(options), '', 0, []);\n }\n }\n }\n\n const basicResult = printBasicValue(\n val,\n getPrintFunctionName(options),\n getEscapeRegex(options),\n getEscapeString(options)\n );\n\n if (basicResult !== null) {\n return basicResult;\n }\n\n return printComplexValue(val, getConfig(options), '', 0, []);\n}\n\nprettyFormat.plugins = {\n AsymmetricMatcher: _AsymmetricMatcher.default,\n ConvertAnsi: _ConvertAnsi.default,\n DOMCollection: _DOMCollection.default,\n DOMElement: _DOMElement.default,\n Immutable: _Immutable.default,\n ReactElement: _ReactElement.default,\n ReactTestComponent: _ReactTestComponent.default\n};\n/* eslint-disable-next-line no-redeclare */\n\nmodule.exports = prettyFormat;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.test = exports.serialize = void 0;\n\nvar _collections = require('../collections');\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst asymmetricMatcher = Symbol.for('jest.asymmetricMatcher');\nconst SPACE = ' ';\n\nconst serialize = (val, config, indentation, depth, refs, printer) => {\n const stringedValue = val.toString();\n\n if (\n stringedValue === 'ArrayContaining' ||\n stringedValue === 'ArrayNotContaining'\n ) {\n if (++depth > config.maxDepth) {\n return '[' + stringedValue + ']';\n }\n\n return (\n stringedValue +\n SPACE +\n '[' +\n (0, _collections.printListItems)(\n val.sample,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']'\n );\n }\n\n if (\n stringedValue === 'ObjectContaining' ||\n stringedValue === 'ObjectNotContaining'\n ) {\n if (++depth > config.maxDepth) {\n return '[' + stringedValue + ']';\n }\n\n return (\n stringedValue +\n SPACE +\n '{' +\n (0, _collections.printObjectProperties)(\n val.sample,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n );\n }\n\n if (\n stringedValue === 'StringMatching' ||\n stringedValue === 'StringNotMatching'\n ) {\n return (\n stringedValue +\n SPACE +\n printer(val.sample, config, indentation, depth, refs)\n );\n }\n\n if (\n stringedValue === 'StringContaining' ||\n stringedValue === 'StringNotContaining'\n ) {\n return (\n stringedValue +\n SPACE +\n printer(val.sample, config, indentation, depth, refs)\n );\n }\n\n return val.toAsymmetricMatcher();\n};\n\nexports.serialize = serialize;\n\nconst test = val => val && val.$$typeof === asymmetricMatcher;\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.serialize = exports.test = void 0;\n\nvar _ansiRegex = _interopRequireDefault(require('ansi-regex'));\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst toHumanReadableAnsi = text =>\n text.replace((0, _ansiRegex.default)(), match => {\n switch (match) {\n case _ansiStyles.default.red.close:\n case _ansiStyles.default.green.close:\n case _ansiStyles.default.cyan.close:\n case _ansiStyles.default.gray.close:\n case _ansiStyles.default.white.close:\n case _ansiStyles.default.yellow.close:\n case _ansiStyles.default.bgRed.close:\n case _ansiStyles.default.bgGreen.close:\n case _ansiStyles.default.bgYellow.close:\n case _ansiStyles.default.inverse.close:\n case _ansiStyles.default.dim.close:\n case _ansiStyles.default.bold.close:\n case _ansiStyles.default.reset.open:\n case _ansiStyles.default.reset.close:\n return '</>';\n\n case _ansiStyles.default.red.open:\n return '<red>';\n\n case _ansiStyles.default.green.open:\n return '<green>';\n\n case _ansiStyles.default.cyan.open:\n return '<cyan>';\n\n case _ansiStyles.default.gray.open:\n return '<gray>';\n\n case _ansiStyles.default.white.open:\n return '<white>';\n\n case _ansiStyles.default.yellow.open:\n return '<yellow>';\n\n case _ansiStyles.default.bgRed.open:\n return '<bgRed>';\n\n case _ansiStyles.default.bgGreen.open:\n return '<bgGreen>';\n\n case _ansiStyles.default.bgYellow.open:\n return '<bgYellow>';\n\n case _ansiStyles.default.inverse.open:\n return '<inverse>';\n\n case _ansiStyles.default.dim.open:\n return '<dim>';\n\n case _ansiStyles.default.bold.open:\n return '<bold>';\n\n default:\n return '';\n }\n });\n\nconst test = val =>\n typeof val === 'string' && !!val.match((0, _ansiRegex.default)());\n\nexports.test = test;\n\nconst serialize = (val, config, indentation, depth, refs, printer) =>\n printer(toHumanReadableAnsi(val), config, indentation, depth, refs);\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.serialize = exports.test = void 0;\n\nvar _collections = require('../collections');\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(\n Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n })\n );\n }\n ownKeys.forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n }\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nconst SPACE = ' ';\nconst OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];\nconst ARRAY_REGEXP = /^(HTML\\w*Collection|NodeList)$/;\n\nconst testName = name =>\n OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);\n\nconst test = val =>\n val &&\n val.constructor &&\n val.constructor.name &&\n testName(val.constructor.name); // Convert array of attribute objects to props object.\n\nexports.test = test;\n\nconst propsReducer = (props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n};\n\nconst serialize = (collection, config, indentation, depth, refs, printer) => {\n const name = collection.constructor.name;\n\n if (++depth > config.maxDepth) {\n return '[' + name + ']';\n }\n\n return (\n (config.min ? '' : name + SPACE) +\n (OBJECT_NAMES.indexOf(name) !== -1\n ? '{' +\n (0, _collections.printObjectProperties)(\n name === 'NamedNodeMap'\n ? Array.prototype.reduce.call(collection, propsReducer, {})\n : _objectSpread({}, collection),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n : '[' +\n (0, _collections.printListItems)(\n Array.from(collection),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']')\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.serialize = exports.test = void 0;\n\nvar _markup = require('./lib/markup');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst ELEMENT_NODE = 1;\nconst TEXT_NODE = 3;\nconst COMMENT_NODE = 8;\nconst FRAGMENT_NODE = 11;\nconst ELEMENT_REGEXP = /^((HTML|SVG)\\w*)?Element$/;\n\nconst testNode = (nodeType, name) =>\n (nodeType === ELEMENT_NODE && ELEMENT_REGEXP.test(name)) ||\n (nodeType === TEXT_NODE && name === 'Text') ||\n (nodeType === COMMENT_NODE && name === 'Comment') ||\n (nodeType === FRAGMENT_NODE && name === 'DocumentFragment');\n\nconst test = val =>\n val &&\n val.constructor &&\n val.constructor.name &&\n testNode(val.nodeType, val.constructor.name);\n\nexports.test = test;\n\nfunction nodeIsText(node) {\n return node.nodeType === TEXT_NODE;\n}\n\nfunction nodeIsComment(node) {\n return node.nodeType === COMMENT_NODE;\n}\n\nfunction nodeIsFragment(node) {\n return node.nodeType === FRAGMENT_NODE;\n}\n\nconst serialize = (node, config, indentation, depth, refs, printer) => {\n if (nodeIsText(node)) {\n return (0, _markup.printText)(node.data, config);\n }\n\n if (nodeIsComment(node)) {\n return (0, _markup.printComment)(node.data, config);\n }\n\n const type = nodeIsFragment(node)\n ? `DocumentFragment`\n : node.tagName.toLowerCase();\n\n if (++depth > config.maxDepth) {\n return (0, _markup.printElementAsLeaf)(type, config);\n }\n\n return (0, _markup.printElement)(\n type,\n (0, _markup.printProps)(\n nodeIsFragment(node)\n ? []\n : Array.from(node.attributes)\n .map(attr => attr.name)\n .sort(),\n nodeIsFragment(node)\n ? []\n : Array.from(node.attributes).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {}),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n (0, _markup.printChildren)(\n Array.prototype.slice.call(node.childNodes || node.children),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n config,\n indentation\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.test = exports.serialize = void 0;\n\nvar _collections = require('../collections');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// SENTINEL constants are from https://github.com/facebook/immutable-js\nconst IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\nconst IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\nconst IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\nconst IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\nconst IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\nconst IS_RECORD_SENTINEL = '@@__IMMUTABLE_RECORD__@@'; // immutable v4\n\nconst IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\nconst IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\nconst IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\nconst getImmutableName = name => 'Immutable.' + name;\n\nconst printAsLeaf = name => '[' + name + ']';\n\nconst SPACE = ' ';\nconst LAZY = '…'; // Seq is lazy if it calls a method like filter\n\nconst printImmutableEntries = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n type\n) =>\n ++depth > config.maxDepth\n ? printAsLeaf(getImmutableName(type))\n : getImmutableName(type) +\n SPACE +\n '{' +\n (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'; // Record has an entries method because it is a collection in immutable v3.\n// Return an iterator for Immutable Record from version v3 or v4.\n\nconst getRecordEntries = val => {\n let i = 0;\n return {\n next() {\n if (i < val._keys.length) {\n const key = val._keys[i++];\n return {\n done: false,\n value: [key, val.get(key)]\n };\n }\n\n return {\n done: true\n };\n }\n };\n};\n\nconst printImmutableRecord = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n) => {\n // _name property is defined only for an Immutable Record instance\n // which was constructed with a second optional descriptive name arg\n const name = getImmutableName(val._name || 'Record');\n return ++depth > config.maxDepth\n ? printAsLeaf(name)\n : name +\n SPACE +\n '{' +\n (0, _collections.printIteratorEntries)(\n getRecordEntries(val),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n};\n\nconst printImmutableSeq = (val, config, indentation, depth, refs, printer) => {\n const name = getImmutableName('Seq');\n\n if (++depth > config.maxDepth) {\n return printAsLeaf(name);\n }\n\n if (val[IS_KEYED_SENTINEL]) {\n return (\n name +\n SPACE +\n '{' + // from Immutable collection of entries or from ECMAScript object\n (val._iter || val._object\n ? (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer\n )\n : LAZY) +\n '}'\n );\n }\n\n return (\n name +\n SPACE +\n '[' +\n (val._iter || // from Immutable collection of values\n val._array || // from ECMAScript array\n val._collection || // from ECMAScript collection in immutable v4\n val._iterable // from ECMAScript collection in immutable v3\n ? (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n )\n : LAZY) +\n ']'\n );\n};\n\nconst printImmutableValues = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n type\n) =>\n ++depth > config.maxDepth\n ? printAsLeaf(getImmutableName(type))\n : getImmutableName(type) +\n SPACE +\n '[' +\n (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n\nconst serialize = (val, config, indentation, depth, refs, printer) => {\n if (val[IS_MAP_SENTINEL]) {\n return printImmutableEntries(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n val[IS_ORDERED_SENTINEL] ? 'OrderedMap' : 'Map'\n );\n }\n\n if (val[IS_LIST_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n 'List'\n );\n }\n\n if (val[IS_SET_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n val[IS_ORDERED_SENTINEL] ? 'OrderedSet' : 'Set'\n );\n }\n\n if (val[IS_STACK_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n 'Stack'\n );\n }\n\n if (val[IS_SEQ_SENTINEL]) {\n return printImmutableSeq(val, config, indentation, depth, refs, printer);\n } // For compatibility with immutable v3 and v4, let record be the default.\n\n return printImmutableRecord(val, config, indentation, depth, refs, printer);\n}; // Explicitly comparing sentinel properties to true avoids false positive\n// when mock identity-obj-proxy returns the key as the value for any key.\n\nexports.serialize = serialize;\n\nconst test = val =>\n val &&\n (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.test = exports.serialize = void 0;\n\nvar ReactIs = _interopRequireWildcard(require('react-is'));\n\nvar _markup = require('./lib/markup');\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc =\n Object.defineProperty && Object.getOwnPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : {};\n if (desc.get || desc.set) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// Given element.props.children, or subtree during recursive traversal,\n// return flattened array of children.\nconst getChildren = (arg, children = []) => {\n if (Array.isArray(arg)) {\n arg.forEach(item => {\n getChildren(item, children);\n });\n } else if (arg != null && arg !== false) {\n children.push(arg);\n }\n\n return children;\n};\n\nconst getType = element => {\n const type = element.type;\n\n if (typeof type === 'string') {\n return type;\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || 'Unknown';\n }\n\n if (ReactIs.isFragment(element)) {\n return 'React.Fragment';\n }\n\n if (ReactIs.isSuspense(element)) {\n return 'React.Suspense';\n }\n\n if (typeof type === 'object' && type !== null) {\n if (ReactIs.isContextProvider(element)) {\n return 'Context.Provider';\n }\n\n if (ReactIs.isContextConsumer(element)) {\n return 'Context.Consumer';\n }\n\n if (ReactIs.isForwardRef(element)) {\n const functionName = type.render.displayName || type.render.name || '';\n return functionName !== ''\n ? 'ForwardRef(' + functionName + ')'\n : 'ForwardRef';\n }\n\n if (ReactIs.isMemo(type)) {\n const functionName = type.type.displayName || type.type.name || '';\n return functionName !== '' ? 'Memo(' + functionName + ')' : 'Memo';\n }\n }\n\n return 'UNDEFINED';\n};\n\nconst getPropKeys = element => {\n const props = element.props;\n return Object.keys(props)\n .filter(key => key !== 'children' && props[key] !== undefined)\n .sort();\n};\n\nconst serialize = (element, config, indentation, depth, refs, printer) =>\n ++depth > config.maxDepth\n ? (0, _markup.printElementAsLeaf)(getType(element), config)\n : (0, _markup.printElement)(\n getType(element),\n (0, _markup.printProps)(\n getPropKeys(element),\n element.props,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n (0, _markup.printChildren)(\n getChildren(element.props.children),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n config,\n indentation\n );\n\nexports.serialize = serialize;\n\nconst test = val => val && ReactIs.isElement(val);\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.test = exports.serialize = void 0;\n\nvar _markup = require('./lib/markup');\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst testSymbol = Symbol.for('react.test.json');\n\nconst getPropKeys = object => {\n const props = object.props;\n return props\n ? Object.keys(props)\n .filter(key => props[key] !== undefined)\n .sort()\n : [];\n};\n\nconst serialize = (object, config, indentation, depth, refs, printer) =>\n ++depth > config.maxDepth\n ? (0, _markup.printElementAsLeaf)(object.type, config)\n : (0, _markup.printElement)(\n object.type,\n object.props\n ? (0, _markup.printProps)(\n getPropKeys(object),\n object.props,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n )\n : '',\n object.children\n ? (0, _markup.printChildren)(\n object.children,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n )\n : '',\n config,\n indentation\n );\n\nexports.serialize = serialize;\n\nconst test = val => val && val.$$typeof === testSymbol;\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = escapeHTML;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nfunction escapeHTML(str) {\n return str.replace(/</g, '<').replace(/>/g, '>');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printElementAsLeaf = exports.printElement = exports.printComment = exports.printText = exports.printChildren = exports.printProps = void 0;\n\nvar _escapeHTML = _interopRequireDefault(require('./escapeHTML'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// Return empty string if keys is empty.\nconst printProps = (keys, props, config, indentation, depth, refs, printer) => {\n const indentationNext = indentation + config.indent;\n const colors = config.colors;\n return keys\n .map(key => {\n const value = props[key];\n let printed = printer(value, config, indentationNext, depth, refs);\n\n if (typeof value !== 'string') {\n if (printed.indexOf('\\n') !== -1) {\n printed =\n config.spacingOuter +\n indentationNext +\n printed +\n config.spacingOuter +\n indentation;\n }\n\n printed = '{' + printed + '}';\n }\n\n return (\n config.spacingInner +\n indentation +\n colors.prop.open +\n key +\n colors.prop.close +\n '=' +\n colors.value.open +\n printed +\n colors.value.close\n );\n })\n .join('');\n}; // Return empty string if children is empty.\n\nexports.printProps = printProps;\n\nconst printChildren = (children, config, indentation, depth, refs, printer) =>\n children\n .map(\n child =>\n config.spacingOuter +\n indentation +\n (typeof child === 'string'\n ? printText(child, config)\n : printer(child, config, indentation, depth, refs))\n )\n .join('');\n\nexports.printChildren = printChildren;\n\nconst printText = (text, config) => {\n const contentColor = config.colors.content;\n return (\n contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close\n );\n};\n\nexports.printText = printText;\n\nconst printComment = (comment, config) => {\n const commentColor = config.colors.comment;\n return (\n commentColor.open +\n '<!--' +\n (0, _escapeHTML.default)(comment) +\n '-->' +\n commentColor.close\n );\n}; // Separate the functions to format props, children, and element,\n// so a plugin could override a particular function, if needed.\n// Too bad, so sad: the traditional (but unnecessary) space\n// in a self-closing tagColor requires a second test of printedProps.\n\nexports.printComment = printComment;\n\nconst printElement = (\n type,\n printedProps,\n printedChildren,\n config,\n indentation\n) => {\n const tagColor = config.colors.tag;\n return (\n tagColor.open +\n '<' +\n type +\n (printedProps &&\n tagColor.close +\n printedProps +\n config.spacingOuter +\n indentation +\n tagColor.open) +\n (printedChildren\n ? '>' +\n tagColor.close +\n printedChildren +\n config.spacingOuter +\n indentation +\n tagColor.open +\n '</' +\n type\n : (printedProps && !config.min ? '' : ' ') + '/') +\n '>' +\n tagColor.close\n );\n};\n\nexports.printElement = printElement;\n\nconst printElementAsLeaf = (type, config) => {\n const tagColor = config.colors.tag;\n return (\n tagColor.open +\n '<' +\n type +\n tagColor.close +\n ' …' +\n tagColor.open +\n ' />' +\n tagColor.close\n );\n};\n\nexports.printElementAsLeaf = printElementAsLeaf;\n"],"sourceRoot":""} |