diff --git a/README.md b/README.md index 04cf47c..9b0ab47 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ iReal Pro to MusicXML converter. [Check out the demo!](https://blog.karimratib.me/demos/chirp/) You can upload one of the [iReal Pro main playlists](https://www.irealpro.com/main-playlists/) as a test. # Installation -- Install `xmllint` (included in [libxml2](http://www.xmlsoft.org/) on most platforms) +- Install `xmllint` (included in [libxml2](http://www.xmlsoft.org/) on most platforms) - only needed for validation - `npm install && npm run build` - `npm test` @@ -60,21 +60,21 @@ The chords found in the iReal Pro song are translated to their MusicXML represen An additional detail is the handling of "alternate chords" that can be specified in iReal Pro - these also [will be handled in this converter eventually](https://github.com/infojunkie/ireal-musicxml/issues/2). ## Rhythmic information -Because iReal Pro uses a fixed grid for each bar, rhythmic assumptions need to be made, [both in the iReal Pro app itself](https://www.irealb.com/forums/showthread.php?25161-Using-empty-cells-to-control-chord-duration) and in this converter. The [timing algorithm is described in this blog post](https://blog.karimratib.me/2020/11/30/ireal-musicxml.html#emulating-the-ireal-pro-playback-model), and some [follow-up works remains to be done](https://github.com/infojunkie/ireal-musicxml/issues/54). +Because iReal Pro uses a fixed grid for each bar, timing assumptions need to be made about chord onsets, [both in the iReal Pro app itself](https://www.irealb.com/forums/showthread.php?25161-Using-empty-cells-to-control-chord-duration) and in this converter. The [timing algorithm is described in this blog post](https://blog.karimratib.me/2020/11/30/ireal-musicxml.html#emulating-the-ireal-pro-playback-model), and some [follow-up works remains to be done](https://github.com/infojunkie/ireal-musicxml/issues/54). ## Layout and styling information -The styling and layout of lead sheets has evolved over time to improve their accessibility in live situations, where musical information needs to be concise and readable. This includes the following score customizations: +iReal Pro has a distinctive visual sheet style that aims to enhance readability. This converter attempts to recreate this visual style: - Using rhythmic notation or slash notation to display the chords -- Enhancing the size of the noteheads and chord names +- Increasing the size of noteheads and chord names - Removing uneeded elements from the score, such as clef and staff lines - Respecting the original positioning of measures to best reflect the structure of the song - Fitting the score on one page where at all possible -The MusicXML layouting support is expressive enough to represent all these customizations. Unfortunately, existing engraving software do not support the full set of MusicXML directives, thus being only partially able to recreate the intended scores. The (heavy-handed) solution is to go one additional step to [manually convert the MusicXML output from this present converter to the native format of the desired engraving software](https://github.com/infojunkie/ireal-musicxml/issues/16). +MusicXML support for layout and style is expressive enough to represent all these customizations. Unfortunately, existing engraving software do not support the full set of MusicXML directives, thus recreating the intended style only partially. The (heavy-handed) solution is to go one additional step and [convert the MusicXML output from this present converter to the native format of the desired engraving software](https://github.com/infojunkie/ireal-musicxml/issues/16). ## Backing track information -The backing track patterns of the iReal Pro styles are not documented. Therefore, a mapping needs to be made to support a play back of the converted MusicXML scores that replicates or approximates the original iReal Pro playback. This is achieved in 2 phases: +The backing track patterns of the iReal Pro styles are not documented. Therefore, a mapping is done to support playing back the converted MusicXML scores that replicates or approximates the original iReal Pro playback. This is achieved in 2 phases: - First, the MusicXML `sound/play/other-play[@type = 'groove']` element is used to capture the playback style as specified in the iReal Pro song. Because MusicXML does not currently feature a dedicated element to specify the performance style, the generic `other-play` element was [selected to capture this information](https://github.com/w3c/musicxml/discussions/449). - - Next, the downstream playback component interprets the above MusicXML element to generate a backing track for the score. This is done in the [`musicxml-midi`](https://github.com/infojunkie/musicxml-midi) component that utilizes an extensive library of "grooves" to map the incoming iReal Pro style to MIDI accompaniment tracks. + - Next, the downstream playback component interprets the above MusicXML element to generate a backing track for the score. This is done in [`musicxml-midi`](https://github.com/infojunkie/musicxml-midi) which utilizes an extensive library of "grooves" to map the incoming iReal Pro style to MIDI accompaniment tracks. diff --git a/build/ireal-musicxml.cjs b/build/ireal-musicxml.cjs index 9b19356..54ca0a1 100644 --- a/build/ireal-musicxml.cjs +++ b/build/ireal-musicxml.cjs @@ -388,7 +388,7 @@ var package_default = { }, homepage: "https://github.com/infojunkie/ireal-musicxml", type: "module", - types: "./src/types/ireal-musicxml.d.ts", + types: "./build/ireal-musicxml.d.ts", files: [ "LICENSE.txt", "build/*", @@ -402,12 +402,13 @@ var package_default = { require: "./build/ireal-musicxml.cjs" }, scripts: { - build: "npm run build:esm && npm run build:cjs", + build: "npm run build:esm && npm run build:cjs && npm run build:d.ts", + "build:d.ts": "cp src/types/* build/", "build:esm": "esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js", "build:cjs": "esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs", - test: "npm run test:lint && npm run test:spec && npm run test:ts", + test: "npm run build && npm run test:lint && npm run test:spec && npm run test:ts", "test:spec": 'node --test --test-name-pattern="${TEST:-.*}"', - "test:ts": "npm run build && node --test --loader=ts-node/esm --require ts-node/register test/*.spec.ts", + "test:ts": "node --test --loader=ts-node/esm --require ts-node/register test/*.spec.ts", "test:lint": "eslint src --fix" }, devDependencies: { diff --git a/build/ireal-musicxml.d.ts b/build/ireal-musicxml.d.ts index 4c902fa..2ecadd3 100644 --- a/build/ireal-musicxml.d.ts +++ b/build/ireal-musicxml.d.ts @@ -23,7 +23,7 @@ export class Playlist { export class Song { /** * Song parser. Parsing occurs in this constructor. - * Refer to https://github.com/infojunkie/ireal-musicxml/blob/main/doc/ireal.md for structure details. + * Refer to https://github.com/infojunkie/ireal-musicxml/blob/main/doc/irealpro.md for structure details. * @param ireal iReal Pro encoding for a single song * @param oldFormat Flag to indicate that the encoding above corresponds to the older irealbook:// format. */ diff --git a/build/ireal-musicxml.js b/build/ireal-musicxml.js index 37e5e8c..4205272 100644 --- a/build/ireal-musicxml.js +++ b/build/ireal-musicxml.js @@ -7090,7 +7090,7 @@ var package_default = { }, homepage: "https://github.com/infojunkie/ireal-musicxml", type: "module", - types: "./src/types/ireal-musicxml.d.ts", + types: "./build/ireal-musicxml.d.ts", files: [ "LICENSE.txt", "build/*", @@ -7104,12 +7104,13 @@ var package_default = { require: "./build/ireal-musicxml.cjs" }, scripts: { - build: "npm run build:esm && npm run build:cjs", + build: "npm run build:esm && npm run build:cjs && npm run build:d.ts", + "build:d.ts": "cp src/types/* build/", "build:esm": "esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js", "build:cjs": "esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs", - test: "npm run test:lint && npm run test:spec && npm run test:ts", + test: "npm run build && npm run test:lint && npm run test:spec && npm run test:ts", "test:spec": 'node --test --test-name-pattern="${TEST:-.*}"', - "test:ts": "npm run build && node --test --loader=ts-node/esm --require ts-node/register test/*.spec.ts", + "test:ts": "node --test --loader=ts-node/esm --require ts-node/register test/*.spec.ts", "test:lint": "eslint src --fix" }, devDependencies: { diff --git a/build/ireal-musicxml.js.map b/build/ireal-musicxml.js.map index cc38248..969e2c6 100644 --- a/build/ireal-musicxml.js.map +++ b/build/ireal-musicxml.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../node_modules/asap/browser-raw.js", "../node_modules/promise/lib/core.js", "../node_modules/promise/lib/done.js", "../node_modules/promise/lib/finally.js", "../node_modules/promise/lib/es6-extensions.js", "../node_modules/asap/browser-asap.js", "../node_modules/promise/lib/node-extensions.js", "../node_modules/promise/lib/synchronous.js", "../node_modules/promise/lib/index.js", "../node_modules/promise/index.js", "../node_modules/fast-diff/diff.js", "../node_modules/jstoxml/dist/jstoxml.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/universalModuleDefinition", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_DataView.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Hash.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_ListCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Map.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_MapCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Promise.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Set.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_SetCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Stack.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Symbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Uint8Array.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_WeakMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_apply.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayEach.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayFilter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayIncludes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayIncludesWith.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayLikeKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayPush.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arraySome.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_assignValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_assocIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssign.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssignIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssignValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseClone.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseCreate.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseDifference.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFindIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFlatten.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseForOwn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGetAllKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGetTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseHasIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseInverter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsArguments.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsEqual.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsEqualDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsMatch.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsNaN.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsNative.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIteratee.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseMatches.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseMatchesProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_basePropertyDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseRest.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseSetToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseTimes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseTrim.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseUnary.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseUniq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_castPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneArrayBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneDataView.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneRegExp.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copyArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copyObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copySymbols.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copySymbolsIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_coreJsData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createBaseFor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createFind.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createInverter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_defineProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalArrays.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalByTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalObjects.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_freeGlobal.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getAllKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getAllKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getMapData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getMatchData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getNative.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getPrototype.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getRawTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getSymbols.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getSymbolsIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hasPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneByTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isFlattenable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isKey.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isKeyable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isMasked.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isPrototype.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isStrictComparable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapToArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_matchesStrictComparable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_memoizeCapped.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeCreate.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nodeUtil.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_objectToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_overArg.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_overRest.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_root.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setCacheAdd.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setToArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_shortOut.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_strictIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stringToPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_toKey.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_toSource.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_trimmedEndIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/clone.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/cloneDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/constant.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/difference.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/eq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/find.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/findIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/get.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/hasIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/identity.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/invert.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArguments.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArrayLike.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArrayLikeObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isEqual.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isFunction.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isLength.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isObjectLike.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/keys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/keysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/memoize.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/noop.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/property.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/stubArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/stubFalse.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toFinite.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toInteger.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toNumber.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/uniq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/without.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/bootstrap", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/compat get default export", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/define property getters", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/global", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/hasOwnProperty shorthand", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/make namespace object", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/node module decorator", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/chain.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/checkCustomFilters.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/notes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/ChordParsingError.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/hasElement.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/checkIntervalsConsistency.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/formatSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/qualities.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/formatSymbolParts.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/getParsableDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/initChord.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/nameIndividualChordNotes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/normalizeNotes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/normalizeDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/parseBase.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/modifiers.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/intervalsToSemitones.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/parseDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/chordParserFactory.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/shortenNormalized.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/simplify.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/transpose.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/convertNotationSystem.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/printer/text.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/printer/raw.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/chordRendererFactory.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/index.js", "../src/lib/index.js", "../src/lib/parser.js", "../src/lib/converter.js", "../package.json", "../src/lib/version.js"], - "sourcesContent": ["\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js\u2019s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n", "'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._x = 0;\n this._y = 0;\n this._z = null;\n this._A = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._B = null;\nPromise._C = null;\nPromise._D = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._y === 3) {\n self = self._z;\n }\n if (Promise._B) {\n Promise._B(self);\n }\n if (self._y === 0) {\n if (self._x === 0) {\n self._x = 1;\n self._A = deferred;\n return;\n }\n if (self._x === 1) {\n self._x = 2;\n self._A = [self._A, deferred];\n return;\n }\n self._A.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._y === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._y === 1) {\n resolve(deferred.promise, self._z);\n } else {\n reject(deferred.promise, self._z);\n }\n return;\n }\n var ret = tryCallOne(cb, self._z);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._y = 3;\n self._z = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._y = 1;\n self._z = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._y = 2;\n self._z = newValue;\n if (Promise._C) {\n Promise._C(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._x === 1) {\n handle(self, self._A);\n self._A = null;\n }\n if (self._x === 2) {\n for (var i = 0; i < self._A.length; i++) {\n handle(self, self._A[i]);\n }\n self._A = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n", "'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._D);\n p._y = 1;\n p._z = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._y === 3) {\n val = val._z;\n }\n if (val._y === 1) return res(i, val._z);\n if (val._y === 2) reject(val._z);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nfunction onSettledFulfill(value) {\n return { status: 'fulfilled', value: value };\n}\nfunction onSettledReject(reason) {\n return { status: 'rejected', reason: reason };\n}\nfunction mapAllSettled(item) {\n if(item && (typeof item === 'object' || typeof item === 'function')){\n if(item instanceof Promise && item.then === Promise.prototype.then){\n return item.then(onSettledFulfill, onSettledReject);\n }\n var then = item.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(item)).then(onSettledFulfill, onSettledReject)\n }\n }\n\n return onSettledFulfill(item);\n}\nPromise.allSettled = function (iterable) {\n return Promise.all(iterableToArray(iterable).map(mapAllSettled));\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\nfunction getAggregateError(errors){\n if(typeof AggregateError === 'function'){\n return new AggregateError(errors,'All promises were rejected');\n }\n\n var error = new Error('All promises were rejected');\n\n error.name = 'AggregateError';\n error.errors = errors;\n\n return error;\n}\n\nPromise.any = function promiseAny(values) {\n return new Promise(function(resolve, reject) {\n var promises = iterableToArray(values);\n var hasResolved = false;\n var rejectionReasons = [];\n\n function resolveOnce(value) {\n if (!hasResolved) {\n hasResolved = true;\n resolve(value);\n }\n }\n\n function rejectionCheck(reason) {\n rejectionReasons.push(reason);\n\n if (rejectionReasons.length === promises.length) {\n reject(getAggregateError(rejectionReasons));\n }\n }\n\n if(promises.length === 0){\n reject(getAggregateError(rejectionReasons));\n } else {\n promises.forEach(function(value){\n Promise.resolve(value).then(resolveOnce, rejectionCheck);\n });\n }\n });\n};\n", "\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n", "'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._y === 3) {\n return this._z.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getReason = function () {\n if (this._y === 3) {\n return this._z.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getState = function () {\n if (this._y === 3) {\n return this._z.getState();\n }\n if (this._y === -1 || this._y === -2) {\n return 0;\n }\n\n return this._y;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n", "'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n", "'use strict';\n\nmodule.exports = require('./lib')\n", "/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @param {boolean} [cleanup] Apply semantic cleanup before returning.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n if (cleanup) {\n diff_cleanupSemantic(diffs);\n }\n return diffs;\n}\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)],\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = delta % 2 !== 0;\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (\n x1 < text1_length &&\n y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (\n x2 < text1_length &&\n y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ===\n text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n}\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\nfunction diff_commonOverlap_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: http://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (\n found == 0 ||\n text1.substring(text_length - length) == text2.substring(0, length)\n ) {\n best = length;\n length++;\n }\n }\n}\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = \"\";\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n var prefixLength = diff_commonPrefix(\n longtext.substring(i),\n shorttext.substring(j)\n );\n var suffixLength = diff_commonSuffix(\n longtext.substring(0, i),\n shorttext.substring(0, j)\n );\n if (best_common.length < suffixLength + prefixLength) {\n best_common =\n shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a,\n best_longtext_b,\n best_shorttext_a,\n best_shorttext_b,\n best_common,\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 4)\n );\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 2)\n );\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemantic(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastequality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) {\n // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = diffs[pointer][1];\n } else {\n // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (\n lastequality &&\n lastequality.length <=\n Math.max(length_insertions1, length_deletions1) &&\n lastequality.length <= Math.max(length_insertions2, length_deletions2)\n ) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0, [\n DIFF_DELETE,\n lastequality,\n ]);\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (\n diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT\n ) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (\n overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2\n ) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n insertion.substring(0, overlap_length1),\n ]);\n diffs[pointer - 1][1] = deletion.substring(\n 0,\n deletion.length - overlap_length1\n );\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (\n overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2\n ) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n deletion.substring(0, overlap_length2),\n ]);\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] = insertion.substring(\n 0,\n insertion.length - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n}\n\nvar nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\nvar whitespaceRegex_ = /\\s/;\nvar linebreakRegex_ = /[\\r\\n]/;\nvar blanklineEndRegex_ = /\\n\\r?\\n$/;\nvar blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemanticLossless(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n}\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = \"\";\n var text_insert = \"\";\n var commonlength;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n var previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (\n previous_equality >= 0 &&\n ends_with_pair_start(diffs[previous_equality][1])\n ) {\n var stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(\n 0,\n -1\n );\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n var stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(\n 0,\n commonlength\n );\n } else {\n diffs.splice(0, 0, [\n DIFF_EQUAL,\n text_insert.substring(0, commonlength),\n ]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) +\n diffs[pointer][1];\n text_insert = text_insert.substring(\n 0,\n text_insert.length - commonlength\n );\n text_delete = text_delete.substring(\n 0,\n text_delete.length - commonlength\n );\n }\n }\n // Delete the offending records and add the merged ones.\n var n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(\n pointer - n,\n n,\n [DIFF_DELETE, text_delete],\n [DIFF_INSERT, text_insert]\n );\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = \"\";\n text_insert = \"\";\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === \"\") {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n if (\n diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n ) === diffs[pointer - 1][1]\n ) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] =\n diffs[pointer - 1][1] +\n diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (\n diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]\n ) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xd800 && charCode <= 0xdbff;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xdc00 && charCode <= 0xdfff;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n var ret = [];\n for (var i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after],\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n var oldRange =\n typeof cursor_pos === \"number\"\n ? { index: cursor_pos, length: 0 }\n : cursor_pos.oldRange;\n var newRange = typeof cursor_pos === \"number\" ? null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n var oldLength = oldText.length;\n var newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n var oldCursor = oldRange.index;\n var oldBefore = oldText.slice(0, oldCursor);\n var oldAfter = oldText.slice(oldCursor);\n var maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n var newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n var newBefore = newText.slice(0, newCursor);\n var newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n var prefixLength = Math.min(oldCursor, newCursor);\n var oldPrefix = oldBefore.slice(0, prefixLength);\n var newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n var oldMiddle = oldBefore.slice(prefixLength);\n var newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n var cursor = oldCursor;\n var newBefore = newText.slice(0, cursor);\n var newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n var oldPrefix = oldText.slice(0, oldRange.index);\n var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n var prefixLength = oldPrefix.length;\n var suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n var newPrefix = newText.slice(0, prefixLength);\n var newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n var newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos, cleanup) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, cleanup, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n", "(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.jstoxml = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.toXML = _exports.default = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n var ARRAY = \"array\";\n var BOOLEAN = \"boolean\";\n var DATE = \"date\";\n var NULL = \"null\";\n var NUMBER = \"number\";\n var OBJECT = \"object\";\n var SPECIAL_OBJECT = \"special-object\";\n var STRING = \"string\";\n var PRIVATE_VARS = [\"_selfCloseTag\", \"_attrs\"];\n var PRIVATE_VARS_REGEXP = new RegExp(PRIVATE_VARS.join(\"|\"), \"g\");\n /**\n * Determines the indent string based on current tree depth.\n */\n\n var getIndentStr = function getIndentStr() {\n var indent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return indent.repeat(depth);\n };\n /**\n * Sugar function supplementing JS's quirky typeof operator, plus some extra help to detect\n * \"special objects\" expected by jstoxml.\n * Example:\n * getType(new Date());\n * -> 'date'\n */\n\n\n var getType = function getType(val) {\n return Array.isArray(val) && ARRAY || _typeof(val) === OBJECT && val !== null && val._name && SPECIAL_OBJECT || val instanceof Date && DATE || val === null && NULL || _typeof(val);\n };\n /**\n * Replaces matching values in a string with a new value.\n * Example:\n * filterStr('foo&bar', { '&': '&' });\n * -> 'foo&bar'\n */\n\n\n var filterStr = function filterStr() {\n var inputStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Passthrough/no-op for nonstrings (e.g. number, boolean).\n if (typeof inputStr !== \"string\") {\n return inputStr;\n }\n\n var regexp = new RegExp(\"(\".concat(Object.keys(filter).join(\"|\"), \")(?!(\\\\w|#)*;)\"), \"g\");\n return String(inputStr).replace(regexp, function (str, entity) {\n return filter[entity] || \"\";\n });\n };\n /**\n * Maps an object or array of arribute keyval pairs to a string.\n * Examples:\n * { foo: 'bar', baz: 'g' } -> 'foo=\"bar\" baz=\"g\"'\n * [ { \u26A1: true }, { foo: 'bar' } ] -> '\u26A1 foo=\"bar\"'\n */\n\n\n var getAttributeKeyVals = function getAttributeKeyVals() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = [];\n\n if (Array.isArray(attributes)) {\n // Array containing complex objects and potentially duplicate attributes.\n keyVals = attributes.map(function (attr) {\n var key = Object.keys(attr)[0];\n var val = attr[key];\n var filteredVal = filter ? filterStr(val, filter) : val;\n var valStr = filteredVal === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n } else {\n var keys = Object.keys(attributes);\n keyVals = keys.map(function (key) {\n // Simple object - keyval pairs.\n // For boolean true, simply output the key.\n var filteredVal = filter ? filterStr(attributes[key], filter) : attributes[key];\n var valStr = attributes[key] === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n }\n\n return keyVals;\n };\n /**\n * Converts an attributes object/array to a string of keyval pairs.\n * Example:\n * formatAttributes({ a: 1, b: 2 })\n * -> 'a=\"1\" b=\"2\"'\n */\n\n\n var formatAttributes = function formatAttributes() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = getAttributeKeyVals(attributes, filter);\n if (keyVals.length === 0) return \"\";\n var keysValsJoined = keyVals.join(\" \");\n return \" \".concat(keysValsJoined);\n };\n /**\n * Converts an object to a jstoxml array.\n * Example:\n * objToArray({ foo: 'bar', baz: 2 });\n * ->\n * [\n * {\n * _name: 'foo',\n * _content: 'bar'\n * },\n * {\n * _name: 'baz',\n * _content: 2\n * }\n * ]\n */\n\n\n var objToArray = function objToArray() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.keys(obj).map(function (key) {\n return {\n _name: key,\n _content: obj[key]\n };\n });\n };\n /**\n * Determines if a value is a primitive JavaScript value (not including Symbol).\n * Example:\n * isPrimitive(4);\n * -> true\n */\n\n\n var PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN];\n\n var isPrimitive = function isPrimitive(val) {\n return PRIMITIVE_TYPES.includes(getType(val));\n };\n /**\n * Determines if a value is a simple primitive type that can fit onto one line. Needed for\n * determining any needed indenting and line breaks.\n * Example:\n * isSimpleType(new Date());\n * -> true\n */\n\n\n var SIMPLE_TYPES = [].concat(PRIMITIVE_TYPES, [DATE, SPECIAL_OBJECT]);\n\n var isSimpleType = function isSimpleType(val) {\n return SIMPLE_TYPES.includes(getType(val));\n };\n /**\n * Determines if an XML string is a simple primitive, or contains nested data.\n * Example:\n * isSimpleXML('');\n * -> false\n */\n\n\n var isSimpleXML = function isSimpleXML(xmlStr) {\n return !xmlStr.match(\"<\");\n };\n /**\n * Assembles an XML header as defined by the config.\n */\n\n\n var DEFAULT_XML_HEADER = '';\n\n var getHeaderString = function getHeaderString(_ref) {\n var header = _ref.header,\n indent = _ref.indent,\n isOutputStart = _ref.isOutputStart;\n var shouldOutputHeader = header && isOutputStart;\n if (!shouldOutputHeader) return \"\";\n var shouldUseDefaultHeader = _typeof(header) === BOOLEAN; // return `${shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header}${indent ? \"\\n\" : \"\"\n // }`;\n\n return shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header;\n };\n /**\n * Recursively traverses an object tree and converts the output to an XML string.\n * Example:\n * toXML({ foo: 'bar' });\n * -> bar\n */\n\n\n var defaultEntityFilter = {\n \"<\": \"<\",\n \">\": \">\",\n \"&\": \"&\"\n };\n\n var toXML = function toXML() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _config$depth = config.depth,\n depth = _config$depth === void 0 ? 0 : _config$depth,\n indent = config.indent,\n _isFirstItem = config._isFirstItem,\n _config$_isOutputStar = config._isOutputStart,\n _isOutputStart = _config$_isOutputStar === void 0 ? true : _config$_isOutputStar,\n header = config.header,\n _config$attributesFil = config.attributesFilter,\n rawAttributesFilter = _config$attributesFil === void 0 ? {} : _config$attributesFil,\n _config$filter = config.filter,\n rawFilter = _config$filter === void 0 ? {} : _config$filter;\n\n var shouldTurnOffAttributesFilter = typeof rawAttributesFilter === 'boolean' && !rawAttributesFilter;\n var attributesFilter = shouldTurnOffAttributesFilter ? {} : _objectSpread(_objectSpread(_objectSpread({}, defaultEntityFilter), {\n '\"': \""\"\n }), rawAttributesFilter);\n var shouldTurnOffFilter = typeof rawFilter === 'boolean' && !rawFilter;\n var filter = shouldTurnOffFilter ? {} : _objectSpread(_objectSpread({}, defaultEntityFilter), rawFilter); // Determine indent string based on depth.\n\n var indentStr = getIndentStr(indent, depth); // For branching based on value type.\n\n var valType = getType(obj);\n var headerStr = getHeaderString({\n header: header,\n indent: indent,\n depth: depth,\n isOutputStart: _isOutputStart\n });\n var isOutputStart = _isOutputStart && !headerStr && _isFirstItem && depth === 0;\n var outputStr = \"\";\n\n switch (valType) {\n case \"special-object\":\n {\n // Processes a specially-formatted object used by jstoxml.\n var _name = obj._name,\n _content = obj._content; // Output text content without a tag wrapper.\n\n if (_content === null) {\n outputStr = _name;\n break;\n } // Handles arrays of primitive values. (#33)\n\n\n var isArrayOfPrimitives = Array.isArray(_content) && _content.every(isPrimitive);\n\n if (isArrayOfPrimitives) {\n var primitives = _content.map(function (a) {\n return toXML({\n _name: _name,\n _content: a\n }, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth,\n _isOutputStart: false\n }));\n });\n\n return primitives.join('');\n } // Don't output private vars (such as _attrs).\n\n\n if (_name.match(PRIVATE_VARS_REGEXP)) break; // Process the nested new value and create new config.\n\n var newVal = toXML(_content, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth + 1,\n _isOutputStart: isOutputStart\n }));\n var newValType = getType(newVal);\n var isNewValSimple = isSimpleXML(newVal); // Pre-tag output (indent and line breaks).\n\n var preIndentStr = indent && !isOutputStart ? \"\\n\" : \"\";\n var preTag = \"\".concat(preIndentStr).concat(indentStr); // Special handling for comments, preserving preceding line breaks/indents.\n\n if (_name === '_comment') {\n outputStr += \"\".concat(preTag, \"\");\n break;\n } // Tag output.\n\n\n var valIsEmpty = newValType === \"undefined\" || newVal === \"\";\n var shouldSelfClose = _typeof(obj._selfCloseTag) === BOOLEAN ? valIsEmpty && obj._selfCloseTag : valIsEmpty;\n var selfCloseStr = shouldSelfClose ? \"/\" : \"\";\n var attributesString = formatAttributes(obj._attrs, attributesFilter);\n var tag = \"<\".concat(_name).concat(attributesString).concat(selfCloseStr, \">\"); // Post-tag output (closing tag, indent, line breaks).\n\n var preTagCloseStr = indent && !isNewValSimple ? \"\\n\".concat(indentStr) : \"\";\n var postTag = !shouldSelfClose ? \"\".concat(newVal).concat(preTagCloseStr, \"\") : \"\";\n outputStr += \"\".concat(preTag).concat(tag).concat(postTag);\n break;\n }\n\n case \"object\":\n {\n // Iterates over keyval pairs in an object, converting each item to a special-object.\n var keys = Object.keys(obj);\n var outputArr = keys.map(function (key, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === keys.length,\n _isOutputStart: isOutputStart\n });\n\n var outputObj = {\n _name: key\n };\n\n if (getType(obj[key]) === \"object\") {\n // Sub-object contains an object.\n // Move private vars up as needed. Needed to support certain types of objects\n // E.g. { foo: { _attrs: { a: 1 } } } -> \n PRIVATE_VARS.forEach(function (privateVar) {\n var val = obj[key][privateVar];\n\n if (typeof val !== \"undefined\") {\n outputObj[privateVar] = val;\n delete obj[key][privateVar];\n }\n });\n var hasContent = typeof obj[key]._content !== \"undefined\";\n\n if (hasContent) {\n // _content has sibling keys, so pass as an array (edge case).\n // E.g. { foo: 'bar', _content: { baz: 2 } } -> bar2\n if (Object.keys(obj[key]).length > 1) {\n var newContentObj = Object.assign({}, obj[key]);\n delete newContentObj._content;\n outputObj._content = [].concat(_toConsumableArray(objToArray(newContentObj)), [obj[key]._content]);\n }\n }\n } // Fallthrough: just pass the key as the content for the new special-object.\n\n\n if (typeof outputObj._content === \"undefined\") outputObj._content = obj[key];\n var xml = toXML(outputObj, newConfig, key);\n return xml;\n }, config);\n outputStr = outputArr.join('');\n break;\n }\n\n case \"function\":\n {\n // Executes a user-defined function and returns output.\n var fnResult = obj(config);\n outputStr = toXML(fnResult, config);\n break;\n }\n\n case \"array\":\n {\n // Iterates and converts each value in an array.\n var _outputArr = obj.map(function (singleVal, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === obj.length,\n _isOutputStart: isOutputStart\n });\n\n return toXML(singleVal, newConfig);\n });\n\n outputStr = _outputArr.join('');\n break;\n }\n // number, string, boolean, date, null, etc\n\n default:\n {\n outputStr = filterStr(obj, filter);\n break;\n }\n }\n\n return \"\".concat(headerStr).concat(outputStr);\n };\n\n _exports.toXML = toXML;\n var _default = {\n toXML: toXML\n };\n _exports.default = _default;\n});\n", "(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[\"chord-symbol\"] = factory();\n\telse\n\t\troot[\"chord-symbol\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn ", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n", "var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n", "var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n", "var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n", "var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n", "var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n", "var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n", "var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n", "var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n", "var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n", "var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", "var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n", "var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n", "var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n", "var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n", "var baseForOwn = require('./_baseForOwn');\n\n/**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n}\n\nmodule.exports = baseInverter;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n", "var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n", "var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n", "var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n", "var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n", "var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n", "var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n", "var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n", "var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n", "var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n", "var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n", "var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n", "var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n", "var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\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 */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n", "var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n", "var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n", "var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n", "var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n", "var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n", "var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", "var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n", "var baseInverter = require('./_baseInverter');\n\n/**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\nfunction createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n}\n\nmodule.exports = createInverter;\n", "var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n", "var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n", "var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n", "var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n", "var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n", "var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n", "var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n", "var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n", "var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n", "var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\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 */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n", "var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n", "var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n", "var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n", "var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\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 */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n", "var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\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 */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n", "var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n", "var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n", "var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n", "var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\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 */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n", "var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n", "var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n", "var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n", "var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n", "var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n", "var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n", "var constant = require('./constant'),\n createInverter = require('./_createInverter'),\n identity = require('./identity');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\nvar invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n}, constant(identity));\n\nmodule.exports = invert;\n", "var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n", "var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n", "var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n", "var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n", "var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", "var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n", "var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n", "var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n", "var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n", "var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n", "var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n", "var baseDifference = require('./_baseDifference'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\nvar without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n});\n\nmodule.exports = without;\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};", "// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};", "__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();", "__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))", "// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};", "__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};", "/**\n * Execute given functions in sequence, feeding the result of one as an input to the next.\n *\n * @param {Function[]} allFunctions\n * @param {*} input - parameter given to the first function\n * @returns {*} return value of the last function\n */\nexport default function chain(allFunctions, input) {\n\treturn allFunctions.reduce((value, fn) => {\n\t\treturn value ? fn(value) : null;\n\t}, input);\n}\n", "const checkCustomFilters = (customFilters) => {\n\tif (!Array.isArray(customFilters)) {\n\t\tthrow new TypeError('customFilters should be given as an array');\n\t}\n\tif (customFilters.some((filter) => typeof filter !== 'function')) {\n\t\tthrow new TypeError(`The given filter is not a function`);\n\t}\n\treturn true;\n};\n\nexport default checkCustomFilters;\n", "const notes = {\n\tAFlat: 'Ab',\n\tA: 'A',\n\tASharp: 'A#',\n\tBFlat: 'Bb',\n\tB: 'B',\n\tC: 'C',\n\tCSharp: 'C#',\n\tDFlat: 'Db',\n\tD: 'D',\n\tDSharp: 'D#',\n\tEFlat: 'Eb',\n\tE: 'E',\n\tF: 'F',\n\tFSharp: 'F#',\n\tGFlat: 'Gb',\n\tG: 'G',\n\tGSharp: 'G#',\n};\n\nconst english = {\n\tAb: notes.AFlat,\n\tA: notes.A,\n\t'A#': notes.ASharp,\n\tBb: notes.BFlat,\n\tB: notes.B,\n\t'B#': notes.C,\n\tCb: notes.B,\n\tC: notes.C,\n\t'C#': notes.CSharp,\n\tDb: notes.DFlat,\n\tD: notes.D,\n\t'D#': notes.DSharp,\n\tEb: notes.EFlat,\n\tE: notes.E,\n\t'E#': notes.F,\n\tFb: notes.E,\n\tF: notes.F,\n\t'F#': notes.FSharp,\n\tGb: notes.GFlat,\n\tG: notes.G,\n\t'G#': notes.GSharp,\n};\n\nconst latin = {\n\tLab: notes.AFlat,\n\tLa: notes.A,\n\t'La#': notes.ASharp,\n\tSib: notes.BFlat,\n\tSi: notes.B,\n\t'Si#': notes.C,\n\tDob: notes.B,\n\tDo: notes.C,\n\t'Do#': notes.CSharp,\n\tReb: notes.DFlat,\n\tRéb: notes.DFlat,\n\tRe: notes.D,\n\tRé: notes.D,\n\t'Re#': notes.DSharp,\n\t'Ré#': notes.DSharp,\n\tMib: notes.EFlat,\n\tMi: notes.E,\n\t'Mi#': notes.F,\n\tFab: notes.E,\n\tFa: notes.F,\n\t'Fa#': notes.FSharp,\n\tSolb: notes.GFlat,\n\tSol: notes.G,\n\t'Sol#': notes.GSharp,\n};\n\nconst german = {\n\tAs: notes.AFlat,\n\tA: notes.A,\n\tAis: notes.ASharp,\n\tHes: notes.BFlat,\n\tH: notes.B,\n\tHis: notes.C,\n\tCes: notes.B,\n\tC: notes.C,\n\tCis: notes.CSharp,\n\tDes: notes.DFlat,\n\tD: notes.D,\n\tDis: notes.DSharp,\n\tEs: notes.EFlat,\n\tE: notes.E,\n\tEis: notes.F,\n\tFes: notes.E,\n\tF: notes.F,\n\tFis: notes.FSharp,\n\tGes: notes.GFlat,\n\tG: notes.G,\n\tGis: notes.GSharp,\n};\n\nfunction getAccidentalsVariation(source) {\n\tlet variant;\n\treturn Object.keys(source).reduce((acc, curr) => {\n\t\tif (curr.match(/.[b|#]$/)) {\n\t\t\tvariant = curr.replace('#', '♯').replace('b', '♭');\n\t\t\tacc[variant] = source[curr];\n\t\t}\n\t\treturn acc;\n\t}, {});\n}\n\nconst englishVariantsToNotes = {\n\t...english,\n\t...getAccidentalsVariation(english),\n};\n\nconst latinVariantsToNotes = {\n\t...latin,\n\t...getAccidentalsVariation(latin),\n};\n\nconst germanVariantsToNotes = {\n\t...german,\n};\n\nconst allVariantsToNotes = {\n\t...englishVariantsToNotes,\n\t...latinVariantsToNotes,\n\t...germanVariantsToNotes,\n};\n\nconst allVariants = Object.keys(allVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst englishVariants = Object.keys(englishVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst latinVariants = Object.keys(latinVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst germanVariants = Object.keys(germanVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst allVariantsPerGroup = [\n\t{ name: 'english', notes: englishVariants },\n\t{ name: 'german', notes: germanVariants },\n\t{ name: 'latin', notes: latinVariants },\n];\n\nexport {\n\tnotes,\n\tallVariants,\n\tallVariantsPerGroup,\n\tenglishVariants,\n\tlatinVariants,\n\tgermanVariants,\n\tallVariantsToNotes,\n\tenglishVariantsToNotes,\n\tlatinVariantsToNotes,\n\tgermanVariantsToNotes,\n};\n", "class InvalidInputError extends Error {\n\t/**\n\t * The parser was not given a valid string to parse\n\t * ex: `parseChord(null)`\n\t */\n\tconstructor() {\n\t\tsuper('The given symbol is not a valid string');\n\t\tthis.name = 'InvalidInput';\n\t}\n}\n\nclass UnexpectedError extends Error {\n\t/**\n\t * This error is very unlikely to happen.\n\t * If it does, it is probably in the context of a custom filter that returns `null` instead of throwing an exception.\n\t */\n\tconstructor() {\n\t\tconst message =\n\t\t\t'An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?';\n\t\tsuper(message);\n\t\tthis.name = 'UnexpectedError';\n\t}\n}\n\nclass ChordSymbolError extends Error {\n\tconstructor(message, chord, errorName) {\n\t\tsuper(message);\n\t\tthis.name = errorName;\n\t\tthis.chord = chord;\n\t}\n}\n\nclass NoSymbolFoundError extends ChordSymbolError {\n\t/**\n\t * The given string cannot be confused with a chord symbol in the current notation system\n\t * ex: `parseChord('Ape')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t */\n\tconstructor(chord) {\n\t\tconst message = `\"${chord.input.symbol}\" does not seems to be a chord`;\n\t\tsuper(message, chord, 'NoSymbolFound');\n\t}\n}\n\nclass InvalidModifierError extends ChordSymbolError {\n\t/**\n\t * The given string looks like a chord symbol, but `ChordSymbol` does not understand its descriptor.\n\t * It can be either because of a typo, or just because the given word is not a symbol.\n\t * ex: `parseChord('Amid')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String} invalidChars - the characters that proved problematic when parsing the symbol\n\t */\n\tconstructor(chord, invalidChars) {\n\t\tconst message = `The chord descriptor \"${chord.input.descriptor}\" contains unknown or duplicated modifiers: \"${invalidChars}\"`;\n\t\tsuper(message, chord, 'InvalidModifier');\n\t}\n}\n\nclass InvalidIntervalsError extends ChordSymbolError {\n\t/**\n\t * The given string is a chord symbol, but the resulting interval list is not valid\n\t * ex: `parseChord('A7M7')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String[]} forbiddenCombo - intervals that should not belong together in a chord\n\t */\n\tconstructor(chord, forbiddenCombo) {\n\t\tconst message =\n\t\t\t`\"${chord.input.symbol}\" describes a chord with an invalid intervals combo: ` +\n\t\t\tforbiddenCombo.join(' and ');\n\t\tsuper(message, chord, 'InvalidIntervals');\n\t}\n}\n\nexport {\n\tInvalidInputError,\n\tInvalidIntervalsError,\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n\tUnexpectedError,\n};\n", "import _isArray from 'lodash/isArray';\nimport _isEqual from 'lodash/isEqual';\n\nfunction hasExactly(allIntervals, search) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\treturn _isEqual(allIntervals, arraySearch);\n}\n\nfunction hasOneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'oneOf');\n}\n\nfunction hasAll(allIntervals, search) {\n\treturn has(allIntervals, search, 'all');\n}\n\nfunction hasNoneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'none');\n}\n\nfunction has(allIntervals, search, require) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\n\tconst lookupMethod = require === 'oneOf' ? 'some' : 'every';\n\n\treturn arraySearch[lookupMethod]((interval) => {\n\t\treturn require === 'none'\n\t\t\t? !allIntervals.includes(interval)\n\t\t\t: allIntervals.includes(interval);\n\t});\n}\n\nexport { hasExactly, hasOneOf, hasAll, hasNoneOf };\n", "import { hasAll } from '../../helpers/hasElement';\nimport { InvalidIntervalsError } from '../../helpers/ChordParsingError';\n\nconst allForbiddenCombos = [\n\t['2', '3'],\n\t['2', '9'],\n\t['3', 'b3'],\n\t//['3', '4'], // valid in the Real Book: F#7SUS(add 3)\n\t['4', '11'],\n\t['5', 'b5'],\n\t['5', '#5'],\n\t['b6', '#5'],\n\t['b6', '6'],\n\t['b6', '13'],\n\t['6', '13'],\n\t['b7', 'bb7'],\n\t['7', 'b7'],\n\t['9', 'b9'],\n\t['9', '#9'],\n\t['11', '#11'],\n\t['13', 'b13'],\n];\n\n/**\n * Check parsed interval list to detect potential inconsistencies\n *\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function checkIntervalsConsistency(chord) {\n\tconst intervals = chord.normalized.intervals;\n\n\tconst forbiddenCombo = allForbiddenCombos.find((combo) =>\n\t\thasAll(intervals, combo)\n\t);\n\n\tif (forbiddenCombo) {\n\t\tthrow new InvalidIntervalsError(chord, forbiddenCombo);\n\t}\n\n\treturn chord;\n}\n", "/**\n * Render the chord by assembling all its components\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbol(chord) {\n\tconst { rootNote, bassNote, descriptor, chordChanges } = chord.formatted;\n\n\tlet symbol = rootNote;\n\n\tif (descriptor) {\n\t\tsymbol += descriptor;\n\t}\n\tif (chordChanges && chordChanges.length) {\n\t\tsymbol += '(' + chordChanges.join(',') + ')';\n\t}\n\tif (bassNote) {\n\t\tsymbol += '/' + bassNote;\n\t}\n\n\tchord.formatted.symbol = symbol;\n\n\treturn chord;\n}\n", "const qualities = {\n\tma: 'major',\n\tma6: 'major6',\n\tma7: 'major7',\n\tdom7: 'dominant7',\n\n\tmi: 'minor',\n\tmi6: 'minor6',\n\tmi7: 'minor7',\n\tmiMa7: 'minorMajor7',\n\n\taug: 'augmented',\n\tdim: 'diminished',\n\tdim7: 'diminished7',\n\n\tpower: 'power',\n\tbass: 'bass',\n};\n\nconst majorQualities = [\n\tqualities.ma,\n\tqualities.ma6,\n\tqualities.ma7,\n\tqualities.dom7,\n\tqualities.aug,\n];\n\nconst minorQualities = [\n\tqualities.mi,\n\tqualities.mi6,\n\tqualities.mi7,\n\tqualities.miMa7,\n\tqualities.dim,\n\tqualities.dim7,\n];\n\nexport { qualities, majorQualities, minorQualities };\n", "import { qualities } from '../../dictionaries/qualities';\nimport { hasNoneOf } from '../../helpers/hasElement';\n\nconst qualityToDescriptor = {\n\t[qualities.ma]: () => '',\n\t[qualities.ma6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? '69' : '6',\n\t[qualities.ma7]: (chord) => 'ma' + getHighestExtension(chord),\n\t[qualities.dom7]: (chord) =>\n\t\tchord.normalized.intents.alt ? '7alt' : getHighestExtension(chord),\n\n\t[qualities.mi]: () => 'mi',\n\t[qualities.mi6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? 'mi69' : 'mi6',\n\t[qualities.mi7]: (chord) => 'mi' + getHighestExtension(chord),\n\t[qualities.miMa7]: (chord) => 'miMa' + getHighestExtension(chord),\n\n\t[qualities.aug]: () => '+',\n\t[qualities.dim]: () => 'dim',\n\t[qualities.dim7]: () => 'dim7',\n\n\t[qualities.power]: () => '5',\n\t[qualities.bass]: () => ' bass',\n};\n\nconst chordChangesDescriptors = {\n\tadd: 'add',\n\tadd7: 'Ma7',\n\tomit: 'omit',\n\tsus: 'sus',\n};\n\n/**\n * Pre-render the chord by formatting all his components: root and bass notes, descriptor and changes\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbolParts(chord) {\n\tchord.formatted = {\n\t\trootNote: chord.normalized.rootNote,\n\t\tbassNote: chord.normalized.bassNote,\n\t\tdescriptor: getDescriptor(chord),\n\t\tchordChanges: getChordChanges(chord),\n\t};\n\treturn chord;\n}\n\nfunction getDescriptor(chord) {\n\tlet descriptor = qualityToDescriptor[chord.normalized.quality](chord);\n\tif (chord.normalized.isSuspended) {\n\t\tdescriptor += chordChangesDescriptors.sus;\n\t}\n\treturn descriptor;\n}\n\nfunction getHighestExtension(chord) {\n\tconst extensions = chord.normalized.extensions;\n\n\tlet highestExtension = extensions[extensions.length - 1];\n\n\tif (highestExtension === '11' && chord.normalized.intents.major) {\n\t\thighestExtension = hasNoneOf(chord.normalized.alterations, ['b9', '#9'])\n\t\t\t? '9'\n\t\t\t: '7';\n\t}\n\treturn highestExtension || '7';\n}\n\nfunction getChordChanges(chord) {\n\tconst formattedOmits = formatOmits(chord.normalized.omits);\n\n\tif (isAltered(chord)) {\n\t\treturn formattedOmits;\n\t}\n\n\tconst formattedAdds = formatAdds(\n\t\tchord.normalized.quality,\n\t\tchord.normalized.adds\n\t);\n\n\treturn [\n\t\t...chord.normalized.alterations,\n\t\t...formattedAdds,\n\t\t...formattedOmits,\n\t];\n}\n\nfunction isAltered(chord) {\n\treturn (\n\t\tchord.normalized.intents.alt &&\n\t\tchord.normalized.quality === qualities.dom7\n\t);\n}\n\nfunction formatAdds(quality, adds) {\n\treturn adds\n\t\t.filter((add) => {\n\t\t\treturn !(\n\t\t\t\t[qualities.ma6, qualities.mi6].includes(quality) && add === '9'\n\t\t\t);\n\t\t})\n\t\t.map((add, index) => {\n\t\t\tlet formatted = '';\n\t\t\tif (index === 0) {\n\t\t\t\tformatted += chordChangesDescriptors.add;\n\t\t\t\tif (['b', '#'].includes(add[0])) {\n\t\t\t\t\tformatted += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tformatted += add === '7' ? chordChangesDescriptors.add7 : add;\n\t\t\treturn formatted;\n\t\t});\n}\n\nfunction formatOmits(omits) {\n\treturn omits.map((omitted, index) => {\n\t\tlet formatted = '';\n\t\tif (index === 0) {\n\t\t\tformatted += chordChangesDescriptors.omit;\n\t\t}\n\t\tformatted += omitted === 'b3' ? '3' : omitted;\n\t\treturn formatted;\n\t});\n}\n", "import chain from '../../helpers/chain';\n\n/**\n * Prepare whatever string has been identified as a descriptor so it is parsable by the next filter\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function getParsableDescriptor(chord) {\n\tconst allFilters = [\n\t\ttoLowerCaseExceptMajorM,\n\t\tremoveSpaces,\n\t\taddDisambiguators,\n\t\taddMissingVerbs,\n\t];\n\n\tif (chord.input.descriptor) {\n\t\tchord.input.parsableDescriptor = chain(\n\t\t\tallFilters,\n\t\t\tchord.input.descriptor\n\t\t);\n\t}\n\treturn chord;\n}\n\nfunction toLowerCaseExceptMajorM(descriptor) {\n\treturn descriptor\n\t\t.replace(/[A-LN-Za-z]+/g, (match) => match.toLowerCase())\n\t\t.replace('oMit', 'omit')\n\t\t.replace('diM', 'dim')\n\t\t.replace('augMented', 'augmented');\n}\n\nfunction removeSpaces(descriptor) {\n\treturn descriptor.replace(/ /g, '');\n}\n\nfunction addDisambiguators(descriptor) {\n\treturn descriptor\n\t\t.replace(/(7?dim)(alt|add)/g, '$1 $2')\n\t\t.replace(/([m|M])(alt|add)/g, '$1 $2')\n\t\t.replace(/i(no[35])/g, 'i $1')\n\t\t.replace(/([b♭#♯]9)6/g, '$1 6')\n\t\t.replace(/(9\\/?6)/g, ' $1');\n}\n\nfunction addMissingVerbs(descriptor) {\n\tlet allTokensWithVerbs;\n\tlet currentVerb;\n\tlet hasVerb;\n\n\treturn descriptor.replace(/\\((.*?)\\)/g, (match, parenthesis) => {\n\t\tallTokensWithVerbs = [];\n\t\tcurrentVerb = '';\n\n\t\tparenthesis.split(',').forEach((token) => {\n\t\t\thasVerb = true;\n\t\t\tif (token.startsWith('add')) {\n\t\t\t\tcurrentVerb = 'add';\n\t\t\t} else if (token.startsWith('omit')) {\n\t\t\t\tcurrentVerb = 'omit';\n\t\t\t} else if (token.startsWith('no')) {\n\t\t\t\tcurrentVerb = 'no';\n\t\t\t} else {\n\t\t\t\thasVerb = false;\n\t\t\t}\n\t\t\tif (hasVerb) {\n\t\t\t\tallTokensWithVerbs.push(token);\n\t\t\t} else {\n\t\t\t\tallTokensWithVerbs.push(currentVerb + token);\n\t\t\t}\n\t\t});\n\t\treturn ' ' + allTokensWithVerbs.join(' ') + ' ';\n\t});\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\n/**\n * @param {String} symbol\n * @param {Object} parserConfiguration\n * @returns {Chord}\n */\nexport default function initChord(parserConfiguration = {}, symbol) {\n\treturn {\n\t\tinput: {\n\t\t\tsymbol,\n\t\t},\n\t\tnormalized: {},\n\t\tformatted: {},\n\t\tparserConfiguration: _cloneDeep(parserConfiguration),\n\t};\n}\n", "import { notes } from '../../dictionaries/notes';\nimport { majorQualities } from '../../dictionaries/qualities';\n\nconst notesSharp = [\n\tnotes.A,\n\tnotes.ASharp,\n\tnotes.B,\n\tnotes.C,\n\tnotes.CSharp,\n\tnotes.D,\n\tnotes.DSharp,\n\tnotes.E,\n\tnotes.F,\n\tnotes.FSharp,\n\tnotes.G,\n\tnotes.GSharp,\n];\n\nconst notesFlat = [\n\tnotes.A,\n\tnotes.BFlat,\n\tnotes.B,\n\tnotes.C,\n\tnotes.DFlat,\n\tnotes.D,\n\tnotes.EFlat,\n\tnotes.E,\n\tnotes.F,\n\tnotes.GFlat,\n\tnotes.G,\n\tnotes.AFlat,\n];\n\nconst rootNoteToScaleAccidentals = {\n\t[notes.C]: { maj: 'flat', min: 'flat' },\n\t[notes.CSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.DFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.D]: { maj: 'sharp', min: 'flat' },\n\t[notes.DSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.EFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.E]: { maj: 'sharp', min: 'sharp' },\n\t[notes.F]: { maj: 'flat', min: 'flat' },\n\t[notes.FSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.GFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.G]: { maj: 'sharp', min: 'flat' },\n\t[notes.GSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.AFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.A]: { maj: 'sharp', min: 'flat' },\n\t[notes.ASharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.BFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.B]: { maj: 'sharp', min: 'sharp' },\n};\n\n/**\n * Convert intervals in actual notes.\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function nameIndividualChordNotes(chord) {\n\tconst rootNote = chord.normalized.rootNote;\n\tconst semitones = chord.normalized.semitones;\n\tconst quality = chord.normalized.quality;\n\n\tconst minMaj = majorQualities.includes(quality) ? 'maj' : 'min';\n\tconst refNotes =\n\t\trootNoteToScaleAccidentals[rootNote][minMaj] === 'sharp'\n\t\t\t? notesSharp\n\t\t\t: notesFlat;\n\n\tconst rootNoteIndex = refNotes.indexOf(rootNote);\n\tconst indexedNotes = [\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t\t// repeating...\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t];\n\n\tconst chordNotes = semitones.map((i) => indexedNotes[i]);\n\n\tchord.normalized.notes = chordNotes;\n\n\treturn chord;\n}\n", "import { allVariantsToNotes } from '../../dictionaries/notes';\n\n/**\n * Convert root/bass notes to English names\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeNotes(chord) {\n\tchord.normalized.rootNote = allVariantsToNotes[chord.input.rootNote];\n\n\tif (chord.input.bassNote) {\n\t\tchord.normalized.bassNote = allVariantsToNotes[chord.input.bassNote];\n\t}\n\n\treturn chord;\n}\n", "import _clone from 'lodash/clone';\nimport _find from 'lodash/find';\nimport _uniq from 'lodash/uniq';\nimport _without from 'lodash/without';\n\nimport chain from '../../helpers/chain';\n\nimport {\n\thasOneOf,\n\thasAll,\n\thasNoneOf,\n\thasExactly,\n} from '../../helpers/hasElement';\n\nimport { qualities } from '../../dictionaries/qualities';\n\n/**\n * Detect chord quality and changes (extensions, alterations, adds and omits)\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeDescriptor(chord) {\n\tlet chordIntervals = _clone(chord.normalized.intervals);\n\n\tlet normalized = {\n\t\tquality: '',\n\t\tisSuspended: false,\n\t\textensions: [],\n\t\talterations: [],\n\t\tadds: [],\n\t\tomits: [],\n\t};\n\n\tif (isPowerChord(chordIntervals)) {\n\t\tnormalized.quality = qualities.power;\n\t} else if (isBass(chordIntervals)) {\n\t\tnormalized.quality = qualities.bass;\n\t} else {\n\t\tconst omits = getOmits(chordIntervals, chord.normalized.intents.major);\n\n\t\tconst isSuspended = getIsSuspended(\n\t\t\tchordIntervals,\n\t\t\tchord.normalized.intents.major\n\t\t);\n\n\t\tconst { qualityIntervals, quality } = getChordQuality(\n\t\t\tchordIntervals,\n\t\t\tchord,\n\t\t\tisSuspended,\n\t\t\tomits\n\t\t);\n\n\t\tconst extensions = getExtensions(chordIntervals, quality);\n\n\t\t// to be able to detect adds and alterations, we build the \"straight\" version of the chord,\n\t\t// ie. the chord as if no alterations/adds/omits where present.\n\t\t// we will compare this to the actual intervals later on\n\t\tconst baseIntervals = ['1', ...qualityIntervals, ...extensions];\n\n\t\tconst { adds, alterations } = getAddsAndAlterations(\n\t\t\tchordIntervals,\n\t\t\tbaseIntervals,\n\t\t\tquality\n\t\t);\n\n\t\tnormalized = {\n\t\t\t...normalized,\n\t\t\tquality,\n\t\t\tisSuspended,\n\t\t\textensions,\n\t\t\talterations,\n\t\t\tadds,\n\t\t\tomits,\n\t\t};\n\t}\n\n\treturn {\n\t\t...chord,\n\t\tnormalized: {\n\t\t\t...chord.normalized,\n\t\t\t...normalized,\n\t\t},\n\t};\n}\n\nfunction isPowerChord(intervals) {\n\treturn hasExactly(intervals, ['1', '5']);\n}\n\nfunction isBass(intervals) {\n\treturn hasExactly(intervals, ['1']);\n}\n\nfunction getIsSuspended(intervals, hasMajorIntent) {\n\treturn (\n\t\tintervals.includes('4') ||\n\t\t(intervals.includes('11') && hasMajorIntent && !intervals.includes('3'))\n\t);\n}\n\nfunction getOmits(intervals, hasMajorIntent) {\n\tconst omits = [];\n\n\tif (\n\t\thasNoneOf(intervals, ['b3', '3', '4', '11']) ||\n\t\t(!hasMajorIntent && hasNoneOf(intervals, ['b3', '4']))\n\t) {\n\t\tomits.push(hasMajorIntent ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5', 'b13'])) {\n\t\tomits.push('5');\n\t}\n\treturn omits;\n}\n\nfunction getChordQuality(allIntervals, chord, isSuspended, omits) {\n\tconst intervalsForQualityDetection = getIntervalsForQualityDetection(\n\t\tallIntervals,\n\t\tchord,\n\t\tisSuspended,\n\t\tomits\n\t);\n\n\tconst intervalsToQualities = [\n\t\t// !!! do not change order without a good reason\n\t\t{ qualityIntervals: ['b3'], quality: qualities.mi },\n\t\t{ qualityIntervals: ['b3', '6'], quality: qualities.mi6 },\n\t\t{ qualityIntervals: ['b3', '7'], quality: qualities.miMa7 },\n\t\t{ qualityIntervals: ['b3', 'b7'], quality: qualities.mi7 },\n\n\t\t{ qualityIntervals: ['3'], quality: qualities.ma },\n\t\t{ qualityIntervals: ['3', '6'], quality: qualities.ma6 },\n\t\t{ qualityIntervals: ['3', '7'], quality: qualities.ma7 },\n\t\t{ qualityIntervals: ['3', 'b7'], quality: qualities.dom7 },\n\n\t\t{ qualityIntervals: ['3', '#5'], quality: qualities.aug },\n\t\t{ qualityIntervals: ['b3', 'b5'], quality: qualities.dim },\n\t\t{ qualityIntervals: ['b3', 'b5', 'bb7'], quality: qualities.dim7 },\n\t].sort((a, b) => b.qualityIntervals.length - a.qualityIntervals.length);\n\n\treturn _find(intervalsToQualities, (o) =>\n\t\thasAll(intervalsForQualityDetection, o.qualityIntervals)\n\t);\n}\n\n// To properly detect the chord quality, we need a \"straight\" version of the chord,\n// meaning with a third interval (= un-suspended, no omit3)\nfunction getIntervalsForQualityDetection(\n\tallIntervals,\n\tchord,\n\tisSuspended,\n\tomits\n) {\n\tconst allFilters = [\n\t\tundoOmit3.bind(null, omits),\n\t\tundoSuspension.bind(null, isSuspended, chord.normalized.intents.major),\n\t\tundoAlt5.bind(null, chord.normalized.intents.alt),\n\t\t_uniq,\n\t];\n\n\treturn chain(allFilters, _clone(allIntervals));\n}\n\nfunction undoOmit3(omits, allIntervals) {\n\tconst with3rd = _clone(allIntervals);\n\n\tif (omits.includes('3')) {\n\t\twith3rd.push('3');\n\t} else if (omits.includes('b3')) {\n\t\twith3rd.push('b3');\n\t}\n\treturn with3rd;\n}\n\nfunction undoSuspension(isSuspended, hasMajorIntent, allIntervals) {\n\tif (isSuspended) {\n\t\tconst unSuspended = _without(allIntervals, '4');\n\t\tunSuspended.push(hasMajorIntent ? '3' : 'b3');\n\t\treturn unSuspended;\n\t}\n\treturn allIntervals;\n}\n\nfunction undoAlt5(isAlt, allIntervals) {\n\tif (isAlt) {\n\t\tconst unaltered = _without(allIntervals, 'b5', '#5');\n\t\tunaltered.push('5');\n\t\treturn unaltered;\n\t}\n\treturn allIntervals;\n}\n\nfunction getExtensions(allIntervals, quality) {\n\tconst extensions = [];\n\n\tif (canBeExtended(quality)) {\n\t\tif (isMinorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '11', '13');\n\t\t} else if (isMajorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '13');\n\t\t} else if (isExtended11th(allIntervals)) {\n\t\t\textensions.push('9', '11');\n\t\t} else if (isExtended9th(allIntervals)) {\n\t\t\textensions.push('9');\n\t\t}\n\t}\n\treturn extensions;\n}\n\nfunction canBeExtended(quality) {\n\treturn [\n\t\tqualities.ma7,\n\t\tqualities.dom7,\n\t\tqualities.mi7,\n\t\tqualities.miMa7,\n\t].includes(quality);\n}\n\nfunction canHave11th(quality) {\n\treturn [qualities.mi7, qualities.miMa7].includes(quality);\n}\n\nfunction isMinorExtended13th(allIntervals, quality) {\n\treturn (\n\t\tcanHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['11', '#11']) &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isMajorExtended13th(allIntervals, quality) {\n\treturn (\n\t\t!canHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended11th(allIntervals) {\n\treturn (\n\t\thasOneOf(allIntervals, '11') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended9th(allIntervals) {\n\treturn allIntervals.includes('9');\n}\n\nfunction getAddsAndAlterations(chordIntervals, baseIntervals, quality) {\n\tconst adds = [];\n\tconst alterations = [];\n\n\tchordIntervals\n\t\t.filter((interval) => interval !== '5' && interval !== '4')\n\t\t.forEach((interval) => {\n\t\t\tif (!baseIntervals.includes(interval)) {\n\t\t\t\tif (isAlteration(quality, interval)) {\n\t\t\t\t\talterations.push(interval);\n\t\t\t\t} else {\n\t\t\t\t\tadds.push(interval);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\tif (hasAdd3(chordIntervals)) {\n\t\tadds.push('3');\n\t}\n\n\treturn {\n\t\tadds: sortIntervals(adds),\n\t\talterations: sortIntervals(alterations),\n\t};\n}\n\nfunction isAlteration(quality, interval) {\n\tconst qualityAlterations = {\n\t\t[qualities.ma]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.dom7]: ['b5', '#5', 'b9', '#9', '#11', 'b13'],\n\n\t\t[qualities.mi]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.miMa7]: ['b5', '#5', '#11', 'b13'],\n\n\t\t[qualities.aug]: [],\n\t\t[qualities.dim]: [],\n\t\t[qualities.dim7]: [],\n\t};\n\n\treturn qualityAlterations[quality].includes(interval);\n}\n\nfunction hasAdd3(allIntervals) {\n\treturn hasAll(allIntervals, ['3', '4']);\n}\n\nfunction sortIntervals(intervals) {\n\treturn intervals.sort((a, b) => {\n\t\tconst sortableA = Number.parseInt(a.replace(/[b#]/, ''));\n\t\tconst sortableB = Number.parseInt(b.replace(/[b#]/, ''));\n\t\treturn sortableA - sortableB;\n\t});\n}\n", "import { NoSymbolFoundError } from '../../helpers/ChordParsingError';\n\n/**\n * Split symbol in root/bass note and descriptor.\n * Returns null if the given string does not seems to be a chord.\n *\n * @param {String[]} noteVariants - all notes within a given notation system (English, Latin, German...)\n * @param {Chord} chord\n * @returns {Chord|null}\n */\nexport default function parseBase(noteVariants, chord) {\n\tconst { symbol } = chord.input;\n\tconst notesRegex = noteVariants.join('|');\n\tconst notesAndDescriptorRegex = new RegExp(\n\t\t'^' +\n\t\t\t'(' +\n\t\t\tnotesRegex +\n\t\t\t')' +\n\t\t\t'(.*?)' +\n\t\t\t'(/(' +\n\t\t\tnotesRegex +\n\t\t\t'))?' +\n\t\t\t'$'\n\t);\n\tconst result = symbol.match(notesAndDescriptorRegex);\n\n\tif (result && result[1]) {\n\t\tchord.input.rootNote = result[1];\n\n\t\tif (result[2]) {\n\t\t\tchord.input.descriptor = result[2];\n\t\t}\n\t\tif (result[4]) {\n\t\t\tchord.input.bassNote = result[4];\n\t\t}\n\t\treturn chord;\n\t} else {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n}\n", "const allModifiers = {\n\t// base\n\tma: 'ma',\n\tmi: 'mi',\n\tdim: 'dim',\n\thalfDim: 'halfDim',\n\taug: 'aug',\n\tseventh: 'seventh',\n\n\t// suspended\n\tsus: 'sus',\n\tsus2: 'sus2',\n\n\t// extensions\n\tninth: 'ninth',\n\televenth: 'eleventh',\n\tthirteenth: 'thirteenth',\n\n\t// alterations\n\tfifthFlat: 'b5',\n\tfifthSharp: '#5',\n\tninthFlat: 'b9',\n\tninthSharp: '#9',\n\televenthSharp: '#11',\n\tthirteenthFlat: 'b13',\n\n\t// added\n\tadd3: 'add3',\n\tadd4: 'add4',\n\taddb6: 'addb6',\n\tadd6: 'add6',\n\tadd69: 'add69',\n\tadd7: 'add7',\n\tadd9: 'add9',\n\tadd11: 'add11',\n\tadd13: 'add13',\n\n\t// special\n\tbass: 'bass',\n\tomit3: 'omit3',\n\tomit5: 'omit5',\n\tpower: 'power',\n\talt: 'alt',\n};\n\n/**\n * WARNING: when adding new modifiers symbols, be careful of possible edge cases that might arise with some combinations.\n * For example, without edge case handling, \"madd9\" would be parsed as \"ma\" instead of \"m\"+\"add9\"\n */\n\nconst major = {\n\t'^': [allModifiers.ma, allModifiers.add7],\n\tΔ: [allModifiers.ma, allModifiers.add7],\n\tM: allModifiers.ma,\n\tMa: allModifiers.ma,\n\tMaj: allModifiers.ma,\n\tMajor: allModifiers.ma,\n\tma: allModifiers.ma,\n\tmaj: allModifiers.ma,\n\tmajor: allModifiers.ma,\n};\n\nconst major7th = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => symbol + '7'\n);\nconst add7 = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => 'add' + symbol + '7'\n);\n\nconst allSymbols = {\n\t// major\n\t...major,\n\t...major7th,\n\n\t// minor\n\t'-': allModifiers.mi,\n\tm: allModifiers.mi,\n\tMi: allModifiers.mi,\n\tMin: allModifiers.mi,\n\tMinor: allModifiers.mi,\n\tmi: allModifiers.mi,\n\tmin: allModifiers.mi,\n\tminor: allModifiers.mi,\n\n\t// diminished / augmented\n\t'°': allModifiers.dim,\n\to: allModifiers.dim,\n\t0: allModifiers.dim,\n\tdim: allModifiers.dim,\n\t'dim.': allModifiers.dim,\n\tdiminished: allModifiers.dim,\n\n\tØ: allModifiers.halfDim,\n\tø: allModifiers.halfDim,\n\th: allModifiers.halfDim,\n\n\t'+': allModifiers.aug,\n\taug: allModifiers.aug,\n\taugmented: allModifiers.aug,\n\n\t// seventh\n\t7: allModifiers.seventh,\n\n\t// suspended\n\t4: allModifiers.sus,\n\tsus: allModifiers.sus,\n\tsus4: allModifiers.sus,\n\tsuspended: allModifiers.sus,\n\tsuspended4: allModifiers.sus,\n\tsus2: allModifiers.sus2,\n\tsuspended2: allModifiers.sus2,\n\n\t// extensions\n\t9: allModifiers.ninth,\n\t11: allModifiers.eleventh,\n\t13: allModifiers.thirteenth,\n\n\t// alterations\n\tb3: allModifiers.mi,\n\tb5: allModifiers.fifthFlat,\n\t'♭5': allModifiers.fifthFlat,\n\t'#5': allModifiers.fifthSharp,\n\t'♯5': allModifiers.fifthSharp,\n\tb9: allModifiers.ninthFlat,\n\t'♭9': allModifiers.ninthFlat,\n\taddb9: allModifiers.ninthFlat,\n\t'add♭9': allModifiers.ninthFlat,\n\t'#9': allModifiers.ninthSharp,\n\t'♯9': allModifiers.ninthSharp,\n\t'add#9': allModifiers.ninthSharp,\n\t'add♯9': allModifiers.ninthSharp,\n\t'#11': allModifiers.eleventhSharp,\n\t'♯11': allModifiers.eleventhSharp,\n\t'add#11': allModifiers.eleventhSharp,\n\tb13: allModifiers.thirteenthFlat,\n\t'♭13': allModifiers.thirteenthFlat,\n\taddb13: allModifiers.thirteenthFlat,\n\t'add♭13': allModifiers.thirteenthFlat,\n\n\t// added\n\t...add7,\n\t2: allModifiers.add9,\n\tadd2: allModifiers.add9,\n\tadd3: allModifiers.add3,\n\tadd4: allModifiers.add4,\n\taddb6: allModifiers.addb6,\n\tb6: allModifiers.addb6,\n\t6: allModifiers.add6,\n\tadd6: allModifiers.add6,\n\t'6/9': allModifiers.add69,\n\t69: allModifiers.add69,\n\t96: allModifiers.add69,\n\t'9/6': allModifiers.add69,\n\tadd9: allModifiers.add9,\n\tadd11: allModifiers.add11,\n\tadd13: allModifiers.add13,\n\n\t// special\n\tbass: allModifiers.bass,\n\tomit3: allModifiers.omit3,\n\tno3: allModifiers.omit3,\n\tomit5: allModifiers.omit5,\n\tno5: allModifiers.omit5,\n\t5: allModifiers.power,\n\talt: allModifiers.alt,\n\t'alt.': allModifiers.alt,\n\taltered: allModifiers.alt,\n};\n\nfunction getDerivedModifiers(source, modifierId, derivedFn) {\n\treturn Object.keys(source)\n\t\t.map(derivedFn)\n\t\t.reduce((acc, curr) => {\n\t\t\tacc[curr] = modifierId;\n\t\t\treturn acc;\n\t\t}, {});\n}\n\nconst allVariants = Object.keys(allSymbols).sort((a, b) => b.length - a.length);\n\nexport { allSymbols, allVariants };\nexport default allModifiers;\n", "export default {\n\t1: 0,\n\t2: 2,\n\tb3: 3,\n\t3: 4,\n\t4: 5,\n\tb5: 6,\n\t5: 7,\n\t'#5': 8,\n\tb6: 8,\n\t6: 9,\n\tbb7: 9,\n\tb7: 10,\n\t7: 11,\n\tb9: 13,\n\t9: 14,\n\t'#9': 15,\n\t11: 17,\n\t'#11': 18,\n\tb13: 20,\n\t13: 21,\n};\n", "import _uniq from 'lodash/uniq';\nimport {\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n} from '../../helpers/ChordParsingError';\n\nimport m from '../../dictionaries/modifiers';\nimport { allSymbols, allVariants } from '../../dictionaries/modifiers';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\nimport { hasNoneOf, hasOneOf } from '../../helpers/hasElement';\n\n/**\n * Convert the descriptor into a suite of intervals, semitones and intents\n *\n * @param {Array<('b5'|'#5'|'b9'|'#9'|'#11'|'b13')>} altIntervals\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function parseDescriptor(altIntervals, chord) {\n\tlet allModifiers = [];\n\n\tif (chord.input.parsableDescriptor) {\n\t\tallModifiers = getModifiers(chord);\n\t}\n\n\tchord.input.modifiers = allModifiers;\n\tchord.normalized.intervals = getIntervals(allModifiers, altIntervals);\n\tchord.normalized.semitones = getSemitones(chord.normalized.intervals);\n\tchord.normalized.intents = getIntents(allModifiers);\n\n\treturn chord;\n}\n\nfunction getModifiers(chord) {\n\tconst { parsableDescriptor } = chord.input;\n\tconst modifiers = [];\n\n\tconst descriptorRegex = new RegExp(\n\t\tallVariants.map(escapeRegex).join('|'),\n\t\t'g'\n\t);\n\tconst descriptorMatches = parsableDescriptor.match(descriptorRegex);\n\n\tlet remainingChars = parsableDescriptor;\n\tlet allModifiersId;\n\n\tif (descriptorMatches) {\n\t\tdescriptorMatches.forEach((match) => {\n\t\t\tallModifiersId = allSymbols[match];\n\n\t\t\tif (!Array.isArray(allModifiersId)) {\n\t\t\t\tallModifiersId = [allModifiersId];\n\t\t\t}\n\n\t\t\tallModifiersId.forEach((modifierId) => {\n\t\t\t\tif (modifiers.includes(modifierId)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmodifiers.push(modifierId);\n\n\t\t\t\tremainingChars = remainingChars.replace(match, '');\n\t\t\t});\n\t\t});\n\t}\n\n\tif (modifiers.length === 0) {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n\tif (remainingChars.trim().length > 0) {\n\t\tthrow new InvalidModifierError(chord, remainingChars);\n\t}\n\n\treturn modifiers;\n}\n\nfunction getIntervals(allModifiers, altIntervals) {\n\tif (allModifiers.includes(m.power)) {\n\t\treturn ['1', '5'];\n\t} else if (allModifiers.includes(m.bass)) {\n\t\treturn ['1'];\n\t}\n\n\treturn _uniq([\n\t\t'1',\n\t\t...getThird(allModifiers),\n\t\t...getFourth(allModifiers),\n\t\t...getFifths(allModifiers, altIntervals),\n\t\t...getSixth(allModifiers),\n\t\t...getSevenths(allModifiers),\n\t\t...getNinths(allModifiers, altIntervals),\n\t\t...getElevenths(allModifiers, altIntervals),\n\t\t...getThirteenths(allModifiers, altIntervals),\n\t]).sort((a, b) => intervalsToSemitones[a] - intervalsToSemitones[b]);\n}\n\nfunction getThird(allModifiers) {\n\tconst third = [];\n\tif (allModifiers.includes(m.omit3)) {\n\t\treturn [];\n\t}\n\tif (!hasOneOf(allModifiers, [m.sus, m.sus2])) {\n\t\tif (!hasMajorIntent(allModifiers)) {\n\t\t\tthird.push('b3');\n\t\t} else if (!allModifiers.includes(m.eleventh)) {\n\t\t\tthird.push('3');\n\t\t}\n\t}\n\tif (allModifiers.includes(m.add3)) {\n\t\tthird.push('3');\n\t}\n\treturn third;\n}\n\nfunction getFourth(allModifiers) {\n\tconst fourth = [];\n\tif (hasOneOf(allModifiers, [m.sus, m.add4])) {\n\t\tfourth.push('4');\n\t}\n\treturn fourth;\n}\n\nfunction getFifths(allModifiers, altIntervals) {\n\tconst fifths = [];\n\tif (allModifiers.includes(m.omit5)) {\n\t\treturn [];\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.dim, m.halfDim, m.fifthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b5')\n\t) {\n\t\tfifths.push('b5');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.aug, m.fifthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#5')\n\t) {\n\t\tfifths.push('#5');\n\t}\n\tif (!fifths.length && !allModifiers.includes(m.thirteenthFlat)) {\n\t\tfifths.push('5');\n\t}\n\treturn fifths;\n}\n\nfunction getSixth(allModifiers) {\n\tconst sixth = [];\n\tif (hasOneOf(allModifiers, [m.addb6])) {\n\t\tsixth.push('b6');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t!isExtended(allModifiers) &&\n\t\t!hasOneOf(allModifiers, [m.halfDim])\n\t) {\n\t\tsixth.push('6');\n\t}\n\treturn sixth;\n}\n\nfunction getSevenths(allModifiers) {\n\tconst sevenths = [];\n\tif (hasOneOf(allModifiers, [m.alt])) {\n\t\tsevenths.push('b7');\n\t}\n\tif (hasOneOf(allModifiers, [m.seventh, m.halfDim])) {\n\t\tif (allModifiers.includes(m.dim)) {\n\t\t\tsevenths.push('bb7');\n\t\t} else if (allModifiers.includes(m.halfDim)) {\n\t\t\tsevenths.push('b7');\n\t\t} else {\n\t\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t\t}\n\t} else if (hasOneOf(allModifiers, [m.ninth, m.eleventh, m.thirteenth])) {\n\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t}\n\tif (allModifiers.includes(m.add7)) {\n\t\tsevenths.push('7');\n\t}\n\treturn sevenths;\n}\n\nfunction getMinorOrMajorSeventh(allModifiers) {\n\treturn allModifiers.includes(m.ma) ? '7' : 'b7';\n}\n\nfunction getNinths(allModifiers, altIntervals) {\n\tconst ninth = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add69, m.ninth, m.eleventh, m.thirteenth]) &&\n\t\thasNoneOf(allModifiers, [m.ninthFlat, m.ninthSharp])\n\t) {\n\t\tninth.push('9');\n\t}\n\tif (hasOneOf(allModifiers, [m.sus2, m.add9])) {\n\t\tninth.push('9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b9')\n\t) {\n\t\tninth.push('b9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#9')\n\t) {\n\t\tninth.push('#9');\n\t}\n\treturn ninth;\n}\n\nfunction getElevenths(allModifiers, altIntervals) {\n\tconst elevenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenth]) &&\n\t\t!hasMajorIntent(allModifiers)\n\t) {\n\t\televenths.push('11');\n\t} else if (hasOneOf(allModifiers, [m.eleventh, m.add11])) {\n\t\televenths.push('11');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.eleventhSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#11')\n\t) {\n\t\televenths.push('#11');\n\t}\n\treturn elevenths;\n}\n\nfunction getThirteenths(allModifiers, altIntervals) {\n\tconst thirteenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add13, m.thirteenth]) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\tisExtended(allModifiers)) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\thasOneOf(allModifiers, [m.halfDim]))\n\t) {\n\t\tthirteenths.push('13');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b13')\n\t) {\n\t\tthirteenths.push('b13');\n\t}\n\treturn thirteenths;\n}\n\nfunction shouldAlter(allModifiers, altIntervals, interval) {\n\treturn allModifiers.includes(m.alt) && altIntervals.includes(interval);\n}\n\nfunction hasMajorIntent(allModifiers) {\n\treturn hasNoneOf(allModifiers, [m.mi, m.dim, m.dim7, m.halfDim]);\n}\n\nfunction isExtended(allModifiers) {\n\treturn hasOneOf(allModifiers, [\n\t\tm.seventh,\n\t\tm.ninth,\n\t\tm.eleventh,\n\t\tm.thirteenth,\n\t]);\n}\n\n// Based on https://stackoverflow.com/a/6969486\nfunction escapeRegex(string) {\n\treturn string.replace(/[.\\-*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction getSemitones(allIntervals) {\n\treturn allIntervals\n\t\t.map((interval) => intervalsToSemitones[interval])\n\t\t.sort((a, b) => a - b);\n}\n\n// intents will be used later at formatting for disambiguation of some potentially confusing cases\nfunction getIntents(allModifiers) {\n\treturn {\n\t\tmajor: hasMajorIntent(allModifiers),\n\t\televenth: allModifiers.includes(m.eleventh),\n\t\talt: allModifiers.includes(m.alt),\n\t};\n}\n", "import chain from '../helpers/chain';\nimport _cloneDeep from 'lodash/cloneDeep';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport { allVariantsPerGroup } from '../dictionaries/notes';\n\nimport {\n\tInvalidInputError,\n\tUnexpectedError,\n} from '../helpers/ChordParsingError';\n\nimport checkIntervalsConsistency from './filters/checkIntervalsConsistency';\nimport formatSymbol from './filters/formatSymbol';\nimport formatSymbolParts from './filters/formatSymbolParts';\nimport getParsableDescriptor from './filters/getParsableDescriptor';\nimport initChord from './filters/initChord';\nimport nameIndividualChordNotes from './filters/nameIndividualChordNotes';\nimport normalizeNotes from './filters/normalizeNotes';\nimport normalizeDescriptor from './filters/normalizeDescriptor';\nimport parseBase from './filters/parseBase';\nimport parseDescriptor from './filters/parseDescriptor';\n\n/**\n * Create a chord parser function\n * @param {ParserConfiguration} [parserConfiguration]\n * @returns {function(String): Chord}\n */\nfunction chordParserFactory(parserConfiguration = {}) {\n\tconst allAltIntervals = ['b5', '#5', 'b9', '#9', '#11', 'b13'];\n\tconst allNotationSystems = ['english', 'german', 'latin'];\n\n\tconst {\n\t\tnotationSystems = _cloneDeep(allNotationSystems),\n\t\taltIntervals = _cloneDeep(allAltIntervals),\n\t\tcustomFilters = [],\n\t} = parserConfiguration;\n\n\tcheckAltIntervals(altIntervals, allAltIntervals);\n\tcheckNotationSystems(notationSystems, allNotationSystems);\n\tcheckCustomFilters(customFilters);\n\n\treturn parseChord;\n\n\t/**\n\t * Convert an input string into an abstract chord structure\n\t * @param {String} symbol - the chord symbol candidate\n\t * @returns {Chord|Object} A chord object if the given string is successfully parsed. An object with an `error` property otherwise.\n\t */\n\tfunction parseChord(symbol) {\n\t\tconst allErrors = [];\n\n\t\tif (!isInputValid(symbol)) {\n\t\t\tconst e = new InvalidInputError();\n\t\t\tallErrors.push(formatError(e));\n\t\t}\n\n\t\tconst allVariantsPerGroupCopy = _cloneDeep(allVariantsPerGroup).filter(\n\t\t\t(variantsGroup) => notationSystems.includes(variantsGroup.name)\n\t\t);\n\n\t\tlet chord;\n\t\tlet allFilters;\n\t\tlet variants;\n\n\t\tif (!allErrors.length) {\n\t\t\twhile (allVariantsPerGroupCopy.length && !chord) {\n\t\t\t\tvariants = allVariantsPerGroupCopy.shift();\n\n\t\t\t\tallFilters = [\n\t\t\t\t\tinitChord.bind(null, parserConfiguration),\n\t\t\t\t\tparseBase.bind(null, variants.notes),\n\t\t\t\t\tgetParsableDescriptor,\n\t\t\t\t\tparseDescriptor.bind(null, altIntervals),\n\t\t\t\t\tcheckIntervalsConsistency,\n\t\t\t\t\tnormalizeNotes,\n\t\t\t\t\tnormalizeDescriptor,\n\t\t\t\t\tformatSymbolParts,\n\t\t\t\t\tformatSymbol,\n\t\t\t\t\tnameIndividualChordNotes,\n\t\t\t\t\t...customFilters,\n\t\t\t\t];\n\n\t\t\t\ttry {\n\t\t\t\t\tchord = chain(allFilters, symbol);\n\t\t\t\t\tif (chord) {\n\t\t\t\t\t\tchord.input.notationSystem = variants.name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tallErrors.push(getUnexpectedError(variants.name));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tallErrors.push(formatError(e, variants.name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chord ? chord : { error: allErrors };\n\t}\n}\n\nfunction checkAltIntervals(altIntervals, allAltIntervals) {\n\tcheckArray('altIntervals', altIntervals, allAltIntervals, true);\n}\n\nfunction checkNotationSystems(notationSystems, allNotationSystems) {\n\tcheckArray('notationSystems', notationSystems, allNotationSystems);\n}\n\nfunction checkArray(arrayName, arrayToTest, allowedValues, allowEmpty) {\n\tif (!Array.isArray(arrayToTest)) {\n\t\tthrow new TypeError(`'${arrayName}' should be an array`);\n\t}\n\tif (!allowEmpty && arrayToTest.length === 0) {\n\t\tthrow new TypeError(`'${arrayName}' cannot be empty`);\n\t}\n\tarrayToTest.forEach((system) => {\n\t\tif (!allowedValues.includes(system)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`'${system}' is not a valid value for ${arrayName}`\n\t\t\t);\n\t\t}\n\t});\n}\n\nfunction isInputValid(input) {\n\treturn typeof input === 'string' && input.length > 0;\n}\n\nfunction getUnexpectedError(notationSystem) {\n\tconst error = new UnexpectedError();\n\treturn formatError(error, notationSystem);\n}\n\nfunction formatError(exceptionError, notationSystem) {\n\treturn {\n\t\ttype: exceptionError.name,\n\t\tchord: exceptionError.chord,\n\t\tmessage: exceptionError.message,\n\t\tnotationSystem,\n\t};\n}\n\n/**\n * @module chordParserFactory\n * Expose the chordParserFactory() function\n */\nexport default chordParserFactory;\n", "import { hasExactly } from '../../helpers/hasElement';\n\nconst shortDescriptors = {\n\tsus2: 'sus2',\n\tadd2: '2',\n\tomit: 'no',\n\tma: 'M',\n\tmi: 'm',\n\tdim: '°',\n\taug7: '7+',\n\televenth: '11',\n};\n\n/**\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function shortenNormalized(chord) {\n\tlet descriptor;\n\tlet chordChanges = chord.formatted.chordChanges;\n\n\tif (isSus2(chord)) {\n\t\tdescriptor = shortDescriptors.sus2;\n\t\tchordChanges = [];\n\t} else if (isAdd2(chord)) {\n\t\tdescriptor = shortDescriptors.add2;\n\t\tchordChanges = [];\n\t} else if (isAug7(chord)) {\n\t\tdescriptor = shortDescriptors.aug7;\n\t\tchordChanges = [];\n\t} else {\n\t\tdescriptor = chord.formatted.descriptor\n\t\t\t.replace('mi', shortDescriptors.mi)\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('dim', shortDescriptors.dim);\n\n\t\tif (isEleventh(chord)) {\n\t\t\tdescriptor = descriptor.replace(\n\t\t\t\t/7sus|9sus/,\n\t\t\t\tshortDescriptors.eleventh\n\t\t\t);\n\t\t}\n\t}\n\n\tchordChanges = chordChanges.map((change) => {\n\t\treturn change\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('omit', shortDescriptors.omit);\n\t});\n\n\treturn {\n\t\t...chord,\n\t\tformatted: {\n\t\t\t...chord.formatted,\n\t\t\tdescriptor,\n\t\t\tchordChanges,\n\t\t},\n\t};\n}\n\nfunction isSus2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '5', '9']);\n}\n\nfunction isAdd2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '5', '9']);\n}\n\nfunction isAug7(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '#5', 'b7']);\n}\n\nfunction isEleventh(chord) {\n\treturn chord.normalized.intents.eleventh;\n}\n", "import _difference from 'lodash/difference';\n\nimport chain from '../../helpers/chain';\n\nimport normalizeDescriptor from '../../parser/filters/normalizeDescriptor';\nimport formatSymbolParts from '../../parser/filters/formatSymbolParts';\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\n\nimport { hasNoneOf } from '../../helpers/hasElement';\n\n/**\n * @param {Chord} chord\n * @param {('none'|'max'|'core')} level\n * @returns {Chord}\n */\nexport default function simplify(level = 'none', chord) {\n\tif (level === 'none') {\n\t\treturn chord;\n\t}\n\n\tconst intervalsToRemove = {\n\t\tmax: [\n\t\t\t'4',\n\t\t\t'b5',\n\t\t\t'#5',\n\t\t\t'6',\n\t\t\t'bb7',\n\t\t\t'b7',\n\t\t\t'7',\n\t\t\t'b9',\n\t\t\t'9',\n\t\t\t'#9',\n\t\t\t'11',\n\t\t\t'#11',\n\t\t\t'b13',\n\t\t\t'13',\n\t\t],\n\t\tcore: ['4', 'b9', '9', '#9', '11', '#11', 'b13', '13'],\n\t};\n\n\tconst intervals = _difference(\n\t\tchord.normalized.intervals,\n\t\tintervalsToRemove[level]\n\t);\n\n\tif (hasNoneOf(intervals, ['b3', '3'])) {\n\t\tintervals.push(chord.normalized.intents.major ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5'])) {\n\t\tintervals.push('5');\n\t}\n\n\tchord.normalized.intervals = intervals;\n\tchord.normalized.semitones = intervals.map(\n\t\t(interval) => intervalsToSemitones[interval]\n\t);\n\tchord.normalized.intents.eleventh = false;\n\tchord.normalized.intents.alt = false;\n\n\tif (level === 'max') {\n\t\tdelete chord.normalized.bassNote;\n\t}\n\n\tconst allFilters = [\n\t\tnormalizeDescriptor,\n\t\tformatSymbolParts,\n\t\tnameIndividualChordNotes,\n\t];\n\n\treturn chain(allFilters, chord);\n}\n", "import _invert from 'lodash/invert';\n\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\n\nconst notes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'];\n\nconst sharpsToFlats = {\n\t'C#': 'Db',\n\t'D#': 'Eb',\n\t'F#': 'Gb',\n\t'G#': 'Ab',\n\t'A#': 'Bb',\n};\n\nconst flatsToSharps = _invert(sharpsToFlats);\n\nexport default function transpose(transposeValue, useFlats, chord) {\n\tconst { rootNote, bassNote } = chord.normalized;\n\n\tconst rootSharp = convertToSharp(rootNote);\n\tchord.normalized.rootNote = transposeNote(\n\t\trootSharp,\n\t\ttransposeValue,\n\t\tuseFlats\n\t);\n\tchord.formatted.rootNote = chord.normalized.rootNote;\n\n\tif (bassNote) {\n\t\tconst bassSharp = convertToSharp(bassNote);\n\t\tchord.normalized.bassNote = transposeNote(\n\t\t\tbassSharp,\n\t\t\ttransposeValue,\n\t\t\tuseFlats\n\t\t);\n\t\tchord.formatted.bassNote = chord.normalized.bassNote;\n\t}\n\n\treturn nameIndividualChordNotes(chord);\n}\n\nfunction transposeNote(note, value, useFlats) {\n\tconst noteIndex = notes.indexOf(note);\n\tconst transposedIndex = noteIndex + value;\n\n\tconst octaves = Math.floor(transposedIndex / 12);\n\tconst correctedTransposedIndex = transposedIndex - octaves * 12;\n\n\tconst transposed = notes[correctedTransposedIndex];\n\n\treturn useFlats ? sharpsToFlats[transposed] || transposed : transposed;\n}\n\nfunction convertToSharp(note) {\n\treturn flatsToSharps[note] || note;\n}\n", "const translationTables = {\n\tgerman: {\n\t\tAb: 'As',\n\t\tA: 'A',\n\t\t'A#': 'Ais',\n\t\tBb: 'Hes',\n\t\tB: 'H',\n\t\tC: 'C',\n\t\t'C#': 'Cis',\n\t\tDb: 'Des',\n\t\tD: 'D',\n\t\t'D#': 'Dis',\n\t\tEb: 'Es',\n\t\tE: 'E',\n\t\tF: 'F',\n\t\t'F#': 'Fis',\n\t\tGb: 'Ges',\n\t\tG: 'G',\n\t\t'G#': 'Gis',\n\t},\n\tlatin: {\n\t\tAb: 'Lab',\n\t\tA: 'La',\n\t\t'A#': 'La#',\n\t\tBb: 'Sib',\n\t\tB: 'Si',\n\t\tC: 'Do',\n\t\t'C#': 'Do#',\n\t\tDb: 'Reb',\n\t\tD: 'Re',\n\t\t'D#': 'Re#',\n\t\tEb: 'Mib',\n\t\tE: 'Mi',\n\t\tF: 'Fa',\n\t\t'F#': 'Fa#',\n\t\tGb: 'Solb',\n\t\tG: 'Sol',\n\t\t'G#': 'Sol#',\n\t},\n};\nconst allNotationSystems = Object.keys(translationTables);\n\n/**\n * @param {('auto'|'english'|'german'|'latin')} notationSystem\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function convertNotationSystem(\n\tnotationSystem = 'english',\n\tchord\n) {\n\tconst finalNotationSystem =\n\t\tnotationSystem === 'auto' ? chord.input.notationSystem : notationSystem;\n\n\tif (finalNotationSystem === 'english') return chord;\n\tif (!allNotationSystems.includes(finalNotationSystem)) return null;\n\n\tchord.formatted.rootNote =\n\t\ttranslationTables[finalNotationSystem][chord.formatted.rootNote];\n\n\tif (chord.formatted.bassNote) {\n\t\tchord.formatted.bassNote =\n\t\t\ttranslationTables[finalNotationSystem][chord.formatted.bassNote];\n\t}\n\treturn chord;\n}\n", "/**\n * @param {Chord} chord\n * @returns {String}\n */\nexport default function textPrinter(chord) {\n\treturn chord && chord.formatted && chord.formatted.symbol\n\t\t? chord.formatted.symbol\n\t\t: null;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport textPrinter from './text';\nimport chordParserFactory from '../../parser/chordParserFactory';\n\n/**\n * This printer returns a `chord` object reflecting the applied rendering filters. This object is very close to what would\n * be obtained by re-parsing the rendered chord.\n * It is basically the `chord` object in its current state, with 2 differences:\n * - a re-built `input` property to include all the changes applied during rendering (transposition, simplification, etc.)\n * - a removed `notationSystems` parser configuration since it may not be relevant anymore, especially if the rendering changed the notation system\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function rawPrinter(chord) {\n\t// make sure the chord can be re-parsed, whichever notation system was used for the rendering\n\tdelete chord.parserConfiguration.notationSystems;\n\n\tconst cloned = _cloneDeep(chord);\n\n\t// Re-parse the rendered chord to get the 'input' property right\n\tconst textPrinted = textPrinter(chord);\n\tconst parseChord = chordParserFactory(chord.parserConfiguration);\n\tconst reParsed = parseChord(textPrinted);\n\tcloned.input = reParsed.input;\n\n\treturn cloned;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport chain from '../helpers/chain';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport shortenNormalized from './filters/shortenNormalized';\nimport simplifyFilter from './filters/simplify';\nimport transpose from './filters/transpose';\nimport convertNotationSystem from './filters/convertNotationSystem';\nimport formatSymbol from '../parser/filters/formatSymbol';\nimport textPrinter from './printer/text';\nimport rawPrinter from './printer/raw';\n\n/**\n * Create a pre-configured chord rendering function\n * @param {RendererConfiguration} [rendererConfiguration]\n * @returns {function(Chord): String}\n */\nfunction chordRendererFactory({\n\tuseShortNamings = false,\n\tsimplify = 'none',\n\ttransposeValue = 0,\n\tharmonizeAccidentals = false,\n\tuseFlats = false,\n\tprinter = 'text',\n\tnotationSystem = 'english',\n\tcustomFilters = [],\n} = {}) {\n\tcheckCustomFilters(customFilters);\n\n\tconst allFilters = [];\n\n\tif (['max', 'core'].includes(simplify)) {\n\t\tallFilters.push(simplifyFilter.bind(null, simplify));\n\t}\n\n\tif (harmonizeAccidentals || transposeValue !== 0) {\n\t\tallFilters.push(transpose.bind(null, transposeValue, useFlats));\n\t}\n\n\tif (useShortNamings) {\n\t\tallFilters.push(shortenNormalized);\n\t}\n\n\tallFilters.push(\n\t\tconvertNotationSystem.bind(null, notationSystem),\n\t\tformatSymbol,\n\t\t...customFilters\n\t);\n\n\treturn renderChord;\n\n\t/**\n\t * Render a chord structure\n\t * @param {Chord} chord - the chord structure to render\n\t * @returns {String|Chord} output depends on the selected printer: string for text printer (default), Chord for raw printer\n\t */\n\tfunction renderChord(chord) {\n\t\tif (!isValidChord(chord)) {\n\t\t\treturn null;\n\t\t}\n\t\tconst filteredChord = chain(allFilters, _cloneDeep(chord));\n\n\t\treturn printer === 'raw'\n\t\t\t? rawPrinter(filteredChord)\n\t\t\t: textPrinter(filteredChord);\n\t}\n}\n\nconst isValidChord = (chord) => {\n\treturn chord && typeof chord === 'object' && !chord.error && chord.input;\n};\n\n/**\n * @module chordRendererFactory\n * Expose the chordRendererFactory() function\n **/\nexport default chordRendererFactory;\n", "import './typedefs';\n\nimport chordParserFactory from './parser/chordParserFactory';\nimport chordRendererFactory from './renderer/chordRendererFactory';\n\nexport { chordParserFactory, chordRendererFactory };\n", "import Promise from 'promise';\nimport { Playlist, Song, Cell, Chord } from './parser.js';\nimport { Converter, LogLevel } from './converter.js';\nimport { Version } from './version.js';\n\nexport function convertSync(ireal, options = {}) {\n const playlist = new Playlist(ireal);\n playlist.songs.forEach(song => {\n song.musicXml = Converter.convert(song, options);\n });\n return playlist;\n}\n\nexport async function convert(ireal, options = {}) {\n return new Promise(resolve => resolve(convertSync(ireal, options)));\n}\n\nexport { Playlist, Song, Cell, Chord, Converter, LogLevel, Version };\n", "/**\n * The iReal Pro parser is derived from\n * https://github.com/daumling/ireal-renderer\n * which is itself derived from\n * https://github.com/pianosnake/ireal-reader\n *\n * None of those modules did exactly what is needed here, namely return\n * a full structure that can be iterated downstream.\n */\n\nimport diff from 'fast-diff';\n\nexport class Playlist {\n constructor(ireal){\n const playlistEncoded = /.*?(irealb(?:ook)?):\\/\\/([^\"]*)/.exec(ireal);\n const playlist = decodeURIComponent(playlistEncoded[2]);\n const parts = playlist.split(\"===\"); //songs are separated by ===\n if (parts.length > 1) this.name = parts.pop(); //playlist name\n this.songs = parts\n .map(part => {\n try {\n return new Song(part, playlistEncoded[1] === 'irealbook');\n }\n catch (error) {\n const parts = part.split(\"=\");\n const title = Song.parseTitle(parts[0].trim());\n console.error(`[ireal-musicxml] [${title}] ${error}`);\n return null;\n }\n })\n .filter(song => song !== null)\n .reduce((songs, song) => {\n if (songs.length > 0) {\n // Detect multi-part songs via their titles.\n // The parts of the same song have the same title, except for the part number, so they follow each other in the list.\n // The `diff` module compares two titles and returns a list of similarities and differences.\n // We expect the first diff to be a similarity, followed by differences that are only numeric.\n // When we find a multi-part song, we just concatenate the cells into the first part.\n const diffs = diff(songs[songs.length-1].title, song.title);\n if (diffs[0][0] === 0 && diffs.every(d => d[0] === 0 || d[1].match(/^\\d+$/))) {\n songs[songs.length-1].cells = songs[songs.length-1].cells.concat(song.cells);\n return songs;\n }\n }\n songs.push(song);\n return songs;\n }, []);\n }\n}\n\nexport class Cell {\n constructor() {\n this.annots = [];\n this.comments = [];\n this.bars = \"\";\n this.spacer = 0;\n this.chord = null;\n }\n}\n\nexport class Chord {\n constructor(note, modifiers = \"\", over = null, alternate = null) {\n this.note = note;\n this.modifiers = modifiers;\n this.over = over;\n this.alternate = alternate;\n }\n}\n\nexport class Song {\n constructor(ireal, oldFormat = false) {\n this.cells = [];\n this.musicXml = \"\";\n if (!ireal) {\n this.title = \"\";\n this.composer = \"\";\n this.style = \"\";\n this.key = \"\";\n this.transpose = 0;\n this.groove = \"\";\n this.bpm = 0;\n this.repeats = 0;\n return;\n }\n const parts = ireal.split(\"=\"); //split on one sign, remove the blanks\n if (oldFormat) {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[2].trim();\n this.key = parts[3];\n this.cells = this.parse(parts[5]);\n }\n else {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[3].trim();\n this.key = parts[4];\n this.transpose = +parts[5] || 0; // TODO\n this.groove = parts[7];\n this.bpm = +parts[8];\n this.repeats = +parts[9] || 3;\n const music = parts[6].split(\"1r34LbKcu7\");\n this.cells = this.parse(unscramble(music[1]));\n }\n }\n\n /**\n * The RegExp for a complete chord. The match array contains:\n * 1 - the base note\n * 2 - the modifiers (+-ohd0123456789 and su for sus)\n * 3 - any comments (may be e.g. add, sub, or private stuff)\n * 4 - the \"over\" part starting with a slash\n * 5 - the top chord as (chord)\n * @type RegExp\n */\n static chordRegex = /^([A-G][b#]?)((?:sus|alt|add|[+\\-^\\dhob#])*)(\\*.+?\\*)*(\\/[A-G][#b]?)?(\\(.*?\\))?/;\n static chordRegex2 = /^([ Wp])()()(\\/[A-G][#b]?)?(\\(.*?\\))?/;\t// need the empty captures to match chordRegex\n\n static regExps = [\n /^\\*[a-zA-Z]/,\t\t\t\t\t\t\t// section\n /^T\\d\\d/,\t\t\t\t\t\t\t\t// time measurement\n /^N./,\t\t\t\t\t\t\t\t\t// repeat marker\n /^<.*?>/,\t\t\t\t\t\t\t\t// comments\n Song.chordRegex,\t\t\t\t// chords\n Song.chordRegex2,\t\t\t\t// space, W and p (with optional alt chord)\n ];\n\n /**\n * The parser cracks up the raw music string into several objects,\n * one for each cell. iReal Pro works with rows of 16 cell each. The result\n * is stored at song.cells.\n *\n * Each object has the following properties:\n *\n * chord: if non-null, a chord object with these properties:\n * note - the base note (also blank, W = invisible root, p/x/r - pause/bar repeat/double-bar repeat, n - no chord)\n * modifiers - the modifiers, like 7, + o etc (string)\n * over - if non-null, another chord object for the under-note\n * alternate - if non-null another chord object for the alternate chord\n * annots: annotations, a string of:\n * *x - section, like *v, *I, *A, *B etc\n * Nx - repeat bots (N1, N2 etc)\n * Q - coda\n * S - segno\n * Txx - measure (T44 = 4/4 etc, but T12 = 12/8)\n * U - END\n * f - fermata\n * l - (letter l) normal notes\n * s - small notes\n * comments: an array of comment strings\n * bars: bar specifiers, a string of:\n * | - single vertical bar, left\n * [ - double bar, left\n * ] - double bar, right\n * { - repeat bar, left\n * } - repeat bar, right\n * Z - end bar, right\n * spacer - a number indicating the number of vertical spacers above this cell\n *\n * @returns [Cell]\n */\n parse(ireal) {\n let text = ireal.trim();\n const arr = [];\n while (text) {\n let found = false;\n for (let i = 0; i < Song.regExps.length; i++) {\n const match = Song.regExps[i].exec(text);\n if (match) {\n found = true;\n if (match.length <= 2) {\n arr.push(match[0]);\n text = text.substr(match[0].length);\n }\n else {\n // a chord\n arr.push(match);\n text = text.substr(match[0].length);\n }\n break;\n }\n }\n if (!found) {\n // ignore the comma separator\n if (text[0] !== ',')\n arr.push(text[0]);\n text = text.substr(1);\n }\n }\n\n // pass 2: extract prefixes, suffixes, annotations and comments\n const cells = [];\n let obj = this.newCell(cells);\n let prevobj = null;\n for (let i = 0; i < arr.length; i++) {\n let cell = arr[i];\n if (cell instanceof Array) {\n obj.chord = this.parseChord(cell);\n cell = \" \";\n }\n switch (cell[0]) {\n case '{':\t// open repeat\n case '[':\t// open double bar\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = cell; cell = null; break;\n case '|':\t// single bar - close previous and open this\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = '('; cell = null; break;\n case ']':\t// close double bar\n case '}':\t// close repeat\n case 'Z':\t// ending double bar\n if (prevobj) { prevobj.bars += cell; prevobj = null; }\n cell = null; break;\n case 'n':\t// N.C.\n obj.chord = new Chord(cell[0]);\n break;\n case ',':\tcell = null; break; // separator\n case 'S':\t// segno\n case 'T':\t// time measurement\n case 'Q':\t// coda\n case 'N':\t// repeat\n case 'U':\t// END\n case 's':\t// small\n case 'l':\t// normal\n case 'f':\t// fermata\n case '*': obj.annots.push(cell); cell = null; break;\n case 'Y': obj.spacer++; cell = null; prevobj = null; break;\n case 'r':\n case 'x':\n case 'W':\n obj.chord = new Chord(cell);\n break;\n case '<':\n cell = cell.substr(1, cell.length-2);\n obj.comments.push(cell);\n cell = null; break;\n default:\n }\n if (cell && i < arr.length-1) {\n prevobj = obj;\t\t// so we can add any closing barline later\n obj = this.newCell(cells);\n }\n }\n return cells;\n }\n\n /**\n * The title had \"A\" and \"The\" at the back (e.g. \"Gentle Rain, The\")\n */\n static parseTitle(title) {\n return title.replace(/(.*)(, )(A|The)$/g, '$3 $1');\n }\n\n /**\n * The composer is reversed (last first) if it only has 2 names :shrug:\n */\n static parseComposer(composer) {\n const parts = composer.split(/(\\s+)/); // match and return spaces too\n if (parts.length == 3) { // [last, spaces, first]\n return parts[2] + parts[1] + parts[0];\n }\n return composer;\n }\n\n parseChord(chord) {\n var note = chord[1] || \" \";\n var modifiers = chord[2] || \"\";\n var comment = chord[3] || \"\";\n if (comment)\n modifiers += comment.substr(1, comment.length-2);\n var over = chord[4] || \"\";\n if (over[0] === '/')\n over = over.substr(1);\n var alternate = chord[5] || null;\n if (alternate) {\n chord = Song.chordRegex.exec(alternate.substr(1, alternate.length-2));\n if (!chord)\n alternate = null;\n else\n alternate = this.parseChord(chord);\n }\n // empty cell?\n if (note === \" \" && !alternate && !over)\n return null;\n if (over) {\n var offset = (over[1] === '#' || over[1] === 'b') ? 2 : 1;\n over = new Chord(over.substr(0, offset), over.substr(offset), null, null);\n }\n else\n over = null;\n return new Chord(note, modifiers, over, alternate);\n }\n\n newCell(cells) {\n var obj = new Cell;\n cells.push(obj);\n return obj;\n }\n}\n\n// Unscrambling hints from https://github.com/ironss/accompaniser/blob/master/irealb_parser.lua\n// Strings are broken up in 50 character segments. each segment undergoes character substitution addressed by obfusc50()\n// Note that a final part of length 50 or 51 is not scrambled.\n// Finally need to substitute for Kcl, LZ and XyQ.\nfunction unscramble(s) {\n let r = '', p;\n\n while (s.length > 51){\n p = s.substring(0, 50);\n s = s.substring(50);\n r = r + obfusc50(p);\n }\n r = r + s;\n // now undo substitution obfuscation\n r = r.replace(/Kcl/g, '| x').replace(/LZ/g, ' |').replace(/XyQ/g, ' ');\n return r;\n}\n\nfunction obfusc50(s) {\n // the first 5 characters are switched with the last 5\n const newString = s.split('');\n for (let i = 0; i < 5; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n // characters 10-24 are also switched\n for (let i = 10; i < 24; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n return newString.join('');\n}\n", "import jstoxml from 'jstoxml';\nimport ChordSymbol from 'chord-symbol';\nconst { chordParserFactory, chordRendererFactory } = ChordSymbol;\nimport { Version } from './version.js';\n\nexport class LogLevel {\n static Debug = 0;\n static Info = 1;\n static Warn = 2;\n static Error = 3;\n static None = 4;\n}\n\nconst MUSICXML_VERSION = '4.0';\nconst SCALING_MM = 7;\nconst SCALING_TENTHS = 40;\n\nexport class Converter {\n static defaultOptions = {\n 'divisions': 768, // same as used by iReal\n 'notation': 'rhythmic', // 'rhythmic' for rhythmic notation, 'slash' for slash notation\n 'step': 'B', // chord note\n 'octave': 4, // chord note octave\n 'notehead': 'slash', // chord note head\n 'noteheadSize': 'large', // size of chord note head\n 'date': true, // include encoding date\n 'clef': false, // hide clef by default\n 'keySignature': false, // hide key signature by default\n 'pageWidth': 210, // mm (A4)\n 'pageHeight': 297, // mm (A4)\n 'pageMargin': 15, // mm\n 'logLevel': LogLevel.Warn\n };\n\n static sequenceAttributes = [\n // Expected order of attribute elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/\n 'divisions',\n 'key',\n 'time',\n 'staves',\n 'part-symbol',\n 'instruments',\n 'clef',\n 'staff-details',\n 'transpose',\n 'directive',\n 'measure-style'\n ];\n\n static sequenceNote = [\n // Expected order of note elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/note/\n 'cue',\n 'pitch',\n 'rest',\n 'unpitched',\n 'duration',\n 'tie',\n 'voice',\n 'type',\n 'dot',\n 'accidental',\n 'time-modification',\n 'stem',\n 'notehead',\n 'notehead-text',\n 'staff',\n 'beam',\n 'notations',\n 'lyric',\n 'play'\n ];\n\n static sequenceNotations = [\n // Expected order of notations elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/notations/\n 'accidental-mark',\n 'arpeggiate',\n 'articulations',\n 'dynamics',\n 'fermata',\n 'glissando',\n 'non-arpeggiate',\n 'ornaments',\n 'other-notation',\n 'slide',\n 'slur',\n 'technical',\n 'tied',\n 'tuplet'\n ];\n\n static sequenceBarline = [\n // Expected order of barline elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/\n 'bar-style',\n 'footnote',\n 'level',\n 'wavy-line',\n 'segno',\n 'coda',\n 'fermata',\n 'ending',\n 'repeat'\n ];\n\n static mapAlter = {\n '#': 1,\n 'b': -1\n };\n\n static mapFifthsToAlters = {\n 'sharp': ['F', 'C', 'G', 'D', 'A', 'E', 'B'],\n 'flat': ['B', 'E', 'A', 'D', 'G', 'C', 'F']\n };\n\n static mapRepeats = {\n \"D.C. al Coda\": Converter.prototype.convertDaCapo,\n \"D.C. al Fine\": Converter.prototype.convertDaCapo,\n \"D.C. al 1st End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 2nd End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 3rd End.\": Converter.prototype.convertDaCapo,\n \"D.S. al Coda\": Converter.prototype.convertDalSegno,\n \"D.S. al Fine\": Converter.prototype.convertDalSegno,\n \"D.S. al 1st End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 2nd End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 3rd End.\": Converter.prototype.convertDalSegno,\n \"Fine\": Converter.prototype.convertFine,\n \"3x\": Converter.prototype.convertRepeatNx,\n \"4x\": Converter.prototype.convertRepeatNx,\n \"5x\": Converter.prototype.convertRepeatNx,\n \"6x\": Converter.prototype.convertRepeatNx,\n \"7x\": Converter.prototype.convertRepeatNx,\n \"8x\": Converter.prototype.convertRepeatNx\n };\n\n static convert(song, options = {}) {\n const realOptions = Object.assign({}, this.defaultOptions, options);\n return new Converter(song, realOptions).convert();\n }\n\n constructor(song, options) {\n this.song = song;\n this.options = options;\n this.time = { beats: 4, beatType: 4 };\n this.fifths = null; // key signature's degree of fifths\n this.measure = null; // current measure (of class Measure) being built\n this.barRepeat = 0; // current bar number for single- and double-bar repeats\n this.codas = []; // list of measures containing codas\n this.repeats = 0; // repeat count for closing repeat barline\n this.emptyCells = 0; // consecutive empty cells\n this.emptyCellNewSystem = false; // did a new system occur in an empty cell?\n\n // In iRP, there are 16 cells per line.\n // The width in mm of a single cell depends on the page width and the margins.\n this.cellWidth = (this.options.pageWidth - (2 * this.options.pageMargin)) / 16;\n\n // chord-symbol.\n this.parseChord = chordParserFactory({ \"altIntervals\": [\n \"b5\",\n \"b9\"\n ]});\n this.renderChord = chordRendererFactory({\n useShortNamings: true,\n printer: 'raw'\n });\n }\n\n convert() {\n return jstoxml.toXML(this.convertSong(), {\n header: `\n\n\n `.trim(),\n indent: ' '\n });\n }\n\n convertSong() {\n return {\n _name: 'score-partwise',\n _attrs: { 'version': MUSICXML_VERSION },\n _content: [{\n 'work': {\n 'work-title': this.song.title\n }\n }, {\n 'identification': [{\n _name: 'creator',\n _attrs: { 'type': 'composer' },\n _content: this.song.composer\n }, {\n 'encoding': [{\n 'software': `@infojunkie/ireal-musicxml ${Version.version}`\n }, { ...(this.options.date && {\n 'encoding-date': Converter.convertDate(new Date())\n })}, {\n _name: 'supports',\n _attrs: { 'element': 'accidental', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'element': 'transpose', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-page', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-system', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }]\n }]\n }, {\n 'defaults': {\n 'scaling': {\n 'millimeters': SCALING_MM,\n 'tenths': SCALING_TENTHS\n },\n 'page-layout': {\n 'page-height': Converter._mmToTenths(this.options.pageHeight),\n 'page-width': Converter._mmToTenths(this.options.pageWidth),\n 'page-margins': {\n 'left-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'right-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'top-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'bottom-margin': Converter._mmToTenths(this.options.pageMargin, 4)\n }\n }\n }\n }, {\n 'part-list': {\n _name: 'score-part',\n _attrs: { 'id': 'P1' },\n _content: {\n _name: 'part-name',\n _attrs: { 'print-object': 'no' },\n _content: 'Lead Sheet'\n }\n }\n }, {\n _name: 'part',\n _attrs: { 'id': 'P1' },\n _content: this.convertMeasures()\n }]\n };\n }\n\n // Date in yyyy-mm-dd\n // https://stackoverflow.com/a/50130338/209184\n static convertDate(date) {\n return new Date(date.getTime() - (date.getTimezoneOffset() * 60000))\n .toISOString()\n .split('T')[0];\n }\n\n static Measure = class {\n constructor(number) {\n this.body = {\n _name: 'measure',\n _attrs: { 'number': number },\n _content: []\n };\n this.attributes = [];\n this.chords = [];\n this.barlines = [];\n this.barEnding = null;\n }\n\n number() {\n return this.body['_attrs']['number'];\n }\n\n assemble() {\n // Attributes.\n if (this.attributes.length) {\n this.body['_content'].push({\n 'attributes': Converter.reorderSequence(this, this.attributes, Converter.sequenceAttributes)\n });\n }\n\n // Chords.\n this.chords.forEach(chord => {\n this.body['_content'].push({\n 'harmony': chord.harmony\n }, ...chord.notes.map(note => {\n return {\n 'note': note\n };\n }));\n });\n\n // Barlines.\n this.barlines[0]['_content'] = Converter.reorderSequence(this, this.barlines[0]['_content'], Converter.sequenceBarline);\n this.body['_content'].splice(1, 0, this.barlines[0]);\n this.barlines[1]['_content'] = Converter.reorderSequence(this, this.barlines[1]['_content'], Converter.sequenceBarline);\n this.body['_content'].push(this.barlines[1]);\n\n return this.body;\n }\n };\n\n static Chord = class {\n constructor(harmony, notes, ireal) {\n this.harmony = harmony;\n this.notes = notes;\n this.ireal = ireal;\n this.spaces = 0;\n this.fermata = false;\n }\n };\n\n convertMeasures() {\n // Are we starting a new system given the current cell index?\n const isNewSystem = cellIndex => cellIndex > 0 && cellIndex % 16 === 0;\n\n // Loop on cells.\n const measures = this.song.cells.reduce((measures, cell, cellIndex) => {\n // Start a new measure if needed.\n // This means either finding an opening barline or finding non-empty cells while we're not in any measure.\n if (cell.bars.match(/\\(|\\{|\\[/) || (!this.measure && (cell.chord || cell.annots.length || cell.comments.length))) {\n if (this.measure) {\n this._log(LogLevel.Warn, `Starting a new measure over existing measure. Closing current measure first.`);\n this.measure.barlines.push(this.convertBarline('', 'right'));\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n }\n this.measure = new Converter.Measure(measures.length+1, this.options);\n\n // Very first bar: add defaults.\n if (!measures.length) {\n this.measure.attributes.push({\n 'divisions': this.options.divisions\n }, {\n _name: 'clef',\n _attrs: [{ 'print-object': this.options.clef ? 'yes' : 'no' }],\n _content: [{\n 'sign': 'G'\n }, {\n 'line': 2\n }]\n }, {\n 'staff-details': {\n 'staff-lines': 0\n }\n }, {\n 'measure-style': [{\n _name: 'slash',\n _attrs: { 'type': 'start', 'use-stems': this.options.notation === 'rhythmic' ? 'yes' : 'no' }\n }]\n }, this.convertKey());\n\n // Add bpm if any.\n if (this.song.bpm) {\n this.measure.body['_content'].push(this.convertTempo(this.song.bpm));\n }\n\n // Add style and groove.\n this.measure.body['_content'].push(this.convertStyleAndGroove(this.song.style, this.song.groove));\n }\n\n // Add starting barline.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'left'));\n\n // If we're still repeating bars, copy the previous bar now.\n if (this.barRepeat) {\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat-1].chords];\n }\n }\n\n // Short-circuit loop if no measure exists.\n // It can happen that `measure` is still blank in case of empty cells in iReal layout.\n // e.g. Girl From Ipanema in tests.\n if (!this.measure) {\n if (cell.chord || cell.annots.length || cell.comments.length || (cell.bars && cell.bars !== ')')) {\n this._log(LogLevel.Warn, `Found non-empty orphan cell ${JSON.stringify(cell)}`, measures[measures.length-1]);\n }\n\n // This is an empty cell between measures.\n // Count the consecutive empty cells because they will be converted to margins.\n // Also remember that a new system has occurred.\n this.emptyCells++;\n if (isNewSystem(cellIndex)) {\n this.emptyCellNewSystem = true;\n }\n\n return measures;\n }\n\n // Start a new system every 16 cells.\n if (isNewSystem(cellIndex) || this.emptyCellNewSystem) {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _attrs: { 'new-system': 'yes' },\n _content: { ...(this.emptyCellNewSystem && {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }, {\n 'right-margin': '0.00'\n }]\n }\n })}\n });\n }\n\n // If we accumulated empty cells but not at the start of the current system, then we adjust other distances.\n // There are 2 cases to handle:\n // - We're now in a fresh system: Add a right-margin to the previous measure.\n // - We're in the middle of a system: Add a measure-distance to the current measure.\n if (!this.emptyCellNewSystem && this.emptyCells > 0) {\n if (this.measure.body['_content'][0]?.['_name'] === 'print' && this.measure.body['_content'][0]['_attrs']?.['new-system'] === 'yes') {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }]\n }\n }\n });\n }\n else {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'measure-layout': {\n 'measure-distance': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }\n }\n });\n }\n }\n\n // Reset the empty cells.\n this.emptyCellNewSystem = false;\n this.emptyCells = 0;\n\n // Chords.\n if (cell.chord) {\n switch (cell.chord.note) {\n case 'x': {\n // Handle single bar repeat.\n this.barRepeat = 1;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'r': {\n // Handle double bar repeat.\n // We do this in 2 stages, because a blank measure occurs after 'r' (to keep the measure count correct)\n // Here, we copy the next-to-last measure and set the repeat flag.\n // The next opening measure will pick up the remaining measure.\n this.barRepeat = 2;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'p':\n // If slash does not occur as first chord, count it as a space.\n // Otherwise, handle it as 'W'.\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n break;\n }\n // Fall into case 'W'.\n\n case 'W': {\n // Handle invisible root by copying previous chord.\n let target = this.measure;\n if (!target.chords.length) {\n target = measures.slice().reverse().find(m => m.chords.length);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find any measure with chords prior to ${JSON.stringify(cell.chord)}`);\n }\n }\n if (target) {\n const chord = target.chords[target.chords.length-1].ireal;\n chord.over = cell.chord.over;\n chord.alternate = cell.chord.alternate;\n this.measure.chords.push(this.convertChord(chord));\n }\n break;\n }\n case ' ': {\n // TODO Handle alternate chord only.\n this._log(LogLevel.Warn, `Unhandled empty/alternate chord ${JSON.stringify(cell.chord)}`);\n break;\n }\n default: {\n // Process new chord.\n this.measure.chords.push(this.convertChord(cell.chord));\n }\n }\n }\n else if (!this.barRepeat) {\n // There are 16 cells per row, regardless of time signature.\n // Barlines can occur anywhere and the iReal Pro player uses an unknown algorithm\n // to schedule the chords within a measure, using the empty cells as \"hints\" for scheduling.\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=chord-spacing-in-the-editor\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=how-do-i-fit-more-than-48-measures-into-one-chart\n //\n // Our approach to emulate the iReal Pro player is as follows:\n // 1. Whenever we find an empty cell, attach it to the previous chord (or discard it if there's no previous chord)\n // 2. At the end of the measure, adjust the chord durations based on existing empty cells across the measure\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n }\n }\n\n // Other attributes.\n cell.annots.forEach(annot => {\n switch(annot[0]) {\n case '*': { // section\n const section = annot.slice(1);\n this.measure.body['_content'].push(this.convertSection(section));\n break;\n }\n case 'T': { // time\n const time = annot.slice(1);\n this.measure.attributes.push(this.convertTime(time));\n break;\n }\n case 'S': { // segno\n this.measure.body['_content'].push(this.convertSegno());\n break;\n }\n case 'N': { // ending\n // TODO This assumes a single ending at a time.\n let ending = parseInt(annot.slice(1));\n if (ending < 1) {\n // It can happen that the ending number comes as 0 from iRP.\n // In this case, we do a best effort of finding the previous ending and incrementing it.\n const target = measures.slice().reverse().find(m => !!m.barEnding);\n ending = target?.barEnding ?? 0 + 1;\n }\n this.measure.barlines[0]['_content'].push(this.convertEnding(ending, 'start'));\n // End the previous ending at the previous measure's right barline.\n // Also, remove the 'discontinue' ending from its starting measure since we found an end to it.\n if (ending > 1) {\n measures[measures.length-1].barlines[1]['_content'].push(this.convertEnding(ending-1, 'stop'));\n const target = measures.slice().reverse().find(m => m.barEnding === ending-1);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline of any measure`);\n }\n else {\n // The last result is the good one: remove the 'discontinue' ending.\n const index = target.barlines[1]['_content'].findIndex(b => !!b && b['_name'] === 'ending');\n if (index === -1) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline`, target);\n }\n delete target.barlines[1]['_content'][index];\n }\n }\n // We will add a 'discontinue' ending at this measure's right barline.\n this.measure.barEnding = ending;\n break;\n }\n case 'Q': { // coda\n // We add all codas as \"tocoda\" because we expect the last one to be the actual coda.\n // After all measures have been built, adjust the last coda.\n // https://irealpro.com/how-the-coda-symbol-works-in-ireal-pro/\n this.measure.body['_content'].push(this.convertToCoda());\n this.codas.push(this.measure);\n break;\n }\n\n // Ignore small and large chord renderings.\n case 'l':\n case 's': break;\n\n case 'f': { // Fermata\n this.measure.chords[this.measure.chords.length-1].fermata = true;\n break;\n }\n\n case 'U': { // END, treated as Fine.\n this.measure.body['_content'].push(this.convertFine('END'));\n break;\n }\n\n default: this._log(LogLevel.Warn, `Unhandled annotation \"${annot}\"`);\n }\n });\n\n // Comments and repeats.\n // TODO Handle measure offset.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/offset/\n cell.comments.map(c => c.trim()).forEach(comment => {\n const repeatFn = this._map(Converter.mapRepeats, comment);\n if (repeatFn) {\n this.measure.body['_content'].push(repeatFn.call(this, comment));\n } else {\n this.measure.body['_content'].push(this.convertComment(comment));\n }\n });\n\n // Close and insert the measure if needed.\n // Ignore measures without any chords, they're probably empty spaces.\n if (cell.bars.match(/\\)|\\}|\\]|Z/) && this.measure.chords.length) {\n // Add closing barline and ending if needed.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'right'));\n if (this.measure.barEnding) {\n // In case of numbered repeats, end measure an open repeat by default \u250C\u2500\u2500\u2500\u2500\u2500\u2500\n // \u2502 2.\n // It may be replaced later by a closing repeat \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 2. \u2502\n this.measure.barlines[1]['_content'].push(this.convertEnding(this.measure.barEnding, 'discontinue'));\n }\n\n // Close out the measure.\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n this.measure = null;\n if (this.barRepeat) this.barRepeat--;\n }\n\n return measures;\n }, []);\n\n // Adjust final right margin if needed.\n const remainingCells = this.song.cells.length % 16 - this.emptyCells;\n if (remainingCells > 0 && measures.length > 0) {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * remainingCells)\n }]\n }\n }\n });\n }\n\n // Adjust last coda if any.\n if (this.codas.length) {\n const target = this.codas[this.codas.length-1];\n const direction = target.body['_content'].findIndex(d =>\n d['_name'] === 'direction' &&\n Array.isArray(d['_content']) &&\n d['_content'].some(s =>\n s['_name'] === 'sound' &&\n Object.keys(s['_attrs']).includes('tocoda')\n )\n );\n if (direction === -1) {\n this._log(LogLevel.Warn, `Cannot find sound direction`, target);\n }\n target.body['_content'][direction] = this.convertCoda();\n }\n\n // `Measure.assemble()` puts all the parts in `Measure.body`.\n return measures.map(measure => measure.assemble());\n }\n\n // Fix order of elements according to sequence as specified by an xs:sequence.\n // @param {array} elements - Array of elements to sort.\n // @param {array} sequence - Array of element names in order of xs:sequence.\n // @return {array} Ordered array of elements.\n static reorderSequence(measure, elements, sequence) {\n return elements.filter(a => Object.keys(a).length).sort((a1, a2) => {\n let k1 = Object.keys(a1)[0]; if (k1 === '_name') k1 = a1[k1];\n let k2 = Object.keys(a2)[0]; if (k2 === '_name') k2 = a2[k2];\n // TODO indexOf() needs to search every time. Make it faster with memoize?\n const i1 = sequence.indexOf(k1);\n const i2 = sequence.indexOf(k2);\n if (i1 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k1}\"`, measure);\n }\n if (i2 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k2}\"`, measure);\n }\n return i1 - i2;\n });\n }\n\n convertRepeatNx(comment) {\n let repeats = null;\n if (null !== (repeats = comment.match(/(\\d+)x/))) {\n this.repeats = repeats[1];\n }\n }\n\n convertFine(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'fine': 'yes' }\n }]\n };\n }\n\n convertDaCapo(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dacapo': 'yes' }\n }]\n };\n }\n\n convertDalSegno(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dalsegno': 'yes' }\n }]\n };\n }\n\n convertComment(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': comment[0] === '*' ? 'above' : 'below' },\n _content: {\n 'direction-type': {\n 'words': comment[0] === '*' ? comment.slice(3) : comment\n }\n }\n };\n }\n\n convertEnding(ending, type) {\n // TODO This assumes a single ending.\n return {\n _name: 'ending',\n _attrs: { 'number': ending, 'type': type },\n _content: `${ending}.`\n };\n }\n\n convertBarline(bars, location) {\n let style = 'regular';\n let repeat = null;\n if (bars.match(/\\[|\\]/)) {\n style = 'light-light';\n }\n else if (bars.match(/Z/)) {\n style = 'light-heavy';\n }\n else if (bars.match(/\\{|\\}/)) {\n style = location === 'left' ? 'heavy-light' : 'light-heavy';\n repeat = location === 'left' ? 'forward' : 'backward';\n }\n\n // Set the current repeat count to 2, which may be changed later if we find a repeat annotation.\n if (repeat === 'forward') {\n this.repeats = 2;\n }\n\n return {\n _name: 'barline',\n _attrs: { 'location': location },\n _content: [{\n 'bar-style': style\n }, { ...(repeat && {\n _name: 'repeat',\n _attrs: { 'direction': repeat, ...(repeat === 'backward' && { 'times': this.repeats }) }\n })}]\n };\n }\n\n convertSection(section) {\n if (section === 'i') section = 'Intro';\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: {\n 'direction-type': {\n 'rehearsal': section\n }\n }\n };\n }\n\n convertSegno() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n _name: 'segno'\n }\n }, {\n _name: 'sound',\n _attrs: { 'segno': 'segno' }\n }]\n };\n }\n\n convertCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n '_name': 'coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'coda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertToCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n 'words': 'To Coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'tocoda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertTempo(bpm) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n _name: 'metronome',\n _attrs: { 'parentheses': 'no' },\n _content: [{\n 'beat-unit': this.calculateChordDuration(1)[0].type\n }, {\n 'per-minute': bpm\n }]\n }]\n }, {\n _name: 'sound',\n _attrs: { 'tempo': bpm }\n }]\n };\n }\n\n convertTime(time) {\n let beats = parseInt(time[0]);\n let beatType = parseInt(time[1]);\n if (time === '12') {\n beats = 12;\n beatType = 8;\n }\n this.time = { beats, beatType };\n return {\n 'time': [{\n 'beats': beats\n }, {\n 'beat-type': beatType\n }]\n };\n }\n\n adjustChordsDuration(measure) {\n // Now that the measure is closed, we can adjust the chord durations, taking empty cells into consideration.\n // https://www.irealb.com/forums/showthread.php?25161-Using-empty-cells-to-control-chord-duration\n //\n // Rules:\n // - Minimum chord duration is 1 beat\n // => Each chord starts as 1 beat\n // => Count of chords <= beats per measure\n // - Starting empty cells are discarded (already discarded during the cell loop)\n // - Each remaining empty cell counts as 1 beat (already counted during cell loop)\n // - Empty cell beats are added to their preceding chords (already added during the cell loop)\n // => Total chord durations <= beats per measure\n // - Remaining beats are distributed evenly among chords from first to last\n //\n if (measure.chords.length > this.time.beats) {\n this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure);\n return true;\n }\n let beats = measure.chords.reduce((beats, chord) => beats+1+chord.spaces, 0);\n if (!beats) {\n this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure);\n return false;\n }\n if (beats > this.time.beats) {\n // Reduce spaces.\n // We're guaranteed to end this loop because measure.chords.length <= this.time.beats\n let chordIndex = 0;\n while (beats > this.time.beats) {\n if (measure.chords[chordIndex].spaces > 0) {\n measure.chords[chordIndex].spaces--;\n beats--;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n else {\n // Distribute free beats among the chords.\n let chordIndex = 0;\n while (beats < this.time.beats) {\n measure.chords[chordIndex].spaces++;\n beats++;\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n\n // Adjust actual chord durations.\n measure.chords = measure.chords.map(chord => {\n chord.notes = this.calculateChordDuration(1+chord.spaces).map((duration, i, ds) =>\n this.convertChordNote(\n duration,\n i === ds.length - 1 ? chord.fermata : false, // Possible fermata on last chord note only\n this.options.notation === 'rhythmic' && ds.length > 1 ? (i > 0 ? 'stop' : 'start') : null // Possible tie in case of rhythmic notation\n )\n );\n return chord;\n });\n\n return true;\n }\n\n calculateChordDuration(beats) {\n // Lowest beat resolution is eighth-note (8).\n const mapDuration = {\n '1': [{ t: 'eighth', d: 0, b: 1 }],\n '2': [{ t: 'quarter', d: 0, b: 2 }],\n '3': [{ t: 'quarter', d: 1, b: 3 }],\n '4': [{ t: 'half', d: 0, b: 4 }],\n '5': [{ t: 'quarter', d: 1, b: 3 }, { t: 'quarter', d: 0, b: 2 }],\n '6': [{ t: 'half', d: 1, b: 6 }],\n '7': [{ t: 'half', d: 2, b: 7 }],\n '8': [{ t: 'whole', d: 0, b: 8 }],\n '9': [{ t: 'half', d: 1, b: 6 }, { t: 'quarter', d: 1, b: 3 }],\n '10': [{ t: 'half', d: 1, b: 6 }, { t: 'half', d: 0, b: 4 }],\n '11': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 0, b: 4 }],\n '12': [{ t: 'whole', d: 1, b: 12 }],\n '13': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 1, b: 6 }],\n '14': [{ t: 'whole', d: 2, b: 14 }],\n '15': [{ t: 'whole', d: 0, b: 8 }, { t: 'half', d: 2, b: 7 }],\n };\n\n if (this.options.notation === 'slash') {\n // In case of slash notation, return an array of n=beats elements, each with a duration of 1 beat.\n const index = 1 * 8 / this.time.beatType;\n return Array(beats).fill(this\n ._map(mapDuration, index, [], `Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n })[0] // We're sure to get only one entry in this case.\n );\n }\n else {\n // In case of rhythmic notation, return a single note (or 2 tied notes) corresponding to the desired beat count.\n const index = beats * 8 / this.time.beatType;\n return this\n ._map(mapDuration, index, [], `Unexpected beat count ${beats} for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n });\n }\n }\n\n convertChordNote(duration, fermata = false, tie = null) {\n const altered = Converter.mapFifthsToAlters[this.fifths >= 0 ? 'sharp' : 'flat'].slice(0, Math.abs(this.fifths));\n const noteType = {\n _name: 'pitch',\n _content: [{\n 'step': this.options.step\n }, {\n 'alter': altered.includes(this.options.step) ? (this.fifths > 0 ? 1 : -1) : 0\n }, {\n 'octave': this.options.octave\n }]\n };\n\n const notations = [];\n if (fermata) {\n notations.push({ _name: 'fermata' });\n }\n if (tie) {\n notations.push({ _name: 'tied', _attrs: { 'type': tie } });\n }\n\n return Converter.reorderSequence(this.measure, [noteType, {\n _name: 'cue'\n }, {\n _name: 'notehead',\n _content: this.options.notehead,\n _attrs: [{ 'font-size': this.options.noteheadSize }]\n }, {\n 'duration': duration.duration\n }, {\n 'voice': 1,\n }, {\n _name: 'type',\n _attrs: { 'size': 'full' },\n _content: duration.type\n }, { ...(notations.length && {\n 'notations': Converter.reorderSequence(this.measure, notations, Converter.sequenceNotations)\n })}]\n .concat(Array(duration.dots).fill({ _name: 'dot' })), Converter.sequenceNote);\n }\n\n convertChordDegree(value, type, alter) {\n return {\n _name: 'degree',\n _attrs: { 'print-object': 'no' },\n _content: [{\n 'degree-value': value\n }, {\n 'degree-alter': alter\n }, {\n 'degree-type': type\n }]\n };\n }\n\n convertChordSymbol(chord) {\n const parsedChord = this.renderChord(this.parseChord(`${chord.note}${chord.modifiers}`));\n if (!parsedChord) {\n this._log(LogLevel.Warn, `Unrecognized chord \"${chord.note}${chord.modifiers}\"`);\n return { rootStep: null, rootAlter: null, chordKind: null, chordDegrees: [], chordText: null };\n }\n\n const rootStep = parsedChord.input.rootNote[0];\n const rootAlter = this._map(Converter.mapAlter, parsedChord.input.rootNote[1] || null, null, `Unrecognized accidental in chord \"${parsedChord.input.rootNote}\"`);\n const chordText = parsedChord.formatted.descriptor + parsedChord.formatted.chordChanges.join('');\n\n // Find chord quality (aka kind).\n // `chord-symbol` misses a bunch of MusicXML chord qualities so we'll have to derive them ourselves.\n const mapKind = {\n 'major': 'major',\n 'major6': 'major-sixth',\n 'major7': 'major-seventh',\n 'dominant7': 'dominant',\n 'minor': 'minor',\n 'minor6': 'minor-sixth',\n 'minor7': 'minor-seventh',\n 'minorMajor7': 'major-minor',\n 'augmented': 'augmented',\n 'diminished': 'diminished',\n 'diminished7': 'diminished-seventh',\n 'power': 'power'\n };\n let chordKind = this._map(mapKind, parsedChord.normalized.quality, '', `Unrecognized chord quality \"${parsedChord.normalized.quality}\"`);\n\n // Convert extensions to their equivalent MusicXML kind.\n // Find the highest extension, then replace the word following [major, minor, dominant] with it.\n if (parsedChord.normalized.extensions.length) {\n const extension = Math.max(...parsedChord.normalized.extensions.map(e => parseInt(e))).toString();\n const mapExtensionKind = {\n '9': '-ninth',\n '11': '-11th',\n '13': '-13th'\n };\n chordKind = chordKind.split('-')[0] + this._map(mapExtensionKind, extension, '', `Unhandled extension ${extension}`);\n\n // chord-symbol considers dominant-11th to be suspended - but that's not _necessarily_ the case.\n // https://en.wikipedia.org/wiki/Eleventh_chord\n if (chordKind === 'dominant-11th') {\n parsedChord.normalized.isSuspended = false;\n }\n }\n\n // Detect other chord kinds by explicit interval comparison.\n [\n { intervals: ['1', '4', '5'], kind: 'suspended-fourth', strict: true },\n { intervals: ['1', '5', '9'], kind: 'suspended-second', strict: true },\n { intervals: ['1', 'b3', 'b5', 'b7'], kind: 'half-diminished', strict: true },\n { intervals: ['1', '3', '#5', 'b7'], kind: 'augmented-seventh', strict: false }\n ].some(chord => {\n if (\n (!chord.strict || parsedChord.normalized.intervals.length === chord.intervals.length) &&\n chord.intervals.every((s, i) => s === parsedChord.normalized.intervals[i])\n ) {\n chordKind = chord.kind;\n\n // Remove the intervals from the parsedChord to avoid duplication below.\n chord.intervals.forEach(i => {\n parsedChord.normalized.alterations = parsedChord.normalized.alterations.filter(p => p === i);\n parsedChord.normalized.adds = parsedChord.normalized.adds.filter(p => p === i);\n parsedChord.normalized.omits = parsedChord.normalized.omits.filter(p => p === i);\n });\n\n // Add the missing intervals from the parsedChord to the adds.\n parsedChord.normalized.intervals.forEach(i => {\n if (!chord.intervals.includes(i)) {\n parsedChord.normalized.adds.push(i);\n }\n });\n\n // Stop looping.\n return true;\n }\n });\n\n // Handle suspended chords other than triads.\n const chordDegrees = [];\n if (parsedChord.normalized.isSuspended && !chordKind.includes('suspended')) {\n parsedChord.normalized.adds.push('4');\n // Handle case of sus(add3)\n if (!parsedChord.normalized.adds.includes('3')) {\n parsedChord.normalized.omits.push('3');\n }\n }\n\n // Add chord degrees.\n parsedChord.normalized.alterations.forEach(alteration => {\n const degree = alteration.slice(1);\n chordDegrees.push(\n this.convertChordDegree(\n degree,\n (degree === '5' || parsedChord.normalized.extensions.includes(degree)) ? 'alter' : 'add',\n this._map(Converter.mapAlter, alteration[0], 0, `Unrecognized alter symbol in \"${alteration}\"`)\n )\n );\n });\n parsedChord.normalized.adds.forEach(add => {\n const alteration = Object.keys(Converter.mapAlter).includes(add[0]) ? add[0] : null;\n const degree = alteration ? add.slice(1) : add;\n chordDegrees.push(\n this.convertChordDegree(degree, 'add', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${add}\"`))\n );\n });\n parsedChord.normalized.omits.forEach(omit => {\n const alteration = Object.keys(Converter.mapAlter).includes(omit[0]) ? omit[0] : null;\n const degree = alteration ? omit.slice(1) : omit;\n chordDegrees.push(\n this.convertChordDegree(degree, 'subtract', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${omit}\"`))\n );\n });\n\n return { rootStep, rootAlter, chordKind, chordDegrees, chordText };\n }\n\n convertChord(chord) {\n let harmony = null;\n\n // Special case: 'n' for no chord\n if (chord.note === 'n') {\n harmony = [{\n 'root': [{\n _name: 'root-step',\n _attrs: { 'text': '' },\n _content: this.options.step\n }],\n }, {\n _name: 'kind',\n _attrs: { 'text': 'N.C.' },\n _content: 'none',\n }];\n }\n else {\n const { rootStep, rootAlter, chordKind, chordDegrees, chordText } = this.convertChordSymbol(chord);\n\n // Handle bass note\n const bass = !chord.over ? null : [{\n 'bass-step': chord.over.note[0]\n }, { ...(chord.over.note[1] && {\n 'bass-alter': this._map(Converter.mapAlter, chord.over.note[1], null, `Unrecognized accidental in bass note \"${chord.over.note}\"`)\n })}];\n\n harmony = [{\n 'root': [{\n 'root-step': rootStep\n }, { ...(rootAlter && { // Don't generate the root-alter entry if rootAlter is blank\n 'root-alter': rootAlter\n })}],\n }, {\n _name: 'kind',\n _attrs: { 'text': chordText, 'use-symbols': 'no' },\n _content: chordKind,\n }, { ...(bass && {\n 'bass': bass\n })}].concat(chordDegrees);\n }\n\n // TODO Handle alternate chord\n if (chord.alternate) {\n this._log(LogLevel.Warn, `Unhandled alternate chord ${JSON.stringify(chord.alternate)}`);\n }\n\n return new Converter.Chord(\n harmony,\n // Initial chord duration is 1 beat\n this.calculateChordDuration(1).map(duration => this.convertChordNote(duration)),\n chord\n );\n }\n\n convertKey() {\n const mapKeys = {\n // Major keys\n 'C': 0, 'G': 1, 'D': 2, 'A': 3, 'E': 4, 'B': 5, 'F#': 6, 'C#': 7,\n 'F': -1, 'Bb': -2, 'Eb': -3, 'Ab': -4, 'Db': -5, 'Gb': -6, 'Cb': -7,\n // Minor keys\n 'A-': 0, 'E-': 1, 'B-': 2, 'F#-': 3, 'C#-': 4, 'G#-': 5, 'D#-': 6, 'A#-': 7,\n 'D-': -1, 'G-': -2, 'C-': -3, 'F-': -4, 'Bb-': -5, 'Eb-': -6, 'Ab-': -7\n };\n\n // Remember the fifth.\n this.fifths = this._map(mapKeys, this.song.key, 0, `Unrecognized key signature \"${this.song.key}\"`);\n\n return {\n _name: 'key',\n _attrs: [{ 'print-object': this.options.keySignature ? 'yes' : 'no' }],\n _content: [{\n 'fifths': this.fifths\n }, {\n 'mode': this.song.key.slice(-1) === '-' ? 'minor' : 'major'\n }]\n };\n }\n\n convertStyleAndGroove(style, groove) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n 'words': style\n }]\n }, {\n 'sound': [{\n 'play': [{\n _name: 'other-play',\n _attrs: { 'type': 'groove' },\n _content: groove || style\n }]\n }]\n }]\n };\n }\n\n _log(logLevel, message, measure = this.measure) {\n if (logLevel < this.options.logLevel) return;\n const log = `[ireal-musicxml] [${this.song.title}${measure ? '#' + measure.number() : ''}] ${message}`;\n let method = 'warn';\n switch (logLevel) {\n case LogLevel.Debug: method = 'debug'; break;\n case LogLevel.Info: method = 'info'; break;\n case LogLevel.Warn: method = 'warn'; break;\n case LogLevel.Error: method = 'error'; break;\n }\n console[method](log);\n }\n\n _map(map, key, defaultValue, message, logLevel = LogLevel.Warn, measure = this.measure) {\n if (!key) return defaultValue;\n if (!(key in map)) {\n if (message) {\n this._log(logLevel, message, measure);\n }\n return defaultValue || null;\n }\n return map[key];\n }\n\n static _mmToTenths(mm, decimals = 2) {\n const value = mm * SCALING_TENTHS / SCALING_MM;\n const power = Math.pow(10, decimals);\n return Math.round(value * power) / power;\n }\n}\n", "{\n \"name\": \"ireal-musicxml\",\n \"version\": \"2.0.0\",\n \"description\": \"iReal Pro to MusicXML converter.\",\n \"author\": \"Karim Ratib (https://github.com/infojunkie)\",\n \"license\": \"GPL-3.0-only\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/infojunkie/ireal-musicxml\"\n },\n \"homepage\": \"https://github.com/infojunkie/ireal-musicxml\",\n \"type\": \"module\",\n \"types\": \"./src/types/ireal-musicxml.d.ts\",\n \"files\": [\n \"LICENSE.txt\",\n \"build/*\",\n \"src/*\"\n ],\n \"bin\": {\n \"ireal-musicxml\": \"./src/cli/cli.js\"\n },\n \"exports\": {\n \"import\": \"./build/ireal-musicxml.js\",\n \"require\": \"./build/ireal-musicxml.cjs\"\n },\n \"scripts\": {\n \"build\": \"npm run build:esm && npm run build:cjs\",\n \"build:esm\": \"esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js\",\n \"build:cjs\": \"esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs\",\n \"test\": \"npm run test:lint && npm run test:spec && npm run test:ts\",\n \"test:spec\": \"node --test --test-name-pattern=\\\"${TEST:-.*}\\\"\",\n \"test:ts\": \"npm run build && node --test --loader=ts-node/esm --require ts-node/register test/*.spec.ts\",\n \"test:lint\": \"eslint src --fix\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.7.7\",\n \"@xmldom/xmldom\": \"^0.8.0\",\n \"esbuild\": \"0.24.0\",\n \"eslint\": \"^9.13.0\",\n \"resolve\": \"^1.22.8\",\n \"sanitize-filename\": \"^1.6.3\",\n \"ts-node\": \"^10.9.2\",\n \"typescript\": \"^4.9.5\",\n \"validate-with-xmllint\": \"^1.2.0\",\n \"xpath.js\": \"^1.1.0\"\n },\n \"dependencies\": {\n \"chord-symbol\": \"^3.0.0\",\n \"fast-diff\": \"^1.2.0\",\n \"jstoxml\": \"^2.0.6\",\n \"promise\": \"^8.1.0\"\n }\n}\n", "import pkg from '../../package.json' with { type: 'json' };\n\nexport class Version {\n static name = pkg.name;\n static version = pkg.version;\n static author = pkg.author;\n static description = pkg.description;\n}"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;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,CAAC,GAAG;AAC/C,QAAM,WAAW,IAAI,SAAS,KAAK;AACnC,WAAS,MAAM,QAAQ,UAAQ;AAC7B,SAAK,WAAW,UAAU,QAAQ,MAAM,OAAO;AAAA,EACjD,CAAC;AACD,SAAO;AACT;AAEA,eAAsB,QAAQ,OAAO,UAAU,CAAC,GAAG;AACjD,SAAO,IAAI,eAAAC,QAAQ,aAAW,QAAQ,YAAY,OAAO,OAAO,CAAC,CAAC;AACpE;", + "sourcesContent": ["\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js\u2019s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n", "'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._x = 0;\n this._y = 0;\n this._z = null;\n this._A = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._B = null;\nPromise._C = null;\nPromise._D = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._y === 3) {\n self = self._z;\n }\n if (Promise._B) {\n Promise._B(self);\n }\n if (self._y === 0) {\n if (self._x === 0) {\n self._x = 1;\n self._A = deferred;\n return;\n }\n if (self._x === 1) {\n self._x = 2;\n self._A = [self._A, deferred];\n return;\n }\n self._A.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._y === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._y === 1) {\n resolve(deferred.promise, self._z);\n } else {\n reject(deferred.promise, self._z);\n }\n return;\n }\n var ret = tryCallOne(cb, self._z);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._y = 3;\n self._z = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._y = 1;\n self._z = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._y = 2;\n self._z = newValue;\n if (Promise._C) {\n Promise._C(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._x === 1) {\n handle(self, self._A);\n self._A = null;\n }\n if (self._x === 2) {\n for (var i = 0; i < self._A.length; i++) {\n handle(self, self._A[i]);\n }\n self._A = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n", "'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._D);\n p._y = 1;\n p._z = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._y === 3) {\n val = val._z;\n }\n if (val._y === 1) return res(i, val._z);\n if (val._y === 2) reject(val._z);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nfunction onSettledFulfill(value) {\n return { status: 'fulfilled', value: value };\n}\nfunction onSettledReject(reason) {\n return { status: 'rejected', reason: reason };\n}\nfunction mapAllSettled(item) {\n if(item && (typeof item === 'object' || typeof item === 'function')){\n if(item instanceof Promise && item.then === Promise.prototype.then){\n return item.then(onSettledFulfill, onSettledReject);\n }\n var then = item.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(item)).then(onSettledFulfill, onSettledReject)\n }\n }\n\n return onSettledFulfill(item);\n}\nPromise.allSettled = function (iterable) {\n return Promise.all(iterableToArray(iterable).map(mapAllSettled));\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\nfunction getAggregateError(errors){\n if(typeof AggregateError === 'function'){\n return new AggregateError(errors,'All promises were rejected');\n }\n\n var error = new Error('All promises were rejected');\n\n error.name = 'AggregateError';\n error.errors = errors;\n\n return error;\n}\n\nPromise.any = function promiseAny(values) {\n return new Promise(function(resolve, reject) {\n var promises = iterableToArray(values);\n var hasResolved = false;\n var rejectionReasons = [];\n\n function resolveOnce(value) {\n if (!hasResolved) {\n hasResolved = true;\n resolve(value);\n }\n }\n\n function rejectionCheck(reason) {\n rejectionReasons.push(reason);\n\n if (rejectionReasons.length === promises.length) {\n reject(getAggregateError(rejectionReasons));\n }\n }\n\n if(promises.length === 0){\n reject(getAggregateError(rejectionReasons));\n } else {\n promises.forEach(function(value){\n Promise.resolve(value).then(resolveOnce, rejectionCheck);\n });\n }\n });\n};\n", "\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n", "'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._y === 3) {\n return this._z.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getReason = function () {\n if (this._y === 3) {\n return this._z.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getState = function () {\n if (this._y === 3) {\n return this._z.getState();\n }\n if (this._y === -1 || this._y === -2) {\n return 0;\n }\n\n return this._y;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n", "'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n", "'use strict';\n\nmodule.exports = require('./lib')\n", "/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @param {boolean} [cleanup] Apply semantic cleanup before returning.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n if (cleanup) {\n diff_cleanupSemantic(diffs);\n }\n return diffs;\n}\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)],\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = delta % 2 !== 0;\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (\n x1 < text1_length &&\n y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (\n x2 < text1_length &&\n y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ===\n text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n}\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\nfunction diff_commonOverlap_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: http://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (\n found == 0 ||\n text1.substring(text_length - length) == text2.substring(0, length)\n ) {\n best = length;\n length++;\n }\n }\n}\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = \"\";\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n var prefixLength = diff_commonPrefix(\n longtext.substring(i),\n shorttext.substring(j)\n );\n var suffixLength = diff_commonSuffix(\n longtext.substring(0, i),\n shorttext.substring(0, j)\n );\n if (best_common.length < suffixLength + prefixLength) {\n best_common =\n shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a,\n best_longtext_b,\n best_shorttext_a,\n best_shorttext_b,\n best_common,\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 4)\n );\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 2)\n );\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemantic(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastequality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) {\n // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = diffs[pointer][1];\n } else {\n // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (\n lastequality &&\n lastequality.length <=\n Math.max(length_insertions1, length_deletions1) &&\n lastequality.length <= Math.max(length_insertions2, length_deletions2)\n ) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0, [\n DIFF_DELETE,\n lastequality,\n ]);\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (\n diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT\n ) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (\n overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2\n ) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n insertion.substring(0, overlap_length1),\n ]);\n diffs[pointer - 1][1] = deletion.substring(\n 0,\n deletion.length - overlap_length1\n );\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (\n overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2\n ) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n deletion.substring(0, overlap_length2),\n ]);\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] = insertion.substring(\n 0,\n insertion.length - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n}\n\nvar nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\nvar whitespaceRegex_ = /\\s/;\nvar linebreakRegex_ = /[\\r\\n]/;\nvar blanklineEndRegex_ = /\\n\\r?\\n$/;\nvar blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemanticLossless(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n}\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = \"\";\n var text_insert = \"\";\n var commonlength;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n var previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (\n previous_equality >= 0 &&\n ends_with_pair_start(diffs[previous_equality][1])\n ) {\n var stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(\n 0,\n -1\n );\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n var stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(\n 0,\n commonlength\n );\n } else {\n diffs.splice(0, 0, [\n DIFF_EQUAL,\n text_insert.substring(0, commonlength),\n ]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) +\n diffs[pointer][1];\n text_insert = text_insert.substring(\n 0,\n text_insert.length - commonlength\n );\n text_delete = text_delete.substring(\n 0,\n text_delete.length - commonlength\n );\n }\n }\n // Delete the offending records and add the merged ones.\n var n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(\n pointer - n,\n n,\n [DIFF_DELETE, text_delete],\n [DIFF_INSERT, text_insert]\n );\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = \"\";\n text_insert = \"\";\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === \"\") {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n if (\n diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n ) === diffs[pointer - 1][1]\n ) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] =\n diffs[pointer - 1][1] +\n diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (\n diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]\n ) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xd800 && charCode <= 0xdbff;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xdc00 && charCode <= 0xdfff;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n var ret = [];\n for (var i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after],\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n var oldRange =\n typeof cursor_pos === \"number\"\n ? { index: cursor_pos, length: 0 }\n : cursor_pos.oldRange;\n var newRange = typeof cursor_pos === \"number\" ? null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n var oldLength = oldText.length;\n var newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n var oldCursor = oldRange.index;\n var oldBefore = oldText.slice(0, oldCursor);\n var oldAfter = oldText.slice(oldCursor);\n var maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n var newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n var newBefore = newText.slice(0, newCursor);\n var newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n var prefixLength = Math.min(oldCursor, newCursor);\n var oldPrefix = oldBefore.slice(0, prefixLength);\n var newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n var oldMiddle = oldBefore.slice(prefixLength);\n var newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n var cursor = oldCursor;\n var newBefore = newText.slice(0, cursor);\n var newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n var oldPrefix = oldText.slice(0, oldRange.index);\n var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n var prefixLength = oldPrefix.length;\n var suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n var newPrefix = newText.slice(0, prefixLength);\n var newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n var newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos, cleanup) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, cleanup, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n", "(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.jstoxml = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.toXML = _exports.default = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n var ARRAY = \"array\";\n var BOOLEAN = \"boolean\";\n var DATE = \"date\";\n var NULL = \"null\";\n var NUMBER = \"number\";\n var OBJECT = \"object\";\n var SPECIAL_OBJECT = \"special-object\";\n var STRING = \"string\";\n var PRIVATE_VARS = [\"_selfCloseTag\", \"_attrs\"];\n var PRIVATE_VARS_REGEXP = new RegExp(PRIVATE_VARS.join(\"|\"), \"g\");\n /**\n * Determines the indent string based on current tree depth.\n */\n\n var getIndentStr = function getIndentStr() {\n var indent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return indent.repeat(depth);\n };\n /**\n * Sugar function supplementing JS's quirky typeof operator, plus some extra help to detect\n * \"special objects\" expected by jstoxml.\n * Example:\n * getType(new Date());\n * -> 'date'\n */\n\n\n var getType = function getType(val) {\n return Array.isArray(val) && ARRAY || _typeof(val) === OBJECT && val !== null && val._name && SPECIAL_OBJECT || val instanceof Date && DATE || val === null && NULL || _typeof(val);\n };\n /**\n * Replaces matching values in a string with a new value.\n * Example:\n * filterStr('foo&bar', { '&': '&' });\n * -> 'foo&bar'\n */\n\n\n var filterStr = function filterStr() {\n var inputStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Passthrough/no-op for nonstrings (e.g. number, boolean).\n if (typeof inputStr !== \"string\") {\n return inputStr;\n }\n\n var regexp = new RegExp(\"(\".concat(Object.keys(filter).join(\"|\"), \")(?!(\\\\w|#)*;)\"), \"g\");\n return String(inputStr).replace(regexp, function (str, entity) {\n return filter[entity] || \"\";\n });\n };\n /**\n * Maps an object or array of arribute keyval pairs to a string.\n * Examples:\n * { foo: 'bar', baz: 'g' } -> 'foo=\"bar\" baz=\"g\"'\n * [ { \u26A1: true }, { foo: 'bar' } ] -> '\u26A1 foo=\"bar\"'\n */\n\n\n var getAttributeKeyVals = function getAttributeKeyVals() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = [];\n\n if (Array.isArray(attributes)) {\n // Array containing complex objects and potentially duplicate attributes.\n keyVals = attributes.map(function (attr) {\n var key = Object.keys(attr)[0];\n var val = attr[key];\n var filteredVal = filter ? filterStr(val, filter) : val;\n var valStr = filteredVal === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n } else {\n var keys = Object.keys(attributes);\n keyVals = keys.map(function (key) {\n // Simple object - keyval pairs.\n // For boolean true, simply output the key.\n var filteredVal = filter ? filterStr(attributes[key], filter) : attributes[key];\n var valStr = attributes[key] === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n }\n\n return keyVals;\n };\n /**\n * Converts an attributes object/array to a string of keyval pairs.\n * Example:\n * formatAttributes({ a: 1, b: 2 })\n * -> 'a=\"1\" b=\"2\"'\n */\n\n\n var formatAttributes = function formatAttributes() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = getAttributeKeyVals(attributes, filter);\n if (keyVals.length === 0) return \"\";\n var keysValsJoined = keyVals.join(\" \");\n return \" \".concat(keysValsJoined);\n };\n /**\n * Converts an object to a jstoxml array.\n * Example:\n * objToArray({ foo: 'bar', baz: 2 });\n * ->\n * [\n * {\n * _name: 'foo',\n * _content: 'bar'\n * },\n * {\n * _name: 'baz',\n * _content: 2\n * }\n * ]\n */\n\n\n var objToArray = function objToArray() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.keys(obj).map(function (key) {\n return {\n _name: key,\n _content: obj[key]\n };\n });\n };\n /**\n * Determines if a value is a primitive JavaScript value (not including Symbol).\n * Example:\n * isPrimitive(4);\n * -> true\n */\n\n\n var PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN];\n\n var isPrimitive = function isPrimitive(val) {\n return PRIMITIVE_TYPES.includes(getType(val));\n };\n /**\n * Determines if a value is a simple primitive type that can fit onto one line. Needed for\n * determining any needed indenting and line breaks.\n * Example:\n * isSimpleType(new Date());\n * -> true\n */\n\n\n var SIMPLE_TYPES = [].concat(PRIMITIVE_TYPES, [DATE, SPECIAL_OBJECT]);\n\n var isSimpleType = function isSimpleType(val) {\n return SIMPLE_TYPES.includes(getType(val));\n };\n /**\n * Determines if an XML string is a simple primitive, or contains nested data.\n * Example:\n * isSimpleXML('');\n * -> false\n */\n\n\n var isSimpleXML = function isSimpleXML(xmlStr) {\n return !xmlStr.match(\"<\");\n };\n /**\n * Assembles an XML header as defined by the config.\n */\n\n\n var DEFAULT_XML_HEADER = '';\n\n var getHeaderString = function getHeaderString(_ref) {\n var header = _ref.header,\n indent = _ref.indent,\n isOutputStart = _ref.isOutputStart;\n var shouldOutputHeader = header && isOutputStart;\n if (!shouldOutputHeader) return \"\";\n var shouldUseDefaultHeader = _typeof(header) === BOOLEAN; // return `${shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header}${indent ? \"\\n\" : \"\"\n // }`;\n\n return shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header;\n };\n /**\n * Recursively traverses an object tree and converts the output to an XML string.\n * Example:\n * toXML({ foo: 'bar' });\n * -> bar\n */\n\n\n var defaultEntityFilter = {\n \"<\": \"<\",\n \">\": \">\",\n \"&\": \"&\"\n };\n\n var toXML = function toXML() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _config$depth = config.depth,\n depth = _config$depth === void 0 ? 0 : _config$depth,\n indent = config.indent,\n _isFirstItem = config._isFirstItem,\n _config$_isOutputStar = config._isOutputStart,\n _isOutputStart = _config$_isOutputStar === void 0 ? true : _config$_isOutputStar,\n header = config.header,\n _config$attributesFil = config.attributesFilter,\n rawAttributesFilter = _config$attributesFil === void 0 ? {} : _config$attributesFil,\n _config$filter = config.filter,\n rawFilter = _config$filter === void 0 ? {} : _config$filter;\n\n var shouldTurnOffAttributesFilter = typeof rawAttributesFilter === 'boolean' && !rawAttributesFilter;\n var attributesFilter = shouldTurnOffAttributesFilter ? {} : _objectSpread(_objectSpread(_objectSpread({}, defaultEntityFilter), {\n '\"': \""\"\n }), rawAttributesFilter);\n var shouldTurnOffFilter = typeof rawFilter === 'boolean' && !rawFilter;\n var filter = shouldTurnOffFilter ? {} : _objectSpread(_objectSpread({}, defaultEntityFilter), rawFilter); // Determine indent string based on depth.\n\n var indentStr = getIndentStr(indent, depth); // For branching based on value type.\n\n var valType = getType(obj);\n var headerStr = getHeaderString({\n header: header,\n indent: indent,\n depth: depth,\n isOutputStart: _isOutputStart\n });\n var isOutputStart = _isOutputStart && !headerStr && _isFirstItem && depth === 0;\n var outputStr = \"\";\n\n switch (valType) {\n case \"special-object\":\n {\n // Processes a specially-formatted object used by jstoxml.\n var _name = obj._name,\n _content = obj._content; // Output text content without a tag wrapper.\n\n if (_content === null) {\n outputStr = _name;\n break;\n } // Handles arrays of primitive values. (#33)\n\n\n var isArrayOfPrimitives = Array.isArray(_content) && _content.every(isPrimitive);\n\n if (isArrayOfPrimitives) {\n var primitives = _content.map(function (a) {\n return toXML({\n _name: _name,\n _content: a\n }, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth,\n _isOutputStart: false\n }));\n });\n\n return primitives.join('');\n } // Don't output private vars (such as _attrs).\n\n\n if (_name.match(PRIVATE_VARS_REGEXP)) break; // Process the nested new value and create new config.\n\n var newVal = toXML(_content, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth + 1,\n _isOutputStart: isOutputStart\n }));\n var newValType = getType(newVal);\n var isNewValSimple = isSimpleXML(newVal); // Pre-tag output (indent and line breaks).\n\n var preIndentStr = indent && !isOutputStart ? \"\\n\" : \"\";\n var preTag = \"\".concat(preIndentStr).concat(indentStr); // Special handling for comments, preserving preceding line breaks/indents.\n\n if (_name === '_comment') {\n outputStr += \"\".concat(preTag, \"\");\n break;\n } // Tag output.\n\n\n var valIsEmpty = newValType === \"undefined\" || newVal === \"\";\n var shouldSelfClose = _typeof(obj._selfCloseTag) === BOOLEAN ? valIsEmpty && obj._selfCloseTag : valIsEmpty;\n var selfCloseStr = shouldSelfClose ? \"/\" : \"\";\n var attributesString = formatAttributes(obj._attrs, attributesFilter);\n var tag = \"<\".concat(_name).concat(attributesString).concat(selfCloseStr, \">\"); // Post-tag output (closing tag, indent, line breaks).\n\n var preTagCloseStr = indent && !isNewValSimple ? \"\\n\".concat(indentStr) : \"\";\n var postTag = !shouldSelfClose ? \"\".concat(newVal).concat(preTagCloseStr, \"\") : \"\";\n outputStr += \"\".concat(preTag).concat(tag).concat(postTag);\n break;\n }\n\n case \"object\":\n {\n // Iterates over keyval pairs in an object, converting each item to a special-object.\n var keys = Object.keys(obj);\n var outputArr = keys.map(function (key, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === keys.length,\n _isOutputStart: isOutputStart\n });\n\n var outputObj = {\n _name: key\n };\n\n if (getType(obj[key]) === \"object\") {\n // Sub-object contains an object.\n // Move private vars up as needed. Needed to support certain types of objects\n // E.g. { foo: { _attrs: { a: 1 } } } -> \n PRIVATE_VARS.forEach(function (privateVar) {\n var val = obj[key][privateVar];\n\n if (typeof val !== \"undefined\") {\n outputObj[privateVar] = val;\n delete obj[key][privateVar];\n }\n });\n var hasContent = typeof obj[key]._content !== \"undefined\";\n\n if (hasContent) {\n // _content has sibling keys, so pass as an array (edge case).\n // E.g. { foo: 'bar', _content: { baz: 2 } } -> bar2\n if (Object.keys(obj[key]).length > 1) {\n var newContentObj = Object.assign({}, obj[key]);\n delete newContentObj._content;\n outputObj._content = [].concat(_toConsumableArray(objToArray(newContentObj)), [obj[key]._content]);\n }\n }\n } // Fallthrough: just pass the key as the content for the new special-object.\n\n\n if (typeof outputObj._content === \"undefined\") outputObj._content = obj[key];\n var xml = toXML(outputObj, newConfig, key);\n return xml;\n }, config);\n outputStr = outputArr.join('');\n break;\n }\n\n case \"function\":\n {\n // Executes a user-defined function and returns output.\n var fnResult = obj(config);\n outputStr = toXML(fnResult, config);\n break;\n }\n\n case \"array\":\n {\n // Iterates and converts each value in an array.\n var _outputArr = obj.map(function (singleVal, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === obj.length,\n _isOutputStart: isOutputStart\n });\n\n return toXML(singleVal, newConfig);\n });\n\n outputStr = _outputArr.join('');\n break;\n }\n // number, string, boolean, date, null, etc\n\n default:\n {\n outputStr = filterStr(obj, filter);\n break;\n }\n }\n\n return \"\".concat(headerStr).concat(outputStr);\n };\n\n _exports.toXML = toXML;\n var _default = {\n toXML: toXML\n };\n _exports.default = _default;\n});\n", "(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[\"chord-symbol\"] = factory();\n\telse\n\t\troot[\"chord-symbol\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn ", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n", "var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n", "var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n", "var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n", "var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n", "var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n", "var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n", "var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n", "var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n", "var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n", "var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", "var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n", "var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n", "var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n", "var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n", "var baseForOwn = require('./_baseForOwn');\n\n/**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n}\n\nmodule.exports = baseInverter;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n", "var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n", "var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n", "var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n", "var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n", "var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n", "var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n", "var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n", "var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n", "var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n", "var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n", "var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n", "var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n", "var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\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 */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n", "var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n", "var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n", "var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n", "var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n", "var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n", "var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", "var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n", "var baseInverter = require('./_baseInverter');\n\n/**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\nfunction createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n}\n\nmodule.exports = createInverter;\n", "var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n", "var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n", "var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n", "var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n", "var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n", "var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n", "var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n", "var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n", "var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n", "var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\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 */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n", "var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n", "var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n", "var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n", "var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\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 */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n", "var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\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 */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n", "var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n", "var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n", "var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n", "var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\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 */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n", "var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n", "var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n", "var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n", "var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n", "var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n", "var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n", "var constant = require('./constant'),\n createInverter = require('./_createInverter'),\n identity = require('./identity');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\nvar invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n}, constant(identity));\n\nmodule.exports = invert;\n", "var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n", "var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n", "var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n", "var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n", "var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", "var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n", "var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n", "var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n", "var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n", "var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n", "var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n", "var baseDifference = require('./_baseDifference'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\nvar without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n});\n\nmodule.exports = without;\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};", "// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};", "__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();", "__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))", "// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};", "__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};", "/**\n * Execute given functions in sequence, feeding the result of one as an input to the next.\n *\n * @param {Function[]} allFunctions\n * @param {*} input - parameter given to the first function\n * @returns {*} return value of the last function\n */\nexport default function chain(allFunctions, input) {\n\treturn allFunctions.reduce((value, fn) => {\n\t\treturn value ? fn(value) : null;\n\t}, input);\n}\n", "const checkCustomFilters = (customFilters) => {\n\tif (!Array.isArray(customFilters)) {\n\t\tthrow new TypeError('customFilters should be given as an array');\n\t}\n\tif (customFilters.some((filter) => typeof filter !== 'function')) {\n\t\tthrow new TypeError(`The given filter is not a function`);\n\t}\n\treturn true;\n};\n\nexport default checkCustomFilters;\n", "const notes = {\n\tAFlat: 'Ab',\n\tA: 'A',\n\tASharp: 'A#',\n\tBFlat: 'Bb',\n\tB: 'B',\n\tC: 'C',\n\tCSharp: 'C#',\n\tDFlat: 'Db',\n\tD: 'D',\n\tDSharp: 'D#',\n\tEFlat: 'Eb',\n\tE: 'E',\n\tF: 'F',\n\tFSharp: 'F#',\n\tGFlat: 'Gb',\n\tG: 'G',\n\tGSharp: 'G#',\n};\n\nconst english = {\n\tAb: notes.AFlat,\n\tA: notes.A,\n\t'A#': notes.ASharp,\n\tBb: notes.BFlat,\n\tB: notes.B,\n\t'B#': notes.C,\n\tCb: notes.B,\n\tC: notes.C,\n\t'C#': notes.CSharp,\n\tDb: notes.DFlat,\n\tD: notes.D,\n\t'D#': notes.DSharp,\n\tEb: notes.EFlat,\n\tE: notes.E,\n\t'E#': notes.F,\n\tFb: notes.E,\n\tF: notes.F,\n\t'F#': notes.FSharp,\n\tGb: notes.GFlat,\n\tG: notes.G,\n\t'G#': notes.GSharp,\n};\n\nconst latin = {\n\tLab: notes.AFlat,\n\tLa: notes.A,\n\t'La#': notes.ASharp,\n\tSib: notes.BFlat,\n\tSi: notes.B,\n\t'Si#': notes.C,\n\tDob: notes.B,\n\tDo: notes.C,\n\t'Do#': notes.CSharp,\n\tReb: notes.DFlat,\n\tRéb: notes.DFlat,\n\tRe: notes.D,\n\tRé: notes.D,\n\t'Re#': notes.DSharp,\n\t'Ré#': notes.DSharp,\n\tMib: notes.EFlat,\n\tMi: notes.E,\n\t'Mi#': notes.F,\n\tFab: notes.E,\n\tFa: notes.F,\n\t'Fa#': notes.FSharp,\n\tSolb: notes.GFlat,\n\tSol: notes.G,\n\t'Sol#': notes.GSharp,\n};\n\nconst german = {\n\tAs: notes.AFlat,\n\tA: notes.A,\n\tAis: notes.ASharp,\n\tHes: notes.BFlat,\n\tH: notes.B,\n\tHis: notes.C,\n\tCes: notes.B,\n\tC: notes.C,\n\tCis: notes.CSharp,\n\tDes: notes.DFlat,\n\tD: notes.D,\n\tDis: notes.DSharp,\n\tEs: notes.EFlat,\n\tE: notes.E,\n\tEis: notes.F,\n\tFes: notes.E,\n\tF: notes.F,\n\tFis: notes.FSharp,\n\tGes: notes.GFlat,\n\tG: notes.G,\n\tGis: notes.GSharp,\n};\n\nfunction getAccidentalsVariation(source) {\n\tlet variant;\n\treturn Object.keys(source).reduce((acc, curr) => {\n\t\tif (curr.match(/.[b|#]$/)) {\n\t\t\tvariant = curr.replace('#', '♯').replace('b', '♭');\n\t\t\tacc[variant] = source[curr];\n\t\t}\n\t\treturn acc;\n\t}, {});\n}\n\nconst englishVariantsToNotes = {\n\t...english,\n\t...getAccidentalsVariation(english),\n};\n\nconst latinVariantsToNotes = {\n\t...latin,\n\t...getAccidentalsVariation(latin),\n};\n\nconst germanVariantsToNotes = {\n\t...german,\n};\n\nconst allVariantsToNotes = {\n\t...englishVariantsToNotes,\n\t...latinVariantsToNotes,\n\t...germanVariantsToNotes,\n};\n\nconst allVariants = Object.keys(allVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst englishVariants = Object.keys(englishVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst latinVariants = Object.keys(latinVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst germanVariants = Object.keys(germanVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst allVariantsPerGroup = [\n\t{ name: 'english', notes: englishVariants },\n\t{ name: 'german', notes: germanVariants },\n\t{ name: 'latin', notes: latinVariants },\n];\n\nexport {\n\tnotes,\n\tallVariants,\n\tallVariantsPerGroup,\n\tenglishVariants,\n\tlatinVariants,\n\tgermanVariants,\n\tallVariantsToNotes,\n\tenglishVariantsToNotes,\n\tlatinVariantsToNotes,\n\tgermanVariantsToNotes,\n};\n", "class InvalidInputError extends Error {\n\t/**\n\t * The parser was not given a valid string to parse\n\t * ex: `parseChord(null)`\n\t */\n\tconstructor() {\n\t\tsuper('The given symbol is not a valid string');\n\t\tthis.name = 'InvalidInput';\n\t}\n}\n\nclass UnexpectedError extends Error {\n\t/**\n\t * This error is very unlikely to happen.\n\t * If it does, it is probably in the context of a custom filter that returns `null` instead of throwing an exception.\n\t */\n\tconstructor() {\n\t\tconst message =\n\t\t\t'An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?';\n\t\tsuper(message);\n\t\tthis.name = 'UnexpectedError';\n\t}\n}\n\nclass ChordSymbolError extends Error {\n\tconstructor(message, chord, errorName) {\n\t\tsuper(message);\n\t\tthis.name = errorName;\n\t\tthis.chord = chord;\n\t}\n}\n\nclass NoSymbolFoundError extends ChordSymbolError {\n\t/**\n\t * The given string cannot be confused with a chord symbol in the current notation system\n\t * ex: `parseChord('Ape')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t */\n\tconstructor(chord) {\n\t\tconst message = `\"${chord.input.symbol}\" does not seems to be a chord`;\n\t\tsuper(message, chord, 'NoSymbolFound');\n\t}\n}\n\nclass InvalidModifierError extends ChordSymbolError {\n\t/**\n\t * The given string looks like a chord symbol, but `ChordSymbol` does not understand its descriptor.\n\t * It can be either because of a typo, or just because the given word is not a symbol.\n\t * ex: `parseChord('Amid')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String} invalidChars - the characters that proved problematic when parsing the symbol\n\t */\n\tconstructor(chord, invalidChars) {\n\t\tconst message = `The chord descriptor \"${chord.input.descriptor}\" contains unknown or duplicated modifiers: \"${invalidChars}\"`;\n\t\tsuper(message, chord, 'InvalidModifier');\n\t}\n}\n\nclass InvalidIntervalsError extends ChordSymbolError {\n\t/**\n\t * The given string is a chord symbol, but the resulting interval list is not valid\n\t * ex: `parseChord('A7M7')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String[]} forbiddenCombo - intervals that should not belong together in a chord\n\t */\n\tconstructor(chord, forbiddenCombo) {\n\t\tconst message =\n\t\t\t`\"${chord.input.symbol}\" describes a chord with an invalid intervals combo: ` +\n\t\t\tforbiddenCombo.join(' and ');\n\t\tsuper(message, chord, 'InvalidIntervals');\n\t}\n}\n\nexport {\n\tInvalidInputError,\n\tInvalidIntervalsError,\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n\tUnexpectedError,\n};\n", "import _isArray from 'lodash/isArray';\nimport _isEqual from 'lodash/isEqual';\n\nfunction hasExactly(allIntervals, search) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\treturn _isEqual(allIntervals, arraySearch);\n}\n\nfunction hasOneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'oneOf');\n}\n\nfunction hasAll(allIntervals, search) {\n\treturn has(allIntervals, search, 'all');\n}\n\nfunction hasNoneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'none');\n}\n\nfunction has(allIntervals, search, require) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\n\tconst lookupMethod = require === 'oneOf' ? 'some' : 'every';\n\n\treturn arraySearch[lookupMethod]((interval) => {\n\t\treturn require === 'none'\n\t\t\t? !allIntervals.includes(interval)\n\t\t\t: allIntervals.includes(interval);\n\t});\n}\n\nexport { hasExactly, hasOneOf, hasAll, hasNoneOf };\n", "import { hasAll } from '../../helpers/hasElement';\nimport { InvalidIntervalsError } from '../../helpers/ChordParsingError';\n\nconst allForbiddenCombos = [\n\t['2', '3'],\n\t['2', '9'],\n\t['3', 'b3'],\n\t//['3', '4'], // valid in the Real Book: F#7SUS(add 3)\n\t['4', '11'],\n\t['5', 'b5'],\n\t['5', '#5'],\n\t['b6', '#5'],\n\t['b6', '6'],\n\t['b6', '13'],\n\t['6', '13'],\n\t['b7', 'bb7'],\n\t['7', 'b7'],\n\t['9', 'b9'],\n\t['9', '#9'],\n\t['11', '#11'],\n\t['13', 'b13'],\n];\n\n/**\n * Check parsed interval list to detect potential inconsistencies\n *\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function checkIntervalsConsistency(chord) {\n\tconst intervals = chord.normalized.intervals;\n\n\tconst forbiddenCombo = allForbiddenCombos.find((combo) =>\n\t\thasAll(intervals, combo)\n\t);\n\n\tif (forbiddenCombo) {\n\t\tthrow new InvalidIntervalsError(chord, forbiddenCombo);\n\t}\n\n\treturn chord;\n}\n", "/**\n * Render the chord by assembling all its components\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbol(chord) {\n\tconst { rootNote, bassNote, descriptor, chordChanges } = chord.formatted;\n\n\tlet symbol = rootNote;\n\n\tif (descriptor) {\n\t\tsymbol += descriptor;\n\t}\n\tif (chordChanges && chordChanges.length) {\n\t\tsymbol += '(' + chordChanges.join(',') + ')';\n\t}\n\tif (bassNote) {\n\t\tsymbol += '/' + bassNote;\n\t}\n\n\tchord.formatted.symbol = symbol;\n\n\treturn chord;\n}\n", "const qualities = {\n\tma: 'major',\n\tma6: 'major6',\n\tma7: 'major7',\n\tdom7: 'dominant7',\n\n\tmi: 'minor',\n\tmi6: 'minor6',\n\tmi7: 'minor7',\n\tmiMa7: 'minorMajor7',\n\n\taug: 'augmented',\n\tdim: 'diminished',\n\tdim7: 'diminished7',\n\n\tpower: 'power',\n\tbass: 'bass',\n};\n\nconst majorQualities = [\n\tqualities.ma,\n\tqualities.ma6,\n\tqualities.ma7,\n\tqualities.dom7,\n\tqualities.aug,\n];\n\nconst minorQualities = [\n\tqualities.mi,\n\tqualities.mi6,\n\tqualities.mi7,\n\tqualities.miMa7,\n\tqualities.dim,\n\tqualities.dim7,\n];\n\nexport { qualities, majorQualities, minorQualities };\n", "import { qualities } from '../../dictionaries/qualities';\nimport { hasNoneOf } from '../../helpers/hasElement';\n\nconst qualityToDescriptor = {\n\t[qualities.ma]: () => '',\n\t[qualities.ma6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? '69' : '6',\n\t[qualities.ma7]: (chord) => 'ma' + getHighestExtension(chord),\n\t[qualities.dom7]: (chord) =>\n\t\tchord.normalized.intents.alt ? '7alt' : getHighestExtension(chord),\n\n\t[qualities.mi]: () => 'mi',\n\t[qualities.mi6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? 'mi69' : 'mi6',\n\t[qualities.mi7]: (chord) => 'mi' + getHighestExtension(chord),\n\t[qualities.miMa7]: (chord) => 'miMa' + getHighestExtension(chord),\n\n\t[qualities.aug]: () => '+',\n\t[qualities.dim]: () => 'dim',\n\t[qualities.dim7]: () => 'dim7',\n\n\t[qualities.power]: () => '5',\n\t[qualities.bass]: () => ' bass',\n};\n\nconst chordChangesDescriptors = {\n\tadd: 'add',\n\tadd7: 'Ma7',\n\tomit: 'omit',\n\tsus: 'sus',\n};\n\n/**\n * Pre-render the chord by formatting all his components: root and bass notes, descriptor and changes\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbolParts(chord) {\n\tchord.formatted = {\n\t\trootNote: chord.normalized.rootNote,\n\t\tbassNote: chord.normalized.bassNote,\n\t\tdescriptor: getDescriptor(chord),\n\t\tchordChanges: getChordChanges(chord),\n\t};\n\treturn chord;\n}\n\nfunction getDescriptor(chord) {\n\tlet descriptor = qualityToDescriptor[chord.normalized.quality](chord);\n\tif (chord.normalized.isSuspended) {\n\t\tdescriptor += chordChangesDescriptors.sus;\n\t}\n\treturn descriptor;\n}\n\nfunction getHighestExtension(chord) {\n\tconst extensions = chord.normalized.extensions;\n\n\tlet highestExtension = extensions[extensions.length - 1];\n\n\tif (highestExtension === '11' && chord.normalized.intents.major) {\n\t\thighestExtension = hasNoneOf(chord.normalized.alterations, ['b9', '#9'])\n\t\t\t? '9'\n\t\t\t: '7';\n\t}\n\treturn highestExtension || '7';\n}\n\nfunction getChordChanges(chord) {\n\tconst formattedOmits = formatOmits(chord.normalized.omits);\n\n\tif (isAltered(chord)) {\n\t\treturn formattedOmits;\n\t}\n\n\tconst formattedAdds = formatAdds(\n\t\tchord.normalized.quality,\n\t\tchord.normalized.adds\n\t);\n\n\treturn [\n\t\t...chord.normalized.alterations,\n\t\t...formattedAdds,\n\t\t...formattedOmits,\n\t];\n}\n\nfunction isAltered(chord) {\n\treturn (\n\t\tchord.normalized.intents.alt &&\n\t\tchord.normalized.quality === qualities.dom7\n\t);\n}\n\nfunction formatAdds(quality, adds) {\n\treturn adds\n\t\t.filter((add) => {\n\t\t\treturn !(\n\t\t\t\t[qualities.ma6, qualities.mi6].includes(quality) && add === '9'\n\t\t\t);\n\t\t})\n\t\t.map((add, index) => {\n\t\t\tlet formatted = '';\n\t\t\tif (index === 0) {\n\t\t\t\tformatted += chordChangesDescriptors.add;\n\t\t\t\tif (['b', '#'].includes(add[0])) {\n\t\t\t\t\tformatted += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tformatted += add === '7' ? chordChangesDescriptors.add7 : add;\n\t\t\treturn formatted;\n\t\t});\n}\n\nfunction formatOmits(omits) {\n\treturn omits.map((omitted, index) => {\n\t\tlet formatted = '';\n\t\tif (index === 0) {\n\t\t\tformatted += chordChangesDescriptors.omit;\n\t\t}\n\t\tformatted += omitted === 'b3' ? '3' : omitted;\n\t\treturn formatted;\n\t});\n}\n", "import chain from '../../helpers/chain';\n\n/**\n * Prepare whatever string has been identified as a descriptor so it is parsable by the next filter\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function getParsableDescriptor(chord) {\n\tconst allFilters = [\n\t\ttoLowerCaseExceptMajorM,\n\t\tremoveSpaces,\n\t\taddDisambiguators,\n\t\taddMissingVerbs,\n\t];\n\n\tif (chord.input.descriptor) {\n\t\tchord.input.parsableDescriptor = chain(\n\t\t\tallFilters,\n\t\t\tchord.input.descriptor\n\t\t);\n\t}\n\treturn chord;\n}\n\nfunction toLowerCaseExceptMajorM(descriptor) {\n\treturn descriptor\n\t\t.replace(/[A-LN-Za-z]+/g, (match) => match.toLowerCase())\n\t\t.replace('oMit', 'omit')\n\t\t.replace('diM', 'dim')\n\t\t.replace('augMented', 'augmented');\n}\n\nfunction removeSpaces(descriptor) {\n\treturn descriptor.replace(/ /g, '');\n}\n\nfunction addDisambiguators(descriptor) {\n\treturn descriptor\n\t\t.replace(/(7?dim)(alt|add)/g, '$1 $2')\n\t\t.replace(/([m|M])(alt|add)/g, '$1 $2')\n\t\t.replace(/i(no[35])/g, 'i $1')\n\t\t.replace(/([b♭#♯]9)6/g, '$1 6')\n\t\t.replace(/(9\\/?6)/g, ' $1');\n}\n\nfunction addMissingVerbs(descriptor) {\n\tlet allTokensWithVerbs;\n\tlet currentVerb;\n\tlet hasVerb;\n\n\treturn descriptor.replace(/\\((.*?)\\)/g, (match, parenthesis) => {\n\t\tallTokensWithVerbs = [];\n\t\tcurrentVerb = '';\n\n\t\tparenthesis.split(',').forEach((token) => {\n\t\t\thasVerb = true;\n\t\t\tif (token.startsWith('add')) {\n\t\t\t\tcurrentVerb = 'add';\n\t\t\t} else if (token.startsWith('omit')) {\n\t\t\t\tcurrentVerb = 'omit';\n\t\t\t} else if (token.startsWith('no')) {\n\t\t\t\tcurrentVerb = 'no';\n\t\t\t} else {\n\t\t\t\thasVerb = false;\n\t\t\t}\n\t\t\tif (hasVerb) {\n\t\t\t\tallTokensWithVerbs.push(token);\n\t\t\t} else {\n\t\t\t\tallTokensWithVerbs.push(currentVerb + token);\n\t\t\t}\n\t\t});\n\t\treturn ' ' + allTokensWithVerbs.join(' ') + ' ';\n\t});\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\n/**\n * @param {String} symbol\n * @param {Object} parserConfiguration\n * @returns {Chord}\n */\nexport default function initChord(parserConfiguration = {}, symbol) {\n\treturn {\n\t\tinput: {\n\t\t\tsymbol,\n\t\t},\n\t\tnormalized: {},\n\t\tformatted: {},\n\t\tparserConfiguration: _cloneDeep(parserConfiguration),\n\t};\n}\n", "import { notes } from '../../dictionaries/notes';\nimport { majorQualities } from '../../dictionaries/qualities';\n\nconst notesSharp = [\n\tnotes.A,\n\tnotes.ASharp,\n\tnotes.B,\n\tnotes.C,\n\tnotes.CSharp,\n\tnotes.D,\n\tnotes.DSharp,\n\tnotes.E,\n\tnotes.F,\n\tnotes.FSharp,\n\tnotes.G,\n\tnotes.GSharp,\n];\n\nconst notesFlat = [\n\tnotes.A,\n\tnotes.BFlat,\n\tnotes.B,\n\tnotes.C,\n\tnotes.DFlat,\n\tnotes.D,\n\tnotes.EFlat,\n\tnotes.E,\n\tnotes.F,\n\tnotes.GFlat,\n\tnotes.G,\n\tnotes.AFlat,\n];\n\nconst rootNoteToScaleAccidentals = {\n\t[notes.C]: { maj: 'flat', min: 'flat' },\n\t[notes.CSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.DFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.D]: { maj: 'sharp', min: 'flat' },\n\t[notes.DSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.EFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.E]: { maj: 'sharp', min: 'sharp' },\n\t[notes.F]: { maj: 'flat', min: 'flat' },\n\t[notes.FSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.GFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.G]: { maj: 'sharp', min: 'flat' },\n\t[notes.GSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.AFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.A]: { maj: 'sharp', min: 'flat' },\n\t[notes.ASharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.BFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.B]: { maj: 'sharp', min: 'sharp' },\n};\n\n/**\n * Convert intervals in actual notes.\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function nameIndividualChordNotes(chord) {\n\tconst rootNote = chord.normalized.rootNote;\n\tconst semitones = chord.normalized.semitones;\n\tconst quality = chord.normalized.quality;\n\n\tconst minMaj = majorQualities.includes(quality) ? 'maj' : 'min';\n\tconst refNotes =\n\t\trootNoteToScaleAccidentals[rootNote][minMaj] === 'sharp'\n\t\t\t? notesSharp\n\t\t\t: notesFlat;\n\n\tconst rootNoteIndex = refNotes.indexOf(rootNote);\n\tconst indexedNotes = [\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t\t// repeating...\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t];\n\n\tconst chordNotes = semitones.map((i) => indexedNotes[i]);\n\n\tchord.normalized.notes = chordNotes;\n\n\treturn chord;\n}\n", "import { allVariantsToNotes } from '../../dictionaries/notes';\n\n/**\n * Convert root/bass notes to English names\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeNotes(chord) {\n\tchord.normalized.rootNote = allVariantsToNotes[chord.input.rootNote];\n\n\tif (chord.input.bassNote) {\n\t\tchord.normalized.bassNote = allVariantsToNotes[chord.input.bassNote];\n\t}\n\n\treturn chord;\n}\n", "import _clone from 'lodash/clone';\nimport _find from 'lodash/find';\nimport _uniq from 'lodash/uniq';\nimport _without from 'lodash/without';\n\nimport chain from '../../helpers/chain';\n\nimport {\n\thasOneOf,\n\thasAll,\n\thasNoneOf,\n\thasExactly,\n} from '../../helpers/hasElement';\n\nimport { qualities } from '../../dictionaries/qualities';\n\n/**\n * Detect chord quality and changes (extensions, alterations, adds and omits)\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeDescriptor(chord) {\n\tlet chordIntervals = _clone(chord.normalized.intervals);\n\n\tlet normalized = {\n\t\tquality: '',\n\t\tisSuspended: false,\n\t\textensions: [],\n\t\talterations: [],\n\t\tadds: [],\n\t\tomits: [],\n\t};\n\n\tif (isPowerChord(chordIntervals)) {\n\t\tnormalized.quality = qualities.power;\n\t} else if (isBass(chordIntervals)) {\n\t\tnormalized.quality = qualities.bass;\n\t} else {\n\t\tconst omits = getOmits(chordIntervals, chord.normalized.intents.major);\n\n\t\tconst isSuspended = getIsSuspended(\n\t\t\tchordIntervals,\n\t\t\tchord.normalized.intents.major\n\t\t);\n\n\t\tconst { qualityIntervals, quality } = getChordQuality(\n\t\t\tchordIntervals,\n\t\t\tchord,\n\t\t\tisSuspended,\n\t\t\tomits\n\t\t);\n\n\t\tconst extensions = getExtensions(chordIntervals, quality);\n\n\t\t// to be able to detect adds and alterations, we build the \"straight\" version of the chord,\n\t\t// ie. the chord as if no alterations/adds/omits where present.\n\t\t// we will compare this to the actual intervals later on\n\t\tconst baseIntervals = ['1', ...qualityIntervals, ...extensions];\n\n\t\tconst { adds, alterations } = getAddsAndAlterations(\n\t\t\tchordIntervals,\n\t\t\tbaseIntervals,\n\t\t\tquality\n\t\t);\n\n\t\tnormalized = {\n\t\t\t...normalized,\n\t\t\tquality,\n\t\t\tisSuspended,\n\t\t\textensions,\n\t\t\talterations,\n\t\t\tadds,\n\t\t\tomits,\n\t\t};\n\t}\n\n\treturn {\n\t\t...chord,\n\t\tnormalized: {\n\t\t\t...chord.normalized,\n\t\t\t...normalized,\n\t\t},\n\t};\n}\n\nfunction isPowerChord(intervals) {\n\treturn hasExactly(intervals, ['1', '5']);\n}\n\nfunction isBass(intervals) {\n\treturn hasExactly(intervals, ['1']);\n}\n\nfunction getIsSuspended(intervals, hasMajorIntent) {\n\treturn (\n\t\tintervals.includes('4') ||\n\t\t(intervals.includes('11') && hasMajorIntent && !intervals.includes('3'))\n\t);\n}\n\nfunction getOmits(intervals, hasMajorIntent) {\n\tconst omits = [];\n\n\tif (\n\t\thasNoneOf(intervals, ['b3', '3', '4', '11']) ||\n\t\t(!hasMajorIntent && hasNoneOf(intervals, ['b3', '4']))\n\t) {\n\t\tomits.push(hasMajorIntent ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5', 'b13'])) {\n\t\tomits.push('5');\n\t}\n\treturn omits;\n}\n\nfunction getChordQuality(allIntervals, chord, isSuspended, omits) {\n\tconst intervalsForQualityDetection = getIntervalsForQualityDetection(\n\t\tallIntervals,\n\t\tchord,\n\t\tisSuspended,\n\t\tomits\n\t);\n\n\tconst intervalsToQualities = [\n\t\t// !!! do not change order without a good reason\n\t\t{ qualityIntervals: ['b3'], quality: qualities.mi },\n\t\t{ qualityIntervals: ['b3', '6'], quality: qualities.mi6 },\n\t\t{ qualityIntervals: ['b3', '7'], quality: qualities.miMa7 },\n\t\t{ qualityIntervals: ['b3', 'b7'], quality: qualities.mi7 },\n\n\t\t{ qualityIntervals: ['3'], quality: qualities.ma },\n\t\t{ qualityIntervals: ['3', '6'], quality: qualities.ma6 },\n\t\t{ qualityIntervals: ['3', '7'], quality: qualities.ma7 },\n\t\t{ qualityIntervals: ['3', 'b7'], quality: qualities.dom7 },\n\n\t\t{ qualityIntervals: ['3', '#5'], quality: qualities.aug },\n\t\t{ qualityIntervals: ['b3', 'b5'], quality: qualities.dim },\n\t\t{ qualityIntervals: ['b3', 'b5', 'bb7'], quality: qualities.dim7 },\n\t].sort((a, b) => b.qualityIntervals.length - a.qualityIntervals.length);\n\n\treturn _find(intervalsToQualities, (o) =>\n\t\thasAll(intervalsForQualityDetection, o.qualityIntervals)\n\t);\n}\n\n// To properly detect the chord quality, we need a \"straight\" version of the chord,\n// meaning with a third interval (= un-suspended, no omit3)\nfunction getIntervalsForQualityDetection(\n\tallIntervals,\n\tchord,\n\tisSuspended,\n\tomits\n) {\n\tconst allFilters = [\n\t\tundoOmit3.bind(null, omits),\n\t\tundoSuspension.bind(null, isSuspended, chord.normalized.intents.major),\n\t\tundoAlt5.bind(null, chord.normalized.intents.alt),\n\t\t_uniq,\n\t];\n\n\treturn chain(allFilters, _clone(allIntervals));\n}\n\nfunction undoOmit3(omits, allIntervals) {\n\tconst with3rd = _clone(allIntervals);\n\n\tif (omits.includes('3')) {\n\t\twith3rd.push('3');\n\t} else if (omits.includes('b3')) {\n\t\twith3rd.push('b3');\n\t}\n\treturn with3rd;\n}\n\nfunction undoSuspension(isSuspended, hasMajorIntent, allIntervals) {\n\tif (isSuspended) {\n\t\tconst unSuspended = _without(allIntervals, '4');\n\t\tunSuspended.push(hasMajorIntent ? '3' : 'b3');\n\t\treturn unSuspended;\n\t}\n\treturn allIntervals;\n}\n\nfunction undoAlt5(isAlt, allIntervals) {\n\tif (isAlt) {\n\t\tconst unaltered = _without(allIntervals, 'b5', '#5');\n\t\tunaltered.push('5');\n\t\treturn unaltered;\n\t}\n\treturn allIntervals;\n}\n\nfunction getExtensions(allIntervals, quality) {\n\tconst extensions = [];\n\n\tif (canBeExtended(quality)) {\n\t\tif (isMinorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '11', '13');\n\t\t} else if (isMajorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '13');\n\t\t} else if (isExtended11th(allIntervals)) {\n\t\t\textensions.push('9', '11');\n\t\t} else if (isExtended9th(allIntervals)) {\n\t\t\textensions.push('9');\n\t\t}\n\t}\n\treturn extensions;\n}\n\nfunction canBeExtended(quality) {\n\treturn [\n\t\tqualities.ma7,\n\t\tqualities.dom7,\n\t\tqualities.mi7,\n\t\tqualities.miMa7,\n\t].includes(quality);\n}\n\nfunction canHave11th(quality) {\n\treturn [qualities.mi7, qualities.miMa7].includes(quality);\n}\n\nfunction isMinorExtended13th(allIntervals, quality) {\n\treturn (\n\t\tcanHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['11', '#11']) &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isMajorExtended13th(allIntervals, quality) {\n\treturn (\n\t\t!canHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended11th(allIntervals) {\n\treturn (\n\t\thasOneOf(allIntervals, '11') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended9th(allIntervals) {\n\treturn allIntervals.includes('9');\n}\n\nfunction getAddsAndAlterations(chordIntervals, baseIntervals, quality) {\n\tconst adds = [];\n\tconst alterations = [];\n\n\tchordIntervals\n\t\t.filter((interval) => interval !== '5' && interval !== '4')\n\t\t.forEach((interval) => {\n\t\t\tif (!baseIntervals.includes(interval)) {\n\t\t\t\tif (isAlteration(quality, interval)) {\n\t\t\t\t\talterations.push(interval);\n\t\t\t\t} else {\n\t\t\t\t\tadds.push(interval);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\tif (hasAdd3(chordIntervals)) {\n\t\tadds.push('3');\n\t}\n\n\treturn {\n\t\tadds: sortIntervals(adds),\n\t\talterations: sortIntervals(alterations),\n\t};\n}\n\nfunction isAlteration(quality, interval) {\n\tconst qualityAlterations = {\n\t\t[qualities.ma]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.dom7]: ['b5', '#5', 'b9', '#9', '#11', 'b13'],\n\n\t\t[qualities.mi]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.miMa7]: ['b5', '#5', '#11', 'b13'],\n\n\t\t[qualities.aug]: [],\n\t\t[qualities.dim]: [],\n\t\t[qualities.dim7]: [],\n\t};\n\n\treturn qualityAlterations[quality].includes(interval);\n}\n\nfunction hasAdd3(allIntervals) {\n\treturn hasAll(allIntervals, ['3', '4']);\n}\n\nfunction sortIntervals(intervals) {\n\treturn intervals.sort((a, b) => {\n\t\tconst sortableA = Number.parseInt(a.replace(/[b#]/, ''));\n\t\tconst sortableB = Number.parseInt(b.replace(/[b#]/, ''));\n\t\treturn sortableA - sortableB;\n\t});\n}\n", "import { NoSymbolFoundError } from '../../helpers/ChordParsingError';\n\n/**\n * Split symbol in root/bass note and descriptor.\n * Returns null if the given string does not seems to be a chord.\n *\n * @param {String[]} noteVariants - all notes within a given notation system (English, Latin, German...)\n * @param {Chord} chord\n * @returns {Chord|null}\n */\nexport default function parseBase(noteVariants, chord) {\n\tconst { symbol } = chord.input;\n\tconst notesRegex = noteVariants.join('|');\n\tconst notesAndDescriptorRegex = new RegExp(\n\t\t'^' +\n\t\t\t'(' +\n\t\t\tnotesRegex +\n\t\t\t')' +\n\t\t\t'(.*?)' +\n\t\t\t'(/(' +\n\t\t\tnotesRegex +\n\t\t\t'))?' +\n\t\t\t'$'\n\t);\n\tconst result = symbol.match(notesAndDescriptorRegex);\n\n\tif (result && result[1]) {\n\t\tchord.input.rootNote = result[1];\n\n\t\tif (result[2]) {\n\t\t\tchord.input.descriptor = result[2];\n\t\t}\n\t\tif (result[4]) {\n\t\t\tchord.input.bassNote = result[4];\n\t\t}\n\t\treturn chord;\n\t} else {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n}\n", "const allModifiers = {\n\t// base\n\tma: 'ma',\n\tmi: 'mi',\n\tdim: 'dim',\n\thalfDim: 'halfDim',\n\taug: 'aug',\n\tseventh: 'seventh',\n\n\t// suspended\n\tsus: 'sus',\n\tsus2: 'sus2',\n\n\t// extensions\n\tninth: 'ninth',\n\televenth: 'eleventh',\n\tthirteenth: 'thirteenth',\n\n\t// alterations\n\tfifthFlat: 'b5',\n\tfifthSharp: '#5',\n\tninthFlat: 'b9',\n\tninthSharp: '#9',\n\televenthSharp: '#11',\n\tthirteenthFlat: 'b13',\n\n\t// added\n\tadd3: 'add3',\n\tadd4: 'add4',\n\taddb6: 'addb6',\n\tadd6: 'add6',\n\tadd69: 'add69',\n\tadd7: 'add7',\n\tadd9: 'add9',\n\tadd11: 'add11',\n\tadd13: 'add13',\n\n\t// special\n\tbass: 'bass',\n\tomit3: 'omit3',\n\tomit5: 'omit5',\n\tpower: 'power',\n\talt: 'alt',\n};\n\n/**\n * WARNING: when adding new modifiers symbols, be careful of possible edge cases that might arise with some combinations.\n * For example, without edge case handling, \"madd9\" would be parsed as \"ma\" instead of \"m\"+\"add9\"\n */\n\nconst major = {\n\t'^': [allModifiers.ma, allModifiers.add7],\n\tΔ: [allModifiers.ma, allModifiers.add7],\n\tM: allModifiers.ma,\n\tMa: allModifiers.ma,\n\tMaj: allModifiers.ma,\n\tMajor: allModifiers.ma,\n\tma: allModifiers.ma,\n\tmaj: allModifiers.ma,\n\tmajor: allModifiers.ma,\n};\n\nconst major7th = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => symbol + '7'\n);\nconst add7 = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => 'add' + symbol + '7'\n);\n\nconst allSymbols = {\n\t// major\n\t...major,\n\t...major7th,\n\n\t// minor\n\t'-': allModifiers.mi,\n\tm: allModifiers.mi,\n\tMi: allModifiers.mi,\n\tMin: allModifiers.mi,\n\tMinor: allModifiers.mi,\n\tmi: allModifiers.mi,\n\tmin: allModifiers.mi,\n\tminor: allModifiers.mi,\n\n\t// diminished / augmented\n\t'°': allModifiers.dim,\n\to: allModifiers.dim,\n\t0: allModifiers.dim,\n\tdim: allModifiers.dim,\n\t'dim.': allModifiers.dim,\n\tdiminished: allModifiers.dim,\n\n\tØ: allModifiers.halfDim,\n\tø: allModifiers.halfDim,\n\th: allModifiers.halfDim,\n\n\t'+': allModifiers.aug,\n\taug: allModifiers.aug,\n\taugmented: allModifiers.aug,\n\n\t// seventh\n\t7: allModifiers.seventh,\n\n\t// suspended\n\t4: allModifiers.sus,\n\tsus: allModifiers.sus,\n\tsus4: allModifiers.sus,\n\tsuspended: allModifiers.sus,\n\tsuspended4: allModifiers.sus,\n\tsus2: allModifiers.sus2,\n\tsuspended2: allModifiers.sus2,\n\n\t// extensions\n\t9: allModifiers.ninth,\n\t11: allModifiers.eleventh,\n\t13: allModifiers.thirteenth,\n\n\t// alterations\n\tb3: allModifiers.mi,\n\tb5: allModifiers.fifthFlat,\n\t'♭5': allModifiers.fifthFlat,\n\t'#5': allModifiers.fifthSharp,\n\t'♯5': allModifiers.fifthSharp,\n\tb9: allModifiers.ninthFlat,\n\t'♭9': allModifiers.ninthFlat,\n\taddb9: allModifiers.ninthFlat,\n\t'add♭9': allModifiers.ninthFlat,\n\t'#9': allModifiers.ninthSharp,\n\t'♯9': allModifiers.ninthSharp,\n\t'add#9': allModifiers.ninthSharp,\n\t'add♯9': allModifiers.ninthSharp,\n\t'#11': allModifiers.eleventhSharp,\n\t'♯11': allModifiers.eleventhSharp,\n\t'add#11': allModifiers.eleventhSharp,\n\tb13: allModifiers.thirteenthFlat,\n\t'♭13': allModifiers.thirteenthFlat,\n\taddb13: allModifiers.thirteenthFlat,\n\t'add♭13': allModifiers.thirteenthFlat,\n\n\t// added\n\t...add7,\n\t2: allModifiers.add9,\n\tadd2: allModifiers.add9,\n\tadd3: allModifiers.add3,\n\tadd4: allModifiers.add4,\n\taddb6: allModifiers.addb6,\n\tb6: allModifiers.addb6,\n\t6: allModifiers.add6,\n\tadd6: allModifiers.add6,\n\t'6/9': allModifiers.add69,\n\t69: allModifiers.add69,\n\t96: allModifiers.add69,\n\t'9/6': allModifiers.add69,\n\tadd9: allModifiers.add9,\n\tadd11: allModifiers.add11,\n\tadd13: allModifiers.add13,\n\n\t// special\n\tbass: allModifiers.bass,\n\tomit3: allModifiers.omit3,\n\tno3: allModifiers.omit3,\n\tomit5: allModifiers.omit5,\n\tno5: allModifiers.omit5,\n\t5: allModifiers.power,\n\talt: allModifiers.alt,\n\t'alt.': allModifiers.alt,\n\taltered: allModifiers.alt,\n};\n\nfunction getDerivedModifiers(source, modifierId, derivedFn) {\n\treturn Object.keys(source)\n\t\t.map(derivedFn)\n\t\t.reduce((acc, curr) => {\n\t\t\tacc[curr] = modifierId;\n\t\t\treturn acc;\n\t\t}, {});\n}\n\nconst allVariants = Object.keys(allSymbols).sort((a, b) => b.length - a.length);\n\nexport { allSymbols, allVariants };\nexport default allModifiers;\n", "export default {\n\t1: 0,\n\t2: 2,\n\tb3: 3,\n\t3: 4,\n\t4: 5,\n\tb5: 6,\n\t5: 7,\n\t'#5': 8,\n\tb6: 8,\n\t6: 9,\n\tbb7: 9,\n\tb7: 10,\n\t7: 11,\n\tb9: 13,\n\t9: 14,\n\t'#9': 15,\n\t11: 17,\n\t'#11': 18,\n\tb13: 20,\n\t13: 21,\n};\n", "import _uniq from 'lodash/uniq';\nimport {\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n} from '../../helpers/ChordParsingError';\n\nimport m from '../../dictionaries/modifiers';\nimport { allSymbols, allVariants } from '../../dictionaries/modifiers';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\nimport { hasNoneOf, hasOneOf } from '../../helpers/hasElement';\n\n/**\n * Convert the descriptor into a suite of intervals, semitones and intents\n *\n * @param {Array<('b5'|'#5'|'b9'|'#9'|'#11'|'b13')>} altIntervals\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function parseDescriptor(altIntervals, chord) {\n\tlet allModifiers = [];\n\n\tif (chord.input.parsableDescriptor) {\n\t\tallModifiers = getModifiers(chord);\n\t}\n\n\tchord.input.modifiers = allModifiers;\n\tchord.normalized.intervals = getIntervals(allModifiers, altIntervals);\n\tchord.normalized.semitones = getSemitones(chord.normalized.intervals);\n\tchord.normalized.intents = getIntents(allModifiers);\n\n\treturn chord;\n}\n\nfunction getModifiers(chord) {\n\tconst { parsableDescriptor } = chord.input;\n\tconst modifiers = [];\n\n\tconst descriptorRegex = new RegExp(\n\t\tallVariants.map(escapeRegex).join('|'),\n\t\t'g'\n\t);\n\tconst descriptorMatches = parsableDescriptor.match(descriptorRegex);\n\n\tlet remainingChars = parsableDescriptor;\n\tlet allModifiersId;\n\n\tif (descriptorMatches) {\n\t\tdescriptorMatches.forEach((match) => {\n\t\t\tallModifiersId = allSymbols[match];\n\n\t\t\tif (!Array.isArray(allModifiersId)) {\n\t\t\t\tallModifiersId = [allModifiersId];\n\t\t\t}\n\n\t\t\tallModifiersId.forEach((modifierId) => {\n\t\t\t\tif (modifiers.includes(modifierId)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmodifiers.push(modifierId);\n\n\t\t\t\tremainingChars = remainingChars.replace(match, '');\n\t\t\t});\n\t\t});\n\t}\n\n\tif (modifiers.length === 0) {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n\tif (remainingChars.trim().length > 0) {\n\t\tthrow new InvalidModifierError(chord, remainingChars);\n\t}\n\n\treturn modifiers;\n}\n\nfunction getIntervals(allModifiers, altIntervals) {\n\tif (allModifiers.includes(m.power)) {\n\t\treturn ['1', '5'];\n\t} else if (allModifiers.includes(m.bass)) {\n\t\treturn ['1'];\n\t}\n\n\treturn _uniq([\n\t\t'1',\n\t\t...getThird(allModifiers),\n\t\t...getFourth(allModifiers),\n\t\t...getFifths(allModifiers, altIntervals),\n\t\t...getSixth(allModifiers),\n\t\t...getSevenths(allModifiers),\n\t\t...getNinths(allModifiers, altIntervals),\n\t\t...getElevenths(allModifiers, altIntervals),\n\t\t...getThirteenths(allModifiers, altIntervals),\n\t]).sort((a, b) => intervalsToSemitones[a] - intervalsToSemitones[b]);\n}\n\nfunction getThird(allModifiers) {\n\tconst third = [];\n\tif (allModifiers.includes(m.omit3)) {\n\t\treturn [];\n\t}\n\tif (!hasOneOf(allModifiers, [m.sus, m.sus2])) {\n\t\tif (!hasMajorIntent(allModifiers)) {\n\t\t\tthird.push('b3');\n\t\t} else if (!allModifiers.includes(m.eleventh)) {\n\t\t\tthird.push('3');\n\t\t}\n\t}\n\tif (allModifiers.includes(m.add3)) {\n\t\tthird.push('3');\n\t}\n\treturn third;\n}\n\nfunction getFourth(allModifiers) {\n\tconst fourth = [];\n\tif (hasOneOf(allModifiers, [m.sus, m.add4])) {\n\t\tfourth.push('4');\n\t}\n\treturn fourth;\n}\n\nfunction getFifths(allModifiers, altIntervals) {\n\tconst fifths = [];\n\tif (allModifiers.includes(m.omit5)) {\n\t\treturn [];\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.dim, m.halfDim, m.fifthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b5')\n\t) {\n\t\tfifths.push('b5');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.aug, m.fifthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#5')\n\t) {\n\t\tfifths.push('#5');\n\t}\n\tif (!fifths.length && !allModifiers.includes(m.thirteenthFlat)) {\n\t\tfifths.push('5');\n\t}\n\treturn fifths;\n}\n\nfunction getSixth(allModifiers) {\n\tconst sixth = [];\n\tif (hasOneOf(allModifiers, [m.addb6])) {\n\t\tsixth.push('b6');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t!isExtended(allModifiers) &&\n\t\t!hasOneOf(allModifiers, [m.halfDim])\n\t) {\n\t\tsixth.push('6');\n\t}\n\treturn sixth;\n}\n\nfunction getSevenths(allModifiers) {\n\tconst sevenths = [];\n\tif (hasOneOf(allModifiers, [m.alt])) {\n\t\tsevenths.push('b7');\n\t}\n\tif (hasOneOf(allModifiers, [m.seventh, m.halfDim])) {\n\t\tif (allModifiers.includes(m.dim)) {\n\t\t\tsevenths.push('bb7');\n\t\t} else if (allModifiers.includes(m.halfDim)) {\n\t\t\tsevenths.push('b7');\n\t\t} else {\n\t\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t\t}\n\t} else if (hasOneOf(allModifiers, [m.ninth, m.eleventh, m.thirteenth])) {\n\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t}\n\tif (allModifiers.includes(m.add7)) {\n\t\tsevenths.push('7');\n\t}\n\treturn sevenths;\n}\n\nfunction getMinorOrMajorSeventh(allModifiers) {\n\treturn allModifiers.includes(m.ma) ? '7' : 'b7';\n}\n\nfunction getNinths(allModifiers, altIntervals) {\n\tconst ninth = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add69, m.ninth, m.eleventh, m.thirteenth]) &&\n\t\thasNoneOf(allModifiers, [m.ninthFlat, m.ninthSharp])\n\t) {\n\t\tninth.push('9');\n\t}\n\tif (hasOneOf(allModifiers, [m.sus2, m.add9])) {\n\t\tninth.push('9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b9')\n\t) {\n\t\tninth.push('b9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#9')\n\t) {\n\t\tninth.push('#9');\n\t}\n\treturn ninth;\n}\n\nfunction getElevenths(allModifiers, altIntervals) {\n\tconst elevenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenth]) &&\n\t\t!hasMajorIntent(allModifiers)\n\t) {\n\t\televenths.push('11');\n\t} else if (hasOneOf(allModifiers, [m.eleventh, m.add11])) {\n\t\televenths.push('11');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.eleventhSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#11')\n\t) {\n\t\televenths.push('#11');\n\t}\n\treturn elevenths;\n}\n\nfunction getThirteenths(allModifiers, altIntervals) {\n\tconst thirteenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add13, m.thirteenth]) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\tisExtended(allModifiers)) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\thasOneOf(allModifiers, [m.halfDim]))\n\t) {\n\t\tthirteenths.push('13');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b13')\n\t) {\n\t\tthirteenths.push('b13');\n\t}\n\treturn thirteenths;\n}\n\nfunction shouldAlter(allModifiers, altIntervals, interval) {\n\treturn allModifiers.includes(m.alt) && altIntervals.includes(interval);\n}\n\nfunction hasMajorIntent(allModifiers) {\n\treturn hasNoneOf(allModifiers, [m.mi, m.dim, m.dim7, m.halfDim]);\n}\n\nfunction isExtended(allModifiers) {\n\treturn hasOneOf(allModifiers, [\n\t\tm.seventh,\n\t\tm.ninth,\n\t\tm.eleventh,\n\t\tm.thirteenth,\n\t]);\n}\n\n// Based on https://stackoverflow.com/a/6969486\nfunction escapeRegex(string) {\n\treturn string.replace(/[.\\-*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction getSemitones(allIntervals) {\n\treturn allIntervals\n\t\t.map((interval) => intervalsToSemitones[interval])\n\t\t.sort((a, b) => a - b);\n}\n\n// intents will be used later at formatting for disambiguation of some potentially confusing cases\nfunction getIntents(allModifiers) {\n\treturn {\n\t\tmajor: hasMajorIntent(allModifiers),\n\t\televenth: allModifiers.includes(m.eleventh),\n\t\talt: allModifiers.includes(m.alt),\n\t};\n}\n", "import chain from '../helpers/chain';\nimport _cloneDeep from 'lodash/cloneDeep';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport { allVariantsPerGroup } from '../dictionaries/notes';\n\nimport {\n\tInvalidInputError,\n\tUnexpectedError,\n} from '../helpers/ChordParsingError';\n\nimport checkIntervalsConsistency from './filters/checkIntervalsConsistency';\nimport formatSymbol from './filters/formatSymbol';\nimport formatSymbolParts from './filters/formatSymbolParts';\nimport getParsableDescriptor from './filters/getParsableDescriptor';\nimport initChord from './filters/initChord';\nimport nameIndividualChordNotes from './filters/nameIndividualChordNotes';\nimport normalizeNotes from './filters/normalizeNotes';\nimport normalizeDescriptor from './filters/normalizeDescriptor';\nimport parseBase from './filters/parseBase';\nimport parseDescriptor from './filters/parseDescriptor';\n\n/**\n * Create a chord parser function\n * @param {ParserConfiguration} [parserConfiguration]\n * @returns {function(String): Chord}\n */\nfunction chordParserFactory(parserConfiguration = {}) {\n\tconst allAltIntervals = ['b5', '#5', 'b9', '#9', '#11', 'b13'];\n\tconst allNotationSystems = ['english', 'german', 'latin'];\n\n\tconst {\n\t\tnotationSystems = _cloneDeep(allNotationSystems),\n\t\taltIntervals = _cloneDeep(allAltIntervals),\n\t\tcustomFilters = [],\n\t} = parserConfiguration;\n\n\tcheckAltIntervals(altIntervals, allAltIntervals);\n\tcheckNotationSystems(notationSystems, allNotationSystems);\n\tcheckCustomFilters(customFilters);\n\n\treturn parseChord;\n\n\t/**\n\t * Convert an input string into an abstract chord structure\n\t * @param {String} symbol - the chord symbol candidate\n\t * @returns {Chord|Object} A chord object if the given string is successfully parsed. An object with an `error` property otherwise.\n\t */\n\tfunction parseChord(symbol) {\n\t\tconst allErrors = [];\n\n\t\tif (!isInputValid(symbol)) {\n\t\t\tconst e = new InvalidInputError();\n\t\t\tallErrors.push(formatError(e));\n\t\t}\n\n\t\tconst allVariantsPerGroupCopy = _cloneDeep(allVariantsPerGroup).filter(\n\t\t\t(variantsGroup) => notationSystems.includes(variantsGroup.name)\n\t\t);\n\n\t\tlet chord;\n\t\tlet allFilters;\n\t\tlet variants;\n\n\t\tif (!allErrors.length) {\n\t\t\twhile (allVariantsPerGroupCopy.length && !chord) {\n\t\t\t\tvariants = allVariantsPerGroupCopy.shift();\n\n\t\t\t\tallFilters = [\n\t\t\t\t\tinitChord.bind(null, parserConfiguration),\n\t\t\t\t\tparseBase.bind(null, variants.notes),\n\t\t\t\t\tgetParsableDescriptor,\n\t\t\t\t\tparseDescriptor.bind(null, altIntervals),\n\t\t\t\t\tcheckIntervalsConsistency,\n\t\t\t\t\tnormalizeNotes,\n\t\t\t\t\tnormalizeDescriptor,\n\t\t\t\t\tformatSymbolParts,\n\t\t\t\t\tformatSymbol,\n\t\t\t\t\tnameIndividualChordNotes,\n\t\t\t\t\t...customFilters,\n\t\t\t\t];\n\n\t\t\t\ttry {\n\t\t\t\t\tchord = chain(allFilters, symbol);\n\t\t\t\t\tif (chord) {\n\t\t\t\t\t\tchord.input.notationSystem = variants.name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tallErrors.push(getUnexpectedError(variants.name));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tallErrors.push(formatError(e, variants.name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chord ? chord : { error: allErrors };\n\t}\n}\n\nfunction checkAltIntervals(altIntervals, allAltIntervals) {\n\tcheckArray('altIntervals', altIntervals, allAltIntervals, true);\n}\n\nfunction checkNotationSystems(notationSystems, allNotationSystems) {\n\tcheckArray('notationSystems', notationSystems, allNotationSystems);\n}\n\nfunction checkArray(arrayName, arrayToTest, allowedValues, allowEmpty) {\n\tif (!Array.isArray(arrayToTest)) {\n\t\tthrow new TypeError(`'${arrayName}' should be an array`);\n\t}\n\tif (!allowEmpty && arrayToTest.length === 0) {\n\t\tthrow new TypeError(`'${arrayName}' cannot be empty`);\n\t}\n\tarrayToTest.forEach((system) => {\n\t\tif (!allowedValues.includes(system)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`'${system}' is not a valid value for ${arrayName}`\n\t\t\t);\n\t\t}\n\t});\n}\n\nfunction isInputValid(input) {\n\treturn typeof input === 'string' && input.length > 0;\n}\n\nfunction getUnexpectedError(notationSystem) {\n\tconst error = new UnexpectedError();\n\treturn formatError(error, notationSystem);\n}\n\nfunction formatError(exceptionError, notationSystem) {\n\treturn {\n\t\ttype: exceptionError.name,\n\t\tchord: exceptionError.chord,\n\t\tmessage: exceptionError.message,\n\t\tnotationSystem,\n\t};\n}\n\n/**\n * @module chordParserFactory\n * Expose the chordParserFactory() function\n */\nexport default chordParserFactory;\n", "import { hasExactly } from '../../helpers/hasElement';\n\nconst shortDescriptors = {\n\tsus2: 'sus2',\n\tadd2: '2',\n\tomit: 'no',\n\tma: 'M',\n\tmi: 'm',\n\tdim: '°',\n\taug7: '7+',\n\televenth: '11',\n};\n\n/**\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function shortenNormalized(chord) {\n\tlet descriptor;\n\tlet chordChanges = chord.formatted.chordChanges;\n\n\tif (isSus2(chord)) {\n\t\tdescriptor = shortDescriptors.sus2;\n\t\tchordChanges = [];\n\t} else if (isAdd2(chord)) {\n\t\tdescriptor = shortDescriptors.add2;\n\t\tchordChanges = [];\n\t} else if (isAug7(chord)) {\n\t\tdescriptor = shortDescriptors.aug7;\n\t\tchordChanges = [];\n\t} else {\n\t\tdescriptor = chord.formatted.descriptor\n\t\t\t.replace('mi', shortDescriptors.mi)\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('dim', shortDescriptors.dim);\n\n\t\tif (isEleventh(chord)) {\n\t\t\tdescriptor = descriptor.replace(\n\t\t\t\t/7sus|9sus/,\n\t\t\t\tshortDescriptors.eleventh\n\t\t\t);\n\t\t}\n\t}\n\n\tchordChanges = chordChanges.map((change) => {\n\t\treturn change\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('omit', shortDescriptors.omit);\n\t});\n\n\treturn {\n\t\t...chord,\n\t\tformatted: {\n\t\t\t...chord.formatted,\n\t\t\tdescriptor,\n\t\t\tchordChanges,\n\t\t},\n\t};\n}\n\nfunction isSus2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '5', '9']);\n}\n\nfunction isAdd2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '5', '9']);\n}\n\nfunction isAug7(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '#5', 'b7']);\n}\n\nfunction isEleventh(chord) {\n\treturn chord.normalized.intents.eleventh;\n}\n", "import _difference from 'lodash/difference';\n\nimport chain from '../../helpers/chain';\n\nimport normalizeDescriptor from '../../parser/filters/normalizeDescriptor';\nimport formatSymbolParts from '../../parser/filters/formatSymbolParts';\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\n\nimport { hasNoneOf } from '../../helpers/hasElement';\n\n/**\n * @param {Chord} chord\n * @param {('none'|'max'|'core')} level\n * @returns {Chord}\n */\nexport default function simplify(level = 'none', chord) {\n\tif (level === 'none') {\n\t\treturn chord;\n\t}\n\n\tconst intervalsToRemove = {\n\t\tmax: [\n\t\t\t'4',\n\t\t\t'b5',\n\t\t\t'#5',\n\t\t\t'6',\n\t\t\t'bb7',\n\t\t\t'b7',\n\t\t\t'7',\n\t\t\t'b9',\n\t\t\t'9',\n\t\t\t'#9',\n\t\t\t'11',\n\t\t\t'#11',\n\t\t\t'b13',\n\t\t\t'13',\n\t\t],\n\t\tcore: ['4', 'b9', '9', '#9', '11', '#11', 'b13', '13'],\n\t};\n\n\tconst intervals = _difference(\n\t\tchord.normalized.intervals,\n\t\tintervalsToRemove[level]\n\t);\n\n\tif (hasNoneOf(intervals, ['b3', '3'])) {\n\t\tintervals.push(chord.normalized.intents.major ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5'])) {\n\t\tintervals.push('5');\n\t}\n\n\tchord.normalized.intervals = intervals;\n\tchord.normalized.semitones = intervals.map(\n\t\t(interval) => intervalsToSemitones[interval]\n\t);\n\tchord.normalized.intents.eleventh = false;\n\tchord.normalized.intents.alt = false;\n\n\tif (level === 'max') {\n\t\tdelete chord.normalized.bassNote;\n\t}\n\n\tconst allFilters = [\n\t\tnormalizeDescriptor,\n\t\tformatSymbolParts,\n\t\tnameIndividualChordNotes,\n\t];\n\n\treturn chain(allFilters, chord);\n}\n", "import _invert from 'lodash/invert';\n\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\n\nconst notes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'];\n\nconst sharpsToFlats = {\n\t'C#': 'Db',\n\t'D#': 'Eb',\n\t'F#': 'Gb',\n\t'G#': 'Ab',\n\t'A#': 'Bb',\n};\n\nconst flatsToSharps = _invert(sharpsToFlats);\n\nexport default function transpose(transposeValue, useFlats, chord) {\n\tconst { rootNote, bassNote } = chord.normalized;\n\n\tconst rootSharp = convertToSharp(rootNote);\n\tchord.normalized.rootNote = transposeNote(\n\t\trootSharp,\n\t\ttransposeValue,\n\t\tuseFlats\n\t);\n\tchord.formatted.rootNote = chord.normalized.rootNote;\n\n\tif (bassNote) {\n\t\tconst bassSharp = convertToSharp(bassNote);\n\t\tchord.normalized.bassNote = transposeNote(\n\t\t\tbassSharp,\n\t\t\ttransposeValue,\n\t\t\tuseFlats\n\t\t);\n\t\tchord.formatted.bassNote = chord.normalized.bassNote;\n\t}\n\n\treturn nameIndividualChordNotes(chord);\n}\n\nfunction transposeNote(note, value, useFlats) {\n\tconst noteIndex = notes.indexOf(note);\n\tconst transposedIndex = noteIndex + value;\n\n\tconst octaves = Math.floor(transposedIndex / 12);\n\tconst correctedTransposedIndex = transposedIndex - octaves * 12;\n\n\tconst transposed = notes[correctedTransposedIndex];\n\n\treturn useFlats ? sharpsToFlats[transposed] || transposed : transposed;\n}\n\nfunction convertToSharp(note) {\n\treturn flatsToSharps[note] || note;\n}\n", "const translationTables = {\n\tgerman: {\n\t\tAb: 'As',\n\t\tA: 'A',\n\t\t'A#': 'Ais',\n\t\tBb: 'Hes',\n\t\tB: 'H',\n\t\tC: 'C',\n\t\t'C#': 'Cis',\n\t\tDb: 'Des',\n\t\tD: 'D',\n\t\t'D#': 'Dis',\n\t\tEb: 'Es',\n\t\tE: 'E',\n\t\tF: 'F',\n\t\t'F#': 'Fis',\n\t\tGb: 'Ges',\n\t\tG: 'G',\n\t\t'G#': 'Gis',\n\t},\n\tlatin: {\n\t\tAb: 'Lab',\n\t\tA: 'La',\n\t\t'A#': 'La#',\n\t\tBb: 'Sib',\n\t\tB: 'Si',\n\t\tC: 'Do',\n\t\t'C#': 'Do#',\n\t\tDb: 'Reb',\n\t\tD: 'Re',\n\t\t'D#': 'Re#',\n\t\tEb: 'Mib',\n\t\tE: 'Mi',\n\t\tF: 'Fa',\n\t\t'F#': 'Fa#',\n\t\tGb: 'Solb',\n\t\tG: 'Sol',\n\t\t'G#': 'Sol#',\n\t},\n};\nconst allNotationSystems = Object.keys(translationTables);\n\n/**\n * @param {('auto'|'english'|'german'|'latin')} notationSystem\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function convertNotationSystem(\n\tnotationSystem = 'english',\n\tchord\n) {\n\tconst finalNotationSystem =\n\t\tnotationSystem === 'auto' ? chord.input.notationSystem : notationSystem;\n\n\tif (finalNotationSystem === 'english') return chord;\n\tif (!allNotationSystems.includes(finalNotationSystem)) return null;\n\n\tchord.formatted.rootNote =\n\t\ttranslationTables[finalNotationSystem][chord.formatted.rootNote];\n\n\tif (chord.formatted.bassNote) {\n\t\tchord.formatted.bassNote =\n\t\t\ttranslationTables[finalNotationSystem][chord.formatted.bassNote];\n\t}\n\treturn chord;\n}\n", "/**\n * @param {Chord} chord\n * @returns {String}\n */\nexport default function textPrinter(chord) {\n\treturn chord && chord.formatted && chord.formatted.symbol\n\t\t? chord.formatted.symbol\n\t\t: null;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport textPrinter from './text';\nimport chordParserFactory from '../../parser/chordParserFactory';\n\n/**\n * This printer returns a `chord` object reflecting the applied rendering filters. This object is very close to what would\n * be obtained by re-parsing the rendered chord.\n * It is basically the `chord` object in its current state, with 2 differences:\n * - a re-built `input` property to include all the changes applied during rendering (transposition, simplification, etc.)\n * - a removed `notationSystems` parser configuration since it may not be relevant anymore, especially if the rendering changed the notation system\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function rawPrinter(chord) {\n\t// make sure the chord can be re-parsed, whichever notation system was used for the rendering\n\tdelete chord.parserConfiguration.notationSystems;\n\n\tconst cloned = _cloneDeep(chord);\n\n\t// Re-parse the rendered chord to get the 'input' property right\n\tconst textPrinted = textPrinter(chord);\n\tconst parseChord = chordParserFactory(chord.parserConfiguration);\n\tconst reParsed = parseChord(textPrinted);\n\tcloned.input = reParsed.input;\n\n\treturn cloned;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport chain from '../helpers/chain';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport shortenNormalized from './filters/shortenNormalized';\nimport simplifyFilter from './filters/simplify';\nimport transpose from './filters/transpose';\nimport convertNotationSystem from './filters/convertNotationSystem';\nimport formatSymbol from '../parser/filters/formatSymbol';\nimport textPrinter from './printer/text';\nimport rawPrinter from './printer/raw';\n\n/**\n * Create a pre-configured chord rendering function\n * @param {RendererConfiguration} [rendererConfiguration]\n * @returns {function(Chord): String}\n */\nfunction chordRendererFactory({\n\tuseShortNamings = false,\n\tsimplify = 'none',\n\ttransposeValue = 0,\n\tharmonizeAccidentals = false,\n\tuseFlats = false,\n\tprinter = 'text',\n\tnotationSystem = 'english',\n\tcustomFilters = [],\n} = {}) {\n\tcheckCustomFilters(customFilters);\n\n\tconst allFilters = [];\n\n\tif (['max', 'core'].includes(simplify)) {\n\t\tallFilters.push(simplifyFilter.bind(null, simplify));\n\t}\n\n\tif (harmonizeAccidentals || transposeValue !== 0) {\n\t\tallFilters.push(transpose.bind(null, transposeValue, useFlats));\n\t}\n\n\tif (useShortNamings) {\n\t\tallFilters.push(shortenNormalized);\n\t}\n\n\tallFilters.push(\n\t\tconvertNotationSystem.bind(null, notationSystem),\n\t\tformatSymbol,\n\t\t...customFilters\n\t);\n\n\treturn renderChord;\n\n\t/**\n\t * Render a chord structure\n\t * @param {Chord} chord - the chord structure to render\n\t * @returns {String|Chord} output depends on the selected printer: string for text printer (default), Chord for raw printer\n\t */\n\tfunction renderChord(chord) {\n\t\tif (!isValidChord(chord)) {\n\t\t\treturn null;\n\t\t}\n\t\tconst filteredChord = chain(allFilters, _cloneDeep(chord));\n\n\t\treturn printer === 'raw'\n\t\t\t? rawPrinter(filteredChord)\n\t\t\t: textPrinter(filteredChord);\n\t}\n}\n\nconst isValidChord = (chord) => {\n\treturn chord && typeof chord === 'object' && !chord.error && chord.input;\n};\n\n/**\n * @module chordRendererFactory\n * Expose the chordRendererFactory() function\n **/\nexport default chordRendererFactory;\n", "import './typedefs';\n\nimport chordParserFactory from './parser/chordParserFactory';\nimport chordRendererFactory from './renderer/chordRendererFactory';\n\nexport { chordParserFactory, chordRendererFactory };\n", "import Promise from 'promise';\nimport { Playlist, Song, Cell, Chord } from './parser.js';\nimport { Converter, LogLevel } from './converter.js';\nimport { Version } from './version.js';\n\nexport function convertSync(ireal, options = {}) {\n const playlist = new Playlist(ireal);\n playlist.songs.forEach(song => {\n song.musicXml = Converter.convert(song, options);\n });\n return playlist;\n}\n\nexport async function convert(ireal, options = {}) {\n return new Promise(resolve => resolve(convertSync(ireal, options)));\n}\n\nexport { Playlist, Song, Cell, Chord, Converter, LogLevel, Version };\n", "/**\n * The iReal Pro parser is derived from\n * https://github.com/daumling/ireal-renderer\n * which is itself derived from\n * https://github.com/pianosnake/ireal-reader\n *\n * None of those modules did exactly what is needed here, namely return\n * a full structure that can be iterated downstream.\n */\n\nimport diff from 'fast-diff';\n\nexport class Playlist {\n constructor(ireal){\n const playlistEncoded = /.*?(irealb(?:ook)?):\\/\\/([^\"]*)/.exec(ireal);\n const playlist = decodeURIComponent(playlistEncoded[2]);\n const parts = playlist.split(\"===\"); //songs are separated by ===\n if (parts.length > 1) this.name = parts.pop(); //playlist name\n this.songs = parts\n .map(part => {\n try {\n return new Song(part, playlistEncoded[1] === 'irealbook');\n }\n catch (error) {\n const parts = part.split(\"=\");\n const title = Song.parseTitle(parts[0].trim());\n console.error(`[ireal-musicxml] [${title}] ${error}`);\n return null;\n }\n })\n .filter(song => song !== null)\n .reduce((songs, song) => {\n if (songs.length > 0) {\n // Detect multi-part songs via their titles.\n // The parts of the same song have the same title, except for the part number, so they follow each other in the list.\n // The `diff` module compares two titles and returns a list of similarities and differences.\n // We expect the first diff to be a similarity, followed by differences that are only numeric.\n // When we find a multi-part song, we just concatenate the cells into the first part.\n const diffs = diff(songs[songs.length-1].title, song.title);\n if (diffs[0][0] === 0 && diffs.every(d => d[0] === 0 || d[1].match(/^\\d+$/))) {\n songs[songs.length-1].cells = songs[songs.length-1].cells.concat(song.cells);\n return songs;\n }\n }\n songs.push(song);\n return songs;\n }, []);\n }\n}\n\nexport class Cell {\n constructor() {\n this.annots = [];\n this.comments = [];\n this.bars = \"\";\n this.spacer = 0;\n this.chord = null;\n }\n}\n\nexport class Chord {\n constructor(note, modifiers = \"\", over = null, alternate = null) {\n this.note = note;\n this.modifiers = modifiers;\n this.over = over;\n this.alternate = alternate;\n }\n}\n\nexport class Song {\n constructor(ireal, oldFormat = false) {\n this.cells = [];\n this.musicXml = \"\";\n if (!ireal) {\n this.title = \"\";\n this.composer = \"\";\n this.style = \"\";\n this.key = \"\";\n this.transpose = 0;\n this.groove = \"\";\n this.bpm = 0;\n this.repeats = 0;\n return;\n }\n const parts = ireal.split(\"=\"); //split on one sign, remove the blanks\n if (oldFormat) {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[2].trim();\n this.key = parts[3];\n this.cells = this.parse(parts[5]);\n }\n else {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[3].trim();\n this.key = parts[4];\n this.transpose = +parts[5] || 0; // TODO\n this.groove = parts[7];\n this.bpm = +parts[8];\n this.repeats = +parts[9] || 3;\n const music = parts[6].split(\"1r34LbKcu7\");\n this.cells = this.parse(unscramble(music[1]));\n }\n }\n\n /**\n * The RegExp for a complete chord. The match array contains:\n * 1 - the base note\n * 2 - the modifiers (+-ohd0123456789 and su for sus)\n * 3 - any comments (may be e.g. add, sub, or private stuff)\n * 4 - the \"over\" part starting with a slash\n * 5 - the top chord as (chord)\n * @type RegExp\n */\n static chordRegex = /^([A-G][b#]?)((?:sus|alt|add|[+\\-^\\dhob#])*)(\\*.+?\\*)*(\\/[A-G][#b]?)?(\\(.*?\\))?/;\n static chordRegex2 = /^([ Wp])()()(\\/[A-G][#b]?)?(\\(.*?\\))?/;\t// need the empty captures to match chordRegex\n\n static regExps = [\n /^\\*[a-zA-Z]/,\t\t\t\t\t\t\t// section\n /^T\\d\\d/,\t\t\t\t\t\t\t\t// time measurement\n /^N./,\t\t\t\t\t\t\t\t\t// repeat marker\n /^<.*?>/,\t\t\t\t\t\t\t\t// comments\n Song.chordRegex,\t\t\t\t// chords\n Song.chordRegex2,\t\t\t\t// space, W and p (with optional alt chord)\n ];\n\n /**\n * The parser cracks up the raw music string into several objects,\n * one for each cell. iReal Pro works with rows of 16 cell each. The result\n * is stored at song.cells.\n *\n * Each object has the following properties:\n *\n * chord: if non-null, a chord object with these properties:\n * note - the base note (also blank, W = invisible root, p/x/r - pause/bar repeat/double-bar repeat, n - no chord)\n * modifiers - the modifiers, like 7, + o etc (string)\n * over - if non-null, another chord object for the under-note\n * alternate - if non-null another chord object for the alternate chord\n * annots: annotations, a string of:\n * *x - section, like *v, *I, *A, *B etc\n * Nx - repeat bots (N1, N2 etc)\n * Q - coda\n * S - segno\n * Txx - measure (T44 = 4/4 etc, but T12 = 12/8)\n * U - END\n * f - fermata\n * l - (letter l) normal notes\n * s - small notes\n * comments: an array of comment strings\n * bars: bar specifiers, a string of:\n * | - single vertical bar, left\n * [ - double bar, left\n * ] - double bar, right\n * { - repeat bar, left\n * } - repeat bar, right\n * Z - end bar, right\n * spacer - a number indicating the number of vertical spacers above this cell\n *\n * @returns [Cell]\n */\n parse(ireal) {\n let text = ireal.trim();\n const arr = [];\n while (text) {\n let found = false;\n for (let i = 0; i < Song.regExps.length; i++) {\n const match = Song.regExps[i].exec(text);\n if (match) {\n found = true;\n if (match.length <= 2) {\n arr.push(match[0]);\n text = text.substr(match[0].length);\n }\n else {\n // a chord\n arr.push(match);\n text = text.substr(match[0].length);\n }\n break;\n }\n }\n if (!found) {\n // ignore the comma separator\n if (text[0] !== ',')\n arr.push(text[0]);\n text = text.substr(1);\n }\n }\n\n // pass 2: extract prefixes, suffixes, annotations and comments\n const cells = [];\n let obj = this.newCell(cells);\n let prevobj = null;\n for (let i = 0; i < arr.length; i++) {\n let cell = arr[i];\n if (cell instanceof Array) {\n obj.chord = this.parseChord(cell);\n cell = \" \";\n }\n switch (cell[0]) {\n case '{':\t// open repeat\n case '[':\t// open double bar\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = cell; cell = null; break;\n case '|':\t// single bar - close previous and open this\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = '('; cell = null; break;\n case ']':\t// close double bar\n case '}':\t// close repeat\n case 'Z':\t// ending double bar\n if (prevobj) { prevobj.bars += cell; prevobj = null; }\n cell = null; break;\n case 'n':\t// N.C.\n obj.chord = new Chord(cell[0]);\n break;\n case ',':\tcell = null; break; // separator\n case 'S':\t// segno\n case 'T':\t// time measurement\n case 'Q':\t// coda\n case 'N':\t// repeat\n case 'U':\t// END\n case 's':\t// small\n case 'l':\t// normal\n case 'f':\t// fermata\n case '*': obj.annots.push(cell); cell = null; break;\n case 'Y': obj.spacer++; cell = null; prevobj = null; break;\n case 'r':\n case 'x':\n case 'W':\n obj.chord = new Chord(cell);\n break;\n case '<':\n cell = cell.substr(1, cell.length-2);\n obj.comments.push(cell);\n cell = null; break;\n default:\n }\n if (cell && i < arr.length-1) {\n prevobj = obj;\t\t// so we can add any closing barline later\n obj = this.newCell(cells);\n }\n }\n return cells;\n }\n\n /**\n * The title had \"A\" and \"The\" at the back (e.g. \"Gentle Rain, The\")\n */\n static parseTitle(title) {\n return title.replace(/(.*)(, )(A|The)$/g, '$3 $1');\n }\n\n /**\n * The composer is reversed (last first) if it only has 2 names :shrug:\n */\n static parseComposer(composer) {\n const parts = composer.split(/(\\s+)/); // match and return spaces too\n if (parts.length == 3) { // [last, spaces, first]\n return parts[2] + parts[1] + parts[0];\n }\n return composer;\n }\n\n parseChord(chord) {\n var note = chord[1] || \" \";\n var modifiers = chord[2] || \"\";\n var comment = chord[3] || \"\";\n if (comment)\n modifiers += comment.substr(1, comment.length-2);\n var over = chord[4] || \"\";\n if (over[0] === '/')\n over = over.substr(1);\n var alternate = chord[5] || null;\n if (alternate) {\n chord = Song.chordRegex.exec(alternate.substr(1, alternate.length-2));\n if (!chord)\n alternate = null;\n else\n alternate = this.parseChord(chord);\n }\n // empty cell?\n if (note === \" \" && !alternate && !over)\n return null;\n if (over) {\n var offset = (over[1] === '#' || over[1] === 'b') ? 2 : 1;\n over = new Chord(over.substr(0, offset), over.substr(offset), null, null);\n }\n else\n over = null;\n return new Chord(note, modifiers, over, alternate);\n }\n\n newCell(cells) {\n var obj = new Cell;\n cells.push(obj);\n return obj;\n }\n}\n\n// Unscrambling hints from https://github.com/ironss/accompaniser/blob/master/irealb_parser.lua\n// Strings are broken up in 50 character segments. each segment undergoes character substitution addressed by obfusc50()\n// Note that a final part of length 50 or 51 is not scrambled.\n// Finally need to substitute for Kcl, LZ and XyQ.\nfunction unscramble(s) {\n let r = '', p;\n\n while (s.length > 51){\n p = s.substring(0, 50);\n s = s.substring(50);\n r = r + obfusc50(p);\n }\n r = r + s;\n // now undo substitution obfuscation\n r = r.replace(/Kcl/g, '| x').replace(/LZ/g, ' |').replace(/XyQ/g, ' ');\n return r;\n}\n\nfunction obfusc50(s) {\n // the first 5 characters are switched with the last 5\n const newString = s.split('');\n for (let i = 0; i < 5; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n // characters 10-24 are also switched\n for (let i = 10; i < 24; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n return newString.join('');\n}\n", "import jstoxml from 'jstoxml';\nimport ChordSymbol from 'chord-symbol';\nconst { chordParserFactory, chordRendererFactory } = ChordSymbol;\nimport { Version } from './version.js';\n\nexport class LogLevel {\n static Debug = 0;\n static Info = 1;\n static Warn = 2;\n static Error = 3;\n static None = 4;\n}\n\nconst MUSICXML_VERSION = '4.0';\nconst SCALING_MM = 7;\nconst SCALING_TENTHS = 40;\n\nexport class Converter {\n static defaultOptions = {\n 'divisions': 768, // same as used by iReal\n 'notation': 'rhythmic', // 'rhythmic' for rhythmic notation, 'slash' for slash notation\n 'step': 'B', // chord note\n 'octave': 4, // chord note octave\n 'notehead': 'slash', // chord note head\n 'noteheadSize': 'large', // size of chord note head\n 'date': true, // include encoding date\n 'clef': false, // hide clef by default\n 'keySignature': false, // hide key signature by default\n 'pageWidth': 210, // mm (A4)\n 'pageHeight': 297, // mm (A4)\n 'pageMargin': 15, // mm\n 'logLevel': LogLevel.Warn\n };\n\n static sequenceAttributes = [\n // Expected order of attribute elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/\n 'divisions',\n 'key',\n 'time',\n 'staves',\n 'part-symbol',\n 'instruments',\n 'clef',\n 'staff-details',\n 'transpose',\n 'directive',\n 'measure-style'\n ];\n\n static sequenceNote = [\n // Expected order of note elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/note/\n 'cue',\n 'pitch',\n 'rest',\n 'unpitched',\n 'duration',\n 'tie',\n 'voice',\n 'type',\n 'dot',\n 'accidental',\n 'time-modification',\n 'stem',\n 'notehead',\n 'notehead-text',\n 'staff',\n 'beam',\n 'notations',\n 'lyric',\n 'play'\n ];\n\n static sequenceNotations = [\n // Expected order of notations elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/notations/\n 'accidental-mark',\n 'arpeggiate',\n 'articulations',\n 'dynamics',\n 'fermata',\n 'glissando',\n 'non-arpeggiate',\n 'ornaments',\n 'other-notation',\n 'slide',\n 'slur',\n 'technical',\n 'tied',\n 'tuplet'\n ];\n\n static sequenceBarline = [\n // Expected order of barline elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/\n 'bar-style',\n 'footnote',\n 'level',\n 'wavy-line',\n 'segno',\n 'coda',\n 'fermata',\n 'ending',\n 'repeat'\n ];\n\n static mapAlter = {\n '#': 1,\n 'b': -1\n };\n\n static mapFifthsToAlters = {\n 'sharp': ['F', 'C', 'G', 'D', 'A', 'E', 'B'],\n 'flat': ['B', 'E', 'A', 'D', 'G', 'C', 'F']\n };\n\n static mapRepeats = {\n \"D.C. al Coda\": Converter.prototype.convertDaCapo,\n \"D.C. al Fine\": Converter.prototype.convertDaCapo,\n \"D.C. al 1st End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 2nd End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 3rd End.\": Converter.prototype.convertDaCapo,\n \"D.S. al Coda\": Converter.prototype.convertDalSegno,\n \"D.S. al Fine\": Converter.prototype.convertDalSegno,\n \"D.S. al 1st End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 2nd End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 3rd End.\": Converter.prototype.convertDalSegno,\n \"Fine\": Converter.prototype.convertFine,\n \"3x\": Converter.prototype.convertRepeatNx,\n \"4x\": Converter.prototype.convertRepeatNx,\n \"5x\": Converter.prototype.convertRepeatNx,\n \"6x\": Converter.prototype.convertRepeatNx,\n \"7x\": Converter.prototype.convertRepeatNx,\n \"8x\": Converter.prototype.convertRepeatNx\n };\n\n static convert(song, options = {}) {\n const realOptions = Object.assign({}, this.defaultOptions, options);\n return new Converter(song, realOptions).convert();\n }\n\n constructor(song, options) {\n this.song = song;\n this.options = options;\n this.time = { beats: 4, beatType: 4 };\n this.fifths = null; // key signature's degree of fifths\n this.measure = null; // current measure (of class Measure) being built\n this.barRepeat = 0; // current bar number for single- and double-bar repeats\n this.codas = []; // list of measures containing codas\n this.repeats = 0; // repeat count for closing repeat barline\n this.emptyCells = 0; // consecutive empty cells\n this.emptyCellNewSystem = false; // did a new system occur in an empty cell?\n\n // In iRP, there are 16 cells per line.\n // The width in mm of a single cell depends on the page width and the margins.\n this.cellWidth = (this.options.pageWidth - (2 * this.options.pageMargin)) / 16;\n\n // chord-symbol.\n this.parseChord = chordParserFactory({ \"altIntervals\": [\n \"b5\",\n \"b9\"\n ]});\n this.renderChord = chordRendererFactory({\n useShortNamings: true,\n printer: 'raw'\n });\n }\n\n convert() {\n return jstoxml.toXML(this.convertSong(), {\n header: `\n\n\n `.trim(),\n indent: ' '\n });\n }\n\n convertSong() {\n return {\n _name: 'score-partwise',\n _attrs: { 'version': MUSICXML_VERSION },\n _content: [{\n 'work': {\n 'work-title': this.song.title\n }\n }, {\n 'identification': [{\n _name: 'creator',\n _attrs: { 'type': 'composer' },\n _content: this.song.composer\n }, {\n 'encoding': [{\n 'software': `@infojunkie/ireal-musicxml ${Version.version}`\n }, { ...(this.options.date && {\n 'encoding-date': Converter.convertDate(new Date())\n })}, {\n _name: 'supports',\n _attrs: { 'element': 'accidental', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'element': 'transpose', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-page', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-system', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }]\n }]\n }, {\n 'defaults': {\n 'scaling': {\n 'millimeters': SCALING_MM,\n 'tenths': SCALING_TENTHS\n },\n 'page-layout': {\n 'page-height': Converter._mmToTenths(this.options.pageHeight),\n 'page-width': Converter._mmToTenths(this.options.pageWidth),\n 'page-margins': {\n 'left-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'right-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'top-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'bottom-margin': Converter._mmToTenths(this.options.pageMargin, 4)\n }\n }\n }\n }, {\n 'part-list': {\n _name: 'score-part',\n _attrs: { 'id': 'P1' },\n _content: {\n _name: 'part-name',\n _attrs: { 'print-object': 'no' },\n _content: 'Lead Sheet'\n }\n }\n }, {\n _name: 'part',\n _attrs: { 'id': 'P1' },\n _content: this.convertMeasures()\n }]\n };\n }\n\n // Date in yyyy-mm-dd\n // https://stackoverflow.com/a/50130338/209184\n static convertDate(date) {\n return new Date(date.getTime() - (date.getTimezoneOffset() * 60000))\n .toISOString()\n .split('T')[0];\n }\n\n static Measure = class {\n constructor(number) {\n this.body = {\n _name: 'measure',\n _attrs: { 'number': number },\n _content: []\n };\n this.attributes = [];\n this.chords = [];\n this.barlines = [];\n this.barEnding = null;\n }\n\n number() {\n return this.body['_attrs']['number'];\n }\n\n assemble() {\n // Attributes.\n if (this.attributes.length) {\n this.body['_content'].push({\n 'attributes': Converter.reorderSequence(this, this.attributes, Converter.sequenceAttributes)\n });\n }\n\n // Chords.\n this.chords.forEach(chord => {\n this.body['_content'].push({\n 'harmony': chord.harmony\n }, ...chord.notes.map(note => {\n return {\n 'note': note\n };\n }));\n });\n\n // Barlines.\n this.barlines[0]['_content'] = Converter.reorderSequence(this, this.barlines[0]['_content'], Converter.sequenceBarline);\n this.body['_content'].splice(1, 0, this.barlines[0]);\n this.barlines[1]['_content'] = Converter.reorderSequence(this, this.barlines[1]['_content'], Converter.sequenceBarline);\n this.body['_content'].push(this.barlines[1]);\n\n return this.body;\n }\n };\n\n static Chord = class {\n constructor(harmony, notes, ireal) {\n this.harmony = harmony;\n this.notes = notes;\n this.ireal = ireal;\n this.spaces = 0;\n this.fermata = false;\n }\n };\n\n convertMeasures() {\n // Are we starting a new system given the current cell index?\n const isNewSystem = cellIndex => cellIndex > 0 && cellIndex % 16 === 0;\n\n // Loop on cells.\n const measures = this.song.cells.reduce((measures, cell, cellIndex) => {\n // Start a new measure if needed.\n // This means either finding an opening barline or finding non-empty cells while we're not in any measure.\n if (cell.bars.match(/\\(|\\{|\\[/) || (!this.measure && (cell.chord || cell.annots.length || cell.comments.length))) {\n if (this.measure) {\n this._log(LogLevel.Warn, `Starting a new measure over existing measure. Closing current measure first.`);\n this.measure.barlines.push(this.convertBarline('', 'right'));\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n }\n this.measure = new Converter.Measure(measures.length+1, this.options);\n\n // Very first bar: add defaults.\n if (!measures.length) {\n this.measure.attributes.push({\n 'divisions': this.options.divisions\n }, {\n _name: 'clef',\n _attrs: [{ 'print-object': this.options.clef ? 'yes' : 'no' }],\n _content: [{\n 'sign': 'G'\n }, {\n 'line': 2\n }]\n }, {\n 'staff-details': {\n 'staff-lines': 0\n }\n }, {\n 'measure-style': [{\n _name: 'slash',\n _attrs: { 'type': 'start', 'use-stems': this.options.notation === 'rhythmic' ? 'yes' : 'no' }\n }]\n }, this.convertKey());\n\n // Add bpm if any.\n if (this.song.bpm) {\n this.measure.body['_content'].push(this.convertTempo(this.song.bpm));\n }\n\n // Add style and groove.\n this.measure.body['_content'].push(this.convertStyleAndGroove(this.song.style, this.song.groove));\n }\n\n // Add starting barline.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'left'));\n\n // If we're still repeating bars, copy the previous bar now.\n if (this.barRepeat) {\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat-1].chords];\n }\n }\n\n // Short-circuit loop if no measure exists.\n // It can happen that `measure` is still blank in case of empty cells in iReal layout.\n // e.g. Girl From Ipanema in tests.\n if (!this.measure) {\n if (cell.chord || cell.annots.length || cell.comments.length || (cell.bars && cell.bars !== ')')) {\n this._log(LogLevel.Warn, `Found non-empty orphan cell ${JSON.stringify(cell)}`, measures[measures.length-1]);\n }\n\n // This is an empty cell between measures.\n // Count the consecutive empty cells because they will be converted to margins.\n // Also remember that a new system has occurred.\n this.emptyCells++;\n if (isNewSystem(cellIndex)) {\n this.emptyCellNewSystem = true;\n }\n\n return measures;\n }\n\n // Start a new system every 16 cells.\n if (isNewSystem(cellIndex) || this.emptyCellNewSystem) {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _attrs: { 'new-system': 'yes' },\n _content: { ...(this.emptyCellNewSystem && {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }, {\n 'right-margin': '0.00'\n }]\n }\n })}\n });\n }\n\n // If we accumulated empty cells but not at the start of the current system, then we adjust other distances.\n // There are 2 cases to handle:\n // - We're now in a fresh system: Add a right-margin to the previous measure.\n // - We're in the middle of a system: Add a measure-distance to the current measure.\n if (!this.emptyCellNewSystem && this.emptyCells > 0) {\n if (this.measure.body['_content'][0]?.['_name'] === 'print' && this.measure.body['_content'][0]['_attrs']?.['new-system'] === 'yes') {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }]\n }\n }\n });\n }\n else {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'measure-layout': {\n 'measure-distance': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }\n }\n });\n }\n }\n\n // Reset the empty cells.\n this.emptyCellNewSystem = false;\n this.emptyCells = 0;\n\n // Chords.\n if (cell.chord) {\n switch (cell.chord.note) {\n case 'x': {\n // Handle single bar repeat.\n this.barRepeat = 1;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'r': {\n // Handle double bar repeat.\n // We do this in 2 stages, because a blank measure occurs after 'r' (to keep the measure count correct)\n // Here, we copy the next-to-last measure and set the repeat flag.\n // The next opening measure will pick up the remaining measure.\n this.barRepeat = 2;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'p':\n // If slash does not occur as first chord, count it as a space.\n // Otherwise, handle it as 'W'.\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n break;\n }\n // Fall into case 'W'.\n\n case 'W': {\n // Handle invisible root by copying previous chord.\n let target = this.measure;\n if (!target.chords.length) {\n target = measures.slice().reverse().find(m => m.chords.length);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find any measure with chords prior to ${JSON.stringify(cell.chord)}`);\n }\n }\n if (target) {\n const chord = target.chords[target.chords.length-1].ireal;\n chord.over = cell.chord.over;\n chord.alternate = cell.chord.alternate;\n this.measure.chords.push(this.convertChord(chord));\n }\n break;\n }\n case ' ': {\n // TODO Handle alternate chord only.\n this._log(LogLevel.Warn, `Unhandled empty/alternate chord ${JSON.stringify(cell.chord)}`);\n break;\n }\n default: {\n // Process new chord.\n this.measure.chords.push(this.convertChord(cell.chord));\n }\n }\n }\n else if (!this.barRepeat) {\n // There are 16 cells per row, regardless of time signature.\n // Barlines can occur anywhere and the iReal Pro player uses an unknown algorithm\n // to schedule the chords within a measure, using the empty cells as \"hints\" for scheduling.\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=chord-spacing-in-the-editor\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=how-do-i-fit-more-than-48-measures-into-one-chart\n //\n // Our approach to emulate the iReal Pro player is as follows:\n // 1. Whenever we find an empty cell, attach it to the previous chord (or discard it if there's no previous chord)\n // 2. At the end of the measure, adjust the chord durations based on existing empty cells across the measure\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n }\n }\n\n // Other attributes.\n cell.annots.forEach(annot => {\n switch(annot[0]) {\n case '*': { // section\n const section = annot.slice(1);\n this.measure.body['_content'].push(this.convertSection(section));\n break;\n }\n case 'T': { // time\n const time = annot.slice(1);\n this.measure.attributes.push(this.convertTime(time));\n break;\n }\n case 'S': { // segno\n this.measure.body['_content'].push(this.convertSegno());\n break;\n }\n case 'N': { // ending\n // TODO This assumes a single ending at a time.\n let ending = parseInt(annot.slice(1));\n if (ending < 1) {\n // It can happen that the ending number comes as 0 from iRP.\n // In this case, we do a best effort of finding the previous ending and incrementing it.\n const target = measures.slice().reverse().find(m => !!m.barEnding);\n ending = target?.barEnding ?? 0 + 1;\n }\n this.measure.barlines[0]['_content'].push(this.convertEnding(ending, 'start'));\n // End the previous ending at the previous measure's right barline.\n // Also, remove the 'discontinue' ending from its starting measure since we found an end to it.\n if (ending > 1) {\n measures[measures.length-1].barlines[1]['_content'].push(this.convertEnding(ending-1, 'stop'));\n const target = measures.slice().reverse().find(m => m.barEnding === ending-1);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline of any measure`);\n }\n else {\n // The last result is the good one: remove the 'discontinue' ending.\n const index = target.barlines[1]['_content'].findIndex(b => !!b && b['_name'] === 'ending');\n if (index === -1) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline`, target);\n }\n delete target.barlines[1]['_content'][index];\n }\n }\n // We will add a 'discontinue' ending at this measure's right barline.\n this.measure.barEnding = ending;\n break;\n }\n case 'Q': { // coda\n // We add all codas as \"tocoda\" because we expect the last one to be the actual coda.\n // After all measures have been built, adjust the last coda.\n // https://irealpro.com/how-the-coda-symbol-works-in-ireal-pro/\n this.measure.body['_content'].push(this.convertToCoda());\n this.codas.push(this.measure);\n break;\n }\n\n // Ignore small and large chord renderings.\n case 'l':\n case 's': break;\n\n case 'f': { // Fermata\n this.measure.chords[this.measure.chords.length-1].fermata = true;\n break;\n }\n\n case 'U': { // END, treated as Fine.\n this.measure.body['_content'].push(this.convertFine('END'));\n break;\n }\n\n default: this._log(LogLevel.Warn, `Unhandled annotation \"${annot}\"`);\n }\n });\n\n // Comments and repeats.\n // TODO Handle measure offset.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/offset/\n cell.comments.map(c => c.trim()).forEach(comment => {\n const repeatFn = this._map(Converter.mapRepeats, comment);\n if (repeatFn) {\n this.measure.body['_content'].push(repeatFn.call(this, comment));\n } else {\n this.measure.body['_content'].push(this.convertComment(comment));\n }\n });\n\n // Close and insert the measure if needed.\n // Ignore measures without any chords, they're probably empty spaces.\n if (cell.bars.match(/\\)|\\}|\\]|Z/) && this.measure.chords.length) {\n // Add closing barline and ending if needed.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'right'));\n if (this.measure.barEnding) {\n // In case of numbered repeats, end measure an open repeat by default \u250C\u2500\u2500\u2500\u2500\u2500\u2500\n // \u2502 2.\n // It may be replaced later by a closing repeat \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 2. \u2502\n this.measure.barlines[1]['_content'].push(this.convertEnding(this.measure.barEnding, 'discontinue'));\n }\n\n // Close out the measure.\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n this.measure = null;\n if (this.barRepeat) this.barRepeat--;\n }\n\n return measures;\n }, []);\n\n // Adjust final right margin if needed.\n const remainingCells = this.song.cells.length % 16 - this.emptyCells;\n if (remainingCells > 0 && measures.length > 0) {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * remainingCells)\n }]\n }\n }\n });\n }\n\n // Adjust last coda if any.\n if (this.codas.length) {\n const target = this.codas[this.codas.length-1];\n const direction = target.body['_content'].findIndex(d =>\n d['_name'] === 'direction' &&\n Array.isArray(d['_content']) &&\n d['_content'].some(s =>\n s['_name'] === 'sound' &&\n Object.keys(s['_attrs']).includes('tocoda')\n )\n );\n if (direction === -1) {\n this._log(LogLevel.Warn, `Cannot find sound direction`, target);\n }\n target.body['_content'][direction] = this.convertCoda();\n }\n\n // `Measure.assemble()` puts all the parts in `Measure.body`.\n return measures.map(measure => measure.assemble());\n }\n\n // Fix order of elements according to sequence as specified by an xs:sequence.\n // @param {array} elements - Array of elements to sort.\n // @param {array} sequence - Array of element names in order of xs:sequence.\n // @return {array} Ordered array of elements.\n static reorderSequence(measure, elements, sequence) {\n return elements.filter(a => Object.keys(a).length).sort((a1, a2) => {\n let k1 = Object.keys(a1)[0]; if (k1 === '_name') k1 = a1[k1];\n let k2 = Object.keys(a2)[0]; if (k2 === '_name') k2 = a2[k2];\n // TODO indexOf() needs to search every time. Make it faster with memoize?\n const i1 = sequence.indexOf(k1);\n const i2 = sequence.indexOf(k2);\n if (i1 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k1}\"`, measure);\n }\n if (i2 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k2}\"`, measure);\n }\n return i1 - i2;\n });\n }\n\n convertRepeatNx(comment) {\n let repeats = null;\n if (null !== (repeats = comment.match(/(\\d+)x/))) {\n this.repeats = repeats[1];\n }\n }\n\n convertFine(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'fine': 'yes' }\n }]\n };\n }\n\n convertDaCapo(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dacapo': 'yes' }\n }]\n };\n }\n\n convertDalSegno(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dalsegno': 'yes' }\n }]\n };\n }\n\n convertComment(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': comment[0] === '*' ? 'above' : 'below' },\n _content: {\n 'direction-type': {\n 'words': comment[0] === '*' ? comment.slice(3) : comment\n }\n }\n };\n }\n\n convertEnding(ending, type) {\n // TODO This assumes a single ending.\n return {\n _name: 'ending',\n _attrs: { 'number': ending, 'type': type },\n _content: `${ending}.`\n };\n }\n\n convertBarline(bars, location) {\n let style = 'regular';\n let repeat = null;\n if (bars.match(/\\[|\\]/)) {\n style = 'light-light';\n }\n else if (bars.match(/Z/)) {\n style = 'light-heavy';\n }\n else if (bars.match(/\\{|\\}/)) {\n style = location === 'left' ? 'heavy-light' : 'light-heavy';\n repeat = location === 'left' ? 'forward' : 'backward';\n }\n\n // Set the current repeat count to 2, which may be changed later if we find a repeat annotation.\n if (repeat === 'forward') {\n this.repeats = 2;\n }\n\n return {\n _name: 'barline',\n _attrs: { 'location': location },\n _content: [{\n 'bar-style': style\n }, { ...(repeat && {\n _name: 'repeat',\n _attrs: { 'direction': repeat, ...(repeat === 'backward' && { 'times': this.repeats }) }\n })}]\n };\n }\n\n convertSection(section) {\n if (section === 'i') section = 'Intro';\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: {\n 'direction-type': {\n 'rehearsal': section\n }\n }\n };\n }\n\n convertSegno() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n _name: 'segno'\n }\n }, {\n _name: 'sound',\n _attrs: { 'segno': 'segno' }\n }]\n };\n }\n\n convertCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n '_name': 'coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'coda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertToCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n 'words': 'To Coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'tocoda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertTempo(bpm) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n _name: 'metronome',\n _attrs: { 'parentheses': 'no' },\n _content: [{\n 'beat-unit': this.calculateChordDuration(1)[0].type\n }, {\n 'per-minute': bpm\n }]\n }]\n }, {\n _name: 'sound',\n _attrs: { 'tempo': bpm }\n }]\n };\n }\n\n convertTime(time) {\n let beats = parseInt(time[0]);\n let beatType = parseInt(time[1]);\n if (time === '12') {\n beats = 12;\n beatType = 8;\n }\n this.time = { beats, beatType };\n return {\n 'time': [{\n 'beats': beats\n }, {\n 'beat-type': beatType\n }]\n };\n }\n\n adjustChordsDuration(measure) {\n // Now that the measure is closed, we can adjust the chord durations, taking empty cells into consideration.\n // https://www.irealb.com/forums/showthread.php?25161-Using-empty-cells-to-control-chord-duration\n //\n // Rules:\n // - Minimum chord duration is 1 beat\n // => Each chord starts as 1 beat\n // => Count of chords <= beats per measure\n // - Starting empty cells are discarded (already discarded during the cell loop)\n // - Each remaining empty cell counts as 1 beat (already counted during cell loop)\n // - Empty cell beats are added to their preceding chords (already added during the cell loop)\n // => Total chord durations <= beats per measure\n // - Remaining beats are distributed evenly among chords from first to last\n //\n if (measure.chords.length > this.time.beats) {\n this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure);\n return true;\n }\n let beats = measure.chords.reduce((beats, chord) => beats+1+chord.spaces, 0);\n if (!beats) {\n this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure);\n return false;\n }\n if (beats > this.time.beats) {\n // Reduce spaces.\n // We're guaranteed to end this loop because measure.chords.length <= this.time.beats\n let chordIndex = 0;\n while (beats > this.time.beats) {\n if (measure.chords[chordIndex].spaces > 0) {\n measure.chords[chordIndex].spaces--;\n beats--;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n else {\n // Distribute free beats among the chords.\n let chordIndex = 0;\n while (beats < this.time.beats) {\n measure.chords[chordIndex].spaces++;\n beats++;\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n\n // Adjust actual chord durations.\n measure.chords = measure.chords.map(chord => {\n chord.notes = this.calculateChordDuration(1+chord.spaces).map((duration, i, ds) =>\n this.convertChordNote(\n duration,\n i === ds.length - 1 ? chord.fermata : false, // Possible fermata on last chord note only\n this.options.notation === 'rhythmic' && ds.length > 1 ? (i > 0 ? 'stop' : 'start') : null // Possible tie in case of rhythmic notation\n )\n );\n return chord;\n });\n\n return true;\n }\n\n calculateChordDuration(beats) {\n // Lowest beat resolution is eighth-note (8).\n const mapDuration = {\n '1': [{ t: 'eighth', d: 0, b: 1 }],\n '2': [{ t: 'quarter', d: 0, b: 2 }],\n '3': [{ t: 'quarter', d: 1, b: 3 }],\n '4': [{ t: 'half', d: 0, b: 4 }],\n '5': [{ t: 'quarter', d: 1, b: 3 }, { t: 'quarter', d: 0, b: 2 }],\n '6': [{ t: 'half', d: 1, b: 6 }],\n '7': [{ t: 'half', d: 2, b: 7 }],\n '8': [{ t: 'whole', d: 0, b: 8 }],\n '9': [{ t: 'half', d: 1, b: 6 }, { t: 'quarter', d: 1, b: 3 }],\n '10': [{ t: 'half', d: 1, b: 6 }, { t: 'half', d: 0, b: 4 }],\n '11': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 0, b: 4 }],\n '12': [{ t: 'whole', d: 1, b: 12 }],\n '13': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 1, b: 6 }],\n '14': [{ t: 'whole', d: 2, b: 14 }],\n '15': [{ t: 'whole', d: 0, b: 8 }, { t: 'half', d: 2, b: 7 }],\n };\n\n if (this.options.notation === 'slash') {\n // In case of slash notation, return an array of n=beats elements, each with a duration of 1 beat.\n const index = 1 * 8 / this.time.beatType;\n return Array(beats).fill(this\n ._map(mapDuration, index, [], `Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n })[0] // We're sure to get only one entry in this case.\n );\n }\n else {\n // In case of rhythmic notation, return a single note (or 2 tied notes) corresponding to the desired beat count.\n const index = beats * 8 / this.time.beatType;\n return this\n ._map(mapDuration, index, [], `Unexpected beat count ${beats} for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n });\n }\n }\n\n convertChordNote(duration, fermata = false, tie = null) {\n const altered = Converter.mapFifthsToAlters[this.fifths >= 0 ? 'sharp' : 'flat'].slice(0, Math.abs(this.fifths));\n const noteType = {\n _name: 'pitch',\n _content: [{\n 'step': this.options.step\n }, {\n 'alter': altered.includes(this.options.step) ? (this.fifths > 0 ? 1 : -1) : 0\n }, {\n 'octave': this.options.octave\n }]\n };\n\n const notations = [];\n if (fermata) {\n notations.push({ _name: 'fermata' });\n }\n if (tie) {\n notations.push({ _name: 'tied', _attrs: { 'type': tie } });\n }\n\n return Converter.reorderSequence(this.measure, [noteType, {\n _name: 'cue'\n }, {\n _name: 'notehead',\n _content: this.options.notehead,\n _attrs: [{ 'font-size': this.options.noteheadSize }]\n }, {\n 'duration': duration.duration\n }, {\n 'voice': 1,\n }, {\n _name: 'type',\n _attrs: { 'size': 'full' },\n _content: duration.type\n }, { ...(notations.length && {\n 'notations': Converter.reorderSequence(this.measure, notations, Converter.sequenceNotations)\n })}]\n .concat(Array(duration.dots).fill({ _name: 'dot' })), Converter.sequenceNote);\n }\n\n convertChordDegree(value, type, alter) {\n return {\n _name: 'degree',\n _attrs: { 'print-object': 'no' },\n _content: [{\n 'degree-value': value\n }, {\n 'degree-alter': alter\n }, {\n 'degree-type': type\n }]\n };\n }\n\n convertChordSymbol(chord) {\n const parsedChord = this.renderChord(this.parseChord(`${chord.note}${chord.modifiers}`));\n if (!parsedChord) {\n this._log(LogLevel.Warn, `Unrecognized chord \"${chord.note}${chord.modifiers}\"`);\n return { rootStep: null, rootAlter: null, chordKind: null, chordDegrees: [], chordText: null };\n }\n\n const rootStep = parsedChord.input.rootNote[0];\n const rootAlter = this._map(Converter.mapAlter, parsedChord.input.rootNote[1] || null, null, `Unrecognized accidental in chord \"${parsedChord.input.rootNote}\"`);\n const chordText = parsedChord.formatted.descriptor + parsedChord.formatted.chordChanges.join('');\n\n // Find chord quality (aka kind).\n // `chord-symbol` misses a bunch of MusicXML chord qualities so we'll have to derive them ourselves.\n const mapKind = {\n 'major': 'major',\n 'major6': 'major-sixth',\n 'major7': 'major-seventh',\n 'dominant7': 'dominant',\n 'minor': 'minor',\n 'minor6': 'minor-sixth',\n 'minor7': 'minor-seventh',\n 'minorMajor7': 'major-minor',\n 'augmented': 'augmented',\n 'diminished': 'diminished',\n 'diminished7': 'diminished-seventh',\n 'power': 'power'\n };\n let chordKind = this._map(mapKind, parsedChord.normalized.quality, '', `Unrecognized chord quality \"${parsedChord.normalized.quality}\"`);\n\n // Convert extensions to their equivalent MusicXML kind.\n // Find the highest extension, then replace the word following [major, minor, dominant] with it.\n if (parsedChord.normalized.extensions.length) {\n const extension = Math.max(...parsedChord.normalized.extensions.map(e => parseInt(e))).toString();\n const mapExtensionKind = {\n '9': '-ninth',\n '11': '-11th',\n '13': '-13th'\n };\n chordKind = chordKind.split('-')[0] + this._map(mapExtensionKind, extension, '', `Unhandled extension ${extension}`);\n\n // chord-symbol considers dominant-11th to be suspended - but that's not _necessarily_ the case.\n // https://en.wikipedia.org/wiki/Eleventh_chord\n if (chordKind === 'dominant-11th') {\n parsedChord.normalized.isSuspended = false;\n }\n }\n\n // Detect other chord kinds by explicit interval comparison.\n [\n { intervals: ['1', '4', '5'], kind: 'suspended-fourth', strict: true },\n { intervals: ['1', '5', '9'], kind: 'suspended-second', strict: true },\n { intervals: ['1', 'b3', 'b5', 'b7'], kind: 'half-diminished', strict: true },\n { intervals: ['1', '3', '#5', 'b7'], kind: 'augmented-seventh', strict: false }\n ].some(chord => {\n if (\n (!chord.strict || parsedChord.normalized.intervals.length === chord.intervals.length) &&\n chord.intervals.every((s, i) => s === parsedChord.normalized.intervals[i])\n ) {\n chordKind = chord.kind;\n\n // Remove the intervals from the parsedChord to avoid duplication below.\n chord.intervals.forEach(i => {\n parsedChord.normalized.alterations = parsedChord.normalized.alterations.filter(p => p === i);\n parsedChord.normalized.adds = parsedChord.normalized.adds.filter(p => p === i);\n parsedChord.normalized.omits = parsedChord.normalized.omits.filter(p => p === i);\n });\n\n // Add the missing intervals from the parsedChord to the adds.\n parsedChord.normalized.intervals.forEach(i => {\n if (!chord.intervals.includes(i)) {\n parsedChord.normalized.adds.push(i);\n }\n });\n\n // Stop looping.\n return true;\n }\n });\n\n // Handle suspended chords other than triads.\n const chordDegrees = [];\n if (parsedChord.normalized.isSuspended && !chordKind.includes('suspended')) {\n parsedChord.normalized.adds.push('4');\n // Handle case of sus(add3)\n if (!parsedChord.normalized.adds.includes('3')) {\n parsedChord.normalized.omits.push('3');\n }\n }\n\n // Add chord degrees.\n parsedChord.normalized.alterations.forEach(alteration => {\n const degree = alteration.slice(1);\n chordDegrees.push(\n this.convertChordDegree(\n degree,\n (degree === '5' || parsedChord.normalized.extensions.includes(degree)) ? 'alter' : 'add',\n this._map(Converter.mapAlter, alteration[0], 0, `Unrecognized alter symbol in \"${alteration}\"`)\n )\n );\n });\n parsedChord.normalized.adds.forEach(add => {\n const alteration = Object.keys(Converter.mapAlter).includes(add[0]) ? add[0] : null;\n const degree = alteration ? add.slice(1) : add;\n chordDegrees.push(\n this.convertChordDegree(degree, 'add', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${add}\"`))\n );\n });\n parsedChord.normalized.omits.forEach(omit => {\n const alteration = Object.keys(Converter.mapAlter).includes(omit[0]) ? omit[0] : null;\n const degree = alteration ? omit.slice(1) : omit;\n chordDegrees.push(\n this.convertChordDegree(degree, 'subtract', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${omit}\"`))\n );\n });\n\n return { rootStep, rootAlter, chordKind, chordDegrees, chordText };\n }\n\n convertChord(chord) {\n let harmony = null;\n\n // Special case: 'n' for no chord\n if (chord.note === 'n') {\n harmony = [{\n 'root': [{\n _name: 'root-step',\n _attrs: { 'text': '' },\n _content: this.options.step\n }],\n }, {\n _name: 'kind',\n _attrs: { 'text': 'N.C.' },\n _content: 'none',\n }];\n }\n else {\n const { rootStep, rootAlter, chordKind, chordDegrees, chordText } = this.convertChordSymbol(chord);\n\n // Handle bass note\n const bass = !chord.over ? null : [{\n 'bass-step': chord.over.note[0]\n }, { ...(chord.over.note[1] && {\n 'bass-alter': this._map(Converter.mapAlter, chord.over.note[1], null, `Unrecognized accidental in bass note \"${chord.over.note}\"`)\n })}];\n\n harmony = [{\n 'root': [{\n 'root-step': rootStep\n }, { ...(rootAlter && { // Don't generate the root-alter entry if rootAlter is blank\n 'root-alter': rootAlter\n })}],\n }, {\n _name: 'kind',\n _attrs: { 'text': chordText, 'use-symbols': 'no' },\n _content: chordKind,\n }, { ...(bass && {\n 'bass': bass\n })}].concat(chordDegrees);\n }\n\n // TODO Handle alternate chord\n if (chord.alternate) {\n this._log(LogLevel.Warn, `Unhandled alternate chord ${JSON.stringify(chord.alternate)}`);\n }\n\n return new Converter.Chord(\n harmony,\n // Initial chord duration is 1 beat\n this.calculateChordDuration(1).map(duration => this.convertChordNote(duration)),\n chord\n );\n }\n\n convertKey() {\n const mapKeys = {\n // Major keys\n 'C': 0, 'G': 1, 'D': 2, 'A': 3, 'E': 4, 'B': 5, 'F#': 6, 'C#': 7,\n 'F': -1, 'Bb': -2, 'Eb': -3, 'Ab': -4, 'Db': -5, 'Gb': -6, 'Cb': -7,\n // Minor keys\n 'A-': 0, 'E-': 1, 'B-': 2, 'F#-': 3, 'C#-': 4, 'G#-': 5, 'D#-': 6, 'A#-': 7,\n 'D-': -1, 'G-': -2, 'C-': -3, 'F-': -4, 'Bb-': -5, 'Eb-': -6, 'Ab-': -7\n };\n\n // Remember the fifth.\n this.fifths = this._map(mapKeys, this.song.key, 0, `Unrecognized key signature \"${this.song.key}\"`);\n\n return {\n _name: 'key',\n _attrs: [{ 'print-object': this.options.keySignature ? 'yes' : 'no' }],\n _content: [{\n 'fifths': this.fifths\n }, {\n 'mode': this.song.key.slice(-1) === '-' ? 'minor' : 'major'\n }]\n };\n }\n\n convertStyleAndGroove(style, groove) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n 'words': style\n }]\n }, {\n 'sound': [{\n 'play': [{\n _name: 'other-play',\n _attrs: { 'type': 'groove' },\n _content: groove || style\n }]\n }]\n }]\n };\n }\n\n _log(logLevel, message, measure = this.measure) {\n if (logLevel < this.options.logLevel) return;\n const log = `[ireal-musicxml] [${this.song.title}${measure ? '#' + measure.number() : ''}] ${message}`;\n let method = 'warn';\n switch (logLevel) {\n case LogLevel.Debug: method = 'debug'; break;\n case LogLevel.Info: method = 'info'; break;\n case LogLevel.Warn: method = 'warn'; break;\n case LogLevel.Error: method = 'error'; break;\n }\n console[method](log);\n }\n\n _map(map, key, defaultValue, message, logLevel = LogLevel.Warn, measure = this.measure) {\n if (!key) return defaultValue;\n if (!(key in map)) {\n if (message) {\n this._log(logLevel, message, measure);\n }\n return defaultValue || null;\n }\n return map[key];\n }\n\n static _mmToTenths(mm, decimals = 2) {\n const value = mm * SCALING_TENTHS / SCALING_MM;\n const power = Math.pow(10, decimals);\n return Math.round(value * power) / power;\n }\n}\n", "{\n \"name\": \"ireal-musicxml\",\n \"version\": \"2.0.0\",\n \"description\": \"iReal Pro to MusicXML converter.\",\n \"author\": \"Karim Ratib (https://github.com/infojunkie)\",\n \"license\": \"GPL-3.0-only\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/infojunkie/ireal-musicxml\"\n },\n \"homepage\": \"https://github.com/infojunkie/ireal-musicxml\",\n \"type\": \"module\",\n \"types\": \"./build/ireal-musicxml.d.ts\",\n \"files\": [\n \"LICENSE.txt\",\n \"build/*\",\n \"src/*\"\n ],\n \"bin\": {\n \"ireal-musicxml\": \"./src/cli/cli.js\"\n },\n \"exports\": {\n \"import\": \"./build/ireal-musicxml.js\",\n \"require\": \"./build/ireal-musicxml.cjs\"\n },\n \"scripts\": {\n \"build\": \"npm run build:esm && npm run build:cjs && npm run build:d.ts\",\n \"build:d.ts\": \"cp src/types/* build/\",\n \"build:esm\": \"esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js\",\n \"build:cjs\": \"esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs\",\n \"test\": \"npm run build && npm run test:lint && npm run test:spec && npm run test:ts\",\n \"test:spec\": \"node --test --test-name-pattern=\\\"${TEST:-.*}\\\"\",\n \"test:ts\": \"node --test --loader=ts-node/esm --require ts-node/register test/*.spec.ts\",\n \"test:lint\": \"eslint src --fix\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.7.7\",\n \"@xmldom/xmldom\": \"^0.8.0\",\n \"esbuild\": \"0.24.0\",\n \"eslint\": \"^9.13.0\",\n \"resolve\": \"^1.22.8\",\n \"sanitize-filename\": \"^1.6.3\",\n \"ts-node\": \"^10.9.2\",\n \"typescript\": \"^4.9.5\",\n \"validate-with-xmllint\": \"^1.2.0\",\n \"xpath.js\": \"^1.1.0\"\n },\n \"dependencies\": {\n \"chord-symbol\": \"^3.0.0\",\n \"fast-diff\": \"^1.2.0\",\n \"jstoxml\": \"^2.0.6\",\n \"promise\": \"^8.1.0\"\n }\n}\n", "import pkg from '../../package.json' with { type: 'json' };\n\nexport class Version {\n static name = pkg.name;\n static version = pkg.version;\n static author = pkg.author;\n static description = pkg.description;\n}"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAYA,WAAO,UAAU;AACjB,aAAS,QAAQ,MAAM;AACnB,UAAI,CAAC,MAAM,QAAQ;AACf,qBAAa;AACb,mBAAW;AAAA,MACf;AAEA,YAAM,MAAM,MAAM,IAAI;AAAA,IAC1B;AAEA,QAAI,QAAQ,CAAC;AAGb,QAAI,WAAW;AAIf,QAAI;AAIJ,QAAI,QAAQ;AAIZ,QAAI,WAAW;AAQf,aAAS,QAAQ;AACb,aAAO,QAAQ,MAAM,QAAQ;AACzB,YAAI,eAAe;AAGnB,gBAAQ,QAAQ;AAChB,cAAM,YAAY,EAAE,KAAK;AAMzB,YAAI,QAAQ,UAAU;AAGlB,mBAAS,OAAO,GAAG,YAAY,MAAM,SAAS,OAAO,OAAO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O,IAAI,EAAE,KAAK,OAAO;AACpG,QAAI,SAAS;AACb,YAAQ,UAAU;AAAA,MAChB,KAAK,SAAS;AAAO,iBAAS;AAAS;AAAA,MACvC,KAAK,SAAS;AAAM,iBAAS;AAAQ;AAAA,MACrC,KAAK,SAAS;AAAM,iBAAS;AAAQ;AAAA,MACrC,KAAK,SAAS;AAAO,iBAAS;AAAS;AAAA,IACzC;AACA,YAAQ,MAAM,EAAE,GAAG;AAAA,EACrB;AAAA,EAEA,KAAK,KAAK,KAAK,cAAc,SAAS,WAAW,SAAS,MAAM,UAAU,KAAK,SAAS;AACtF,QAAI,CAAC,IAAK,QAAO;AACjB,QAAI,EAAE,OAAO,MAAM;AACjB,UAAI,SAAS;AACX,aAAK,KAAK,UAAU,SAAS,OAAO;AAAA,MACtC;AACA,aAAO,gBAAgB;AAAA,IACzB;AACA,WAAO,IAAI,GAAG;AAAA,EAChB;AAAA,EAEA,OAAO,YAAY,IAAI,WAAW,GAAG;AACnC,UAAM,QAAQ,KAAK,iBAAiB;AACpC,UAAM,QAAQ,KAAK,IAAI,IAAI,QAAQ;AACnC,WAAO,KAAK,MAAM,QAAQ,KAAK,IAAI;AAAA,EACrC;AACF;;;AFxwCO,SAAS,YAAY,OAAO,UAAU,CAAC,GAAG;AAC/C,QAAM,WAAW,IAAI,SAAS,KAAK;AACnC,WAAS,MAAM,QAAQ,UAAQ;AAC7B,SAAK,WAAW,UAAU,QAAQ,MAAM,OAAO;AAAA,EACjD,CAAC;AACD,SAAO;AACT;AAEA,eAAsB,QAAQ,OAAO,UAAU,CAAC,GAAG;AACjD,SAAO,IAAI,eAAAC,QAAQ,aAAW,QAAQ,YAAY,OAAO,OAAO,CAAC,CAAC;AACpE;", "names": ["Promise", "self", "resolve", "reject", "Promise", "self", "Promise", "Promise", "i", "val", "Promise", "Promise", "longtext", "shorttext", "diff", "global", "obj", "getIndentStr", "getType", "filterStr", "getAttributeKeyVals", "formatAttributes", "objToArray", "isPrimitive", "isSimpleType", "isSimpleXML", "getHeaderString", "toXML", "__webpack_require__", "module", "Map", "Promise", "Symbol", "Uint8Array", "key", "object", "exports", "Buffer", "othValue", "convert", "chain", "allFunctions", "input", "reduce", "value", "fn", "checkCustomFilters", "customFilters", "Array", "isArray", "TypeError", "some", "filter", "notes", "AFlat", "A", "ASharp", "BFlat", "B", "C", "CSharp", "DFlat", "D", "DSharp", "EFlat", "E", "F", "FSharp", "GFlat", "G", "GSharp", "english", "Ab", "Bb", "Cb", "Db", "Eb", "Fb", "Gb", "latin", "Lab", "La", "Sib", "Si", "Dob", "Do", "Reb", "R\u00E9b", "Re", "R\u00E9", "Mib", "Mi", "Fab", "Fa", "Solb", "Sol", "german", "As", "Ais", "Hes", "H", "His", "Ces", "Cis", "Des", "Dis", "Es", "Eis", "Fes", "Fis", "Ges", "Gis", "getAccidentalsVariation", "source", "variant", "Object", "keys", "acc", "curr", "match", "replace", "englishVariantsToNotes", "latinVariantsToNotes", "germanVariantsToNotes", "allVariantsToNotes", "allVariants", "sort", "a", "b", "length", "englishVariants", "latinVariants", "germanVariants", "allVariantsPerGroup", "name", "InvalidInputError", "Error", "UnexpectedError", "message", "ChordSymbolError", "chord", "errorName", "NoSymbolFoundError", "symbol", "InvalidModifierError", "invalidChars", "descriptor", "InvalidIntervalsError", "forbiddenCombo", "join", "hasExactly", "allIntervals", "search", "arraySearch", "_isArray", "_isEqual", "hasOneOf", "has", "hasAll", "hasNoneOf", "require", "lookupMethod", "interval", "includes", "allForbiddenCombos", "checkIntervalsConsistency", "intervals", "normalized", "find", "combo", "formatSymbol", "formatted", "rootNote", "bassNote", "chordChanges", "qualities", "ma", "ma6", "ma7", "dom7", "mi", "mi6", "mi7", "miMa7", "aug", "dim", "dim7", "power", "bass", "majorQualities", "minorQualities", "qualityToDescriptor", "getHighestExtension", "intents", "alt", "chordChangesDescriptors", "add", "add7", "omit", "sus", "formatSymbolParts", "getDescriptor", "getChordChanges", "quality", "isSuspended", "extensions", "highestExtension", "major", "alterations", "formattedOmits", "formatOmits", "omits", "isAltered", "formattedAdds", "formatAdds", "adds", "map", "index", "omitted", "getParsableDescriptor", "allFilters", "toLowerCaseExceptMajorM", "removeSpaces", "addDisambiguators", "addMissingVerbs", "parsableDescriptor", "toLowerCase", "allTokensWithVerbs", "currentVerb", "hasVerb", "parenthesis", "split", "forEach", "token", "startsWith", "push", "initChord", "parserConfiguration", "_cloneDeep", "notesSharp", "notesFlat", "rootNoteToScaleAccidentals", "maj", "min", "nameIndividualChordNotes", "semitones", "minMaj", "refNotes", "rootNoteIndex", "indexOf", "indexedNotes", "slice", "chordNotes", "i", "normalizeNotes", "normalizeDescriptor", "chordIntervals", "_clone", "isPowerChord", "isBass", "getOmits", "getIsSuspended", "getChordQuality", "qualityIntervals", "getExtensions", "baseIntervals", "getAddsAndAlterations", "hasMajorIntent", "intervalsForQualityDetection", "getIntervalsForQualityDetection", "intervalsToQualities", "_find", "o", "undoOmit3", "bind", "undoSuspension", "undoAlt5", "_uniq", "with3rd", "unSuspended", "_without", "isAlt", "unaltered", "canBeExtended", "isMinorExtended13th", "isMajorExtended13th", "isExtended11th", "isExtended9th", "canHave11th", "isAlteration", "hasAdd3", "sortIntervals", "qualityAlterations", "sortableA", "Number", "parseInt", "sortableB", "parseBase", "noteVariants", "notesRegex", "notesAndDescriptorRegex", "RegExp", "result", "allModifiers", "halfDim", "seventh", "sus2", "ninth", "eleventh", "thirteenth", "fifthFlat", "fifthSharp", "ninthFlat", "ninthSharp", "eleventhSharp", "thirteenthFlat", "add3", "add4", "addb6", "add6", "add69", "add9", "add11", "add13", "omit3", "omit5", "\u0394", "M", "Ma", "Maj", "Major", "major7th", "getDerivedModifiers", "allSymbols", "m", "Min", "Minor", "minor", "diminished", "\u00D8", "\u00F8", "h", "augmented", "sus4", "suspended", "suspended4", "suspended2", "b3", "b5", "b9", "addb9", "b13", "addb13", "add2", "b6", "no3", "no5", "altered", "modifierId", "derivedFn", "bb7", "b7", "parseDescriptor", "altIntervals", "getModifiers", "modifiers", "getIntervals", "getSemitones", "getIntents", "descriptorRegex", "escapeRegex", "descriptorMatches", "remainingChars", "allModifiersId", "trim", "getThird", "getFourth", "getFifths", "getSixth", "getSevenths", "getNinths", "getElevenths", "getThirteenths", "intervalsToSemitones", "third", "fourth", "fifths", "shouldAlter", "sixth", "isExtended", "sevenths", "getMinorOrMajorSeventh", "elevenths", "thirteenths", "string", "chordParserFactory", "allAltIntervals", "allNotationSystems", "notationSystems", "checkAltIntervals", "checkNotationSystems", "parseChord", "allErrors", "isInputValid", "e", "formatError", "allVariantsPerGroupCopy", "variantsGroup", "variants", "shift", "notationSystem", "getUnexpectedError", "error", "checkArray", "arrayName", "arrayToTest", "allowedValues", "allowEmpty", "system", "exceptionError", "type", "shortDescriptors", "aug7", "shortenNormalized", "isSus2", "isAdd2", "isAug7", "isEleventh", "change", "simplify", "level", "intervalsToRemove", "max", "core", "_difference", "sharpsToFlats", "flatsToSharps", "_invert", "transpose", "transposeValue", "useFlats", "rootSharp", "convertToSharp", "transposeNote", "bassSharp", "note", "noteIndex", "transposedIndex", "octaves", "Math", "floor", "correctedTransposedIndex", "transposed", "translationTables", "convertNotationSystem", "finalNotationSystem", "textPrinter", "rawPrinter", "cloned", "textPrinted", "reParsed", "chordRendererFactory", "useShortNamings", "harmonizeAccidentals", "printer", "simplifyFilter", "renderChord", "isValidChord", "filteredChord", "parts", "diff", "ChordSymbol", "jstoxml", "measures", "beats", "chord", "Promise"] } diff --git a/package.json b/package.json index e12f274..ab237be 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "homepage": "https://github.com/infojunkie/ireal-musicxml", "type": "module", - "types": "./src/types/ireal-musicxml.d.ts", + "types": "./build/ireal-musicxml.d.ts", "files": [ "LICENSE.txt", "build/*", @@ -24,12 +24,13 @@ "require": "./build/ireal-musicxml.cjs" }, "scripts": { - "build": "npm run build:esm && npm run build:cjs", + "build": "npm run build:esm && npm run build:cjs && npm run build:d.ts", + "build:d.ts": "cp src/types/* build/", "build:esm": "esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js", "build:cjs": "esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs", - "test": "npm run test:lint && npm run test:spec && npm run test:ts", + "test": "npm run build && npm run test:lint && npm run test:spec && npm run test:ts", "test:spec": "node --test --test-name-pattern=\"${TEST:-.*}\"", - "test:ts": "npm run build && node --test --loader=ts-node/esm --require ts-node/register test/*.spec.ts", + "test:ts": "node --test --loader=ts-node/esm --require ts-node/register test/*.spec.ts", "test:lint": "eslint src --fix" }, "devDependencies": { diff --git a/src/types/ireal-musicxml.d.ts b/src/types/ireal-musicxml.d.ts index 4c902fa..2ecadd3 100644 --- a/src/types/ireal-musicxml.d.ts +++ b/src/types/ireal-musicxml.d.ts @@ -23,7 +23,7 @@ export class Playlist { export class Song { /** * Song parser. Parsing occurs in this constructor. - * Refer to https://github.com/infojunkie/ireal-musicxml/blob/main/doc/ireal.md for structure details. + * Refer to https://github.com/infojunkie/ireal-musicxml/blob/main/doc/irealpro.md for structure details. * @param ireal iReal Pro encoding for a single song * @param oldFormat Flag to indicate that the encoding above corresponds to the older irealbook:// format. */ diff --git a/test/index.spec.cjs b/test/index.spec.cjs new file mode 100644 index 0000000..250844d --- /dev/null +++ b/test/index.spec.cjs @@ -0,0 +1,45 @@ +const assert = require('node:assert'); +const { describe, it } = require('node:test'); +const fs = require('fs'); +const { + Version, + convertSync, + LogLevel, + convert, + Playlist, + Converter +} = require('../build/ireal-musicxml.cjs'); + +describe('ireal-musicxml using CommonJS', () => { + it('accesses the library version', () => { + assert.strictEqual(Version.name, 'ireal-musicxml'); + }); + + it('converts an iReal Pro song to MusicXML synchronously', () => { + const result = convertSync(fs.readFileSync('test/data/playlist.html', 'utf-8'), { + notation: "rhythmic", + logLevel: LogLevel.None + }); + assert.strictEqual(result.name, 'Jazz Combo'); + assert.strictEqual(result.songs.length, 6); + assert.notStrictEqual(result.songs[0].musicXml, ''); + }); + + it('converts an iReal Pro song to MusicXML asynchronously', async () => { + const result = await convert(fs.readFileSync('test/data/playlist.html', 'utf-8'), { + notation: "slash", + logLevel: LogLevel.Error + }); + assert.strictEqual(result.name, 'Jazz Combo'); + assert.strictEqual(result.songs.length, 6); + assert.notStrictEqual(result.songs[0].musicXml, ''); + }); + + it('parses and exports a playlist manually', () => { + const playlist = new Playlist(fs.readFileSync('test/data/playlist.html', 'utf-8')); + assert.strictEqual(playlist.name, 'Jazz Combo') + assert.strictEqual(playlist.songs.length, 6); + const musicXml = Converter.convert(playlist.songs[0]); + assert.notStrictEqual(musicXml, ''); + }); +}); diff --git a/test/index.spec.js b/test/index.spec.js index 657881a..47b9bcd 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -1,28 +1,33 @@ import assert from 'node:assert'; import { describe, it } from 'node:test'; import fs from 'fs'; -import * as iRealMusicXml from '../src/lib/index.js'; +import { + convertSync, + convert, + Playlist, + Converter +} from '../src/lib/index.js'; -describe('iRealMusicXml', () => { +describe('ireal-musicxml', () => { it('converts an iReal Pro song to MusicXML synchronously', () => { - const result = iRealMusicXml.convertSync(fs.readFileSync('test/data/playlist.html', 'utf-8')); + const result = convertSync(fs.readFileSync('test/data/playlist.html', 'utf-8')); assert.strictEqual(result.name, 'Jazz Combo') assert.strictEqual(result.songs.length, 6); assert.notStrictEqual(result.songs[0].musicXml, ''); }); it('converts an iReal Pro song to MusicXML asynchronously', async () => { - const result = await iRealMusicXml.convert(fs.readFileSync('test/data/playlist.html', 'utf-8')); + const result = await convert(fs.readFileSync('test/data/playlist.html', 'utf-8')); assert.strictEqual(result.name, 'Jazz Combo') assert.strictEqual(result.songs.length, 6); assert.notStrictEqual(result.songs[0].musicXml, ''); }); it('parses and exports a playlist manually', () => { - const playlist = new iRealMusicXml.Playlist(fs.readFileSync('test/data/playlist.html', 'utf-8')); + const playlist = new Playlist(fs.readFileSync('test/data/playlist.html', 'utf-8')); assert.strictEqual(playlist.name, 'Jazz Combo') assert.strictEqual(playlist.songs.length, 6); - const musicXml = iRealMusicXml.Converter.convert(playlist.songs[0]); + const musicXml = Converter.convert(playlist.songs[0]); assert.notStrictEqual(musicXml, ''); }); });