diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e08597b40..bd6f6f0dd9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -157,6 +157,8 @@ jobs: brew uninstall --ignore-dependencies node brew update HOMEBREW_NO_AUTO_UPDATE=1 brew install node@10 + brew link --overwrite --force node@10 + [[ $(node --version) =~ ^v10\. ]] - *attach_workspace - *test_build - *test_run @@ -168,6 +170,8 @@ jobs: command: | brew uninstall --ignore-dependencies node HOMEBREW_NO_AUTO_UPDATE=1 brew install node@8 + brew link --overwrite --force node@8 + [[ $(node --version) =~ ^v8\. ]] - *attach_workspace - *test_build - *test_run @@ -179,7 +183,8 @@ jobs: command: | brew uninstall --ignore-dependencies node HOMEBREW_NO_AUTO_UPDATE=1 brew install node@6 - brew link --force node@6 + brew link --overwrite --force node@6 + [[ $(node --version) =~ ^v6\. ]] - *attach_workspace - *test_build - *test_run diff --git a/.eslintrc.json b/.eslintrc.json index 2937d517d0..ef6e477cea 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -37,6 +37,20 @@ "rules": { "no-console": "off" } + }, + { + "files": [ + "src/util/generate-pnp-map-api.tpl.js" + ], + "rules": { + "prettier/prettier": ["error", { + "singleQuote": true, + "trailingComma": "es5", + "bracketSpacing": false, + "printWidth": 120, + "parser": "flow" + }] + } } ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index e519de1f0c..33aab2a233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,151 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa ## Master -- Prevent infinite loop when parsing corrupted lockfile with unterminated string +- Fixes occasionally mismatching upper/lowecases of drive letters in win32 pnp check + + [#7007](https://github.com/yarnpkg/yarn/pull/7007) - [**Christoph Werner**](https://github.com/codepunkt) + +- Fixes the error reporting for non-HTTP network errors (such as invalid certificates) + + [#6968](https://github.com/yarnpkg/yarn/pull/6968) - [**Chih-Hsuan Yen**](https://github.com/yan12125) + +- Changes the location where the `--require ./.pnp.js` flag gets added into `NODE_OPTIONS`: now at the front (bis) + + [#6951](https://github.com/yarnpkg/yarn/pull/6951) - [**John-David Dalton**](https://twitter.com/jdalton) + +- Packages won't be auto-unplugged anymore if `ignore-scripts` is set in the yarnrc file + + [#6983](https://github.com/yarnpkg/yarn/pull/6983) - [**Micha Reiser**](https://github.com/MichaReiser) + +## 1.14.0 + +- Improves PnP compatibility with Node 6 + + [#6871](https://github.com/yarnpkg/yarn/pull/6871) - [**Robert Jackson**](https://github.com/rwjblue) + +- Fixes PnP detection with workspaces (`installConfig` is now read at the top-level) + + [#6878](https://github.com/yarnpkg/yarn/pull/6878) - [**Maël Nison**](https://twitter.com/arcanis) + +- Fixes an interaction between `yarn pack` and bundled dependencies + + [#6908](https://github.com/yarnpkg/yarn/pull/6908) - [**Travis Hoover**](https://twitter.com/thoov) + +- Adds support for `GITHUB_TOKEN` in `yarn policies set-version` + + [#6912](https://github.com/yarnpkg/yarn/pull/6912) - [**Billy Vong**](https://github.com/billyvg) + +- Fixes an issue where `resolve` would forward an incomplete basedir to the PnP hook + + [#6882](https://github.com/yarnpkg/yarn/pull/6882) - [**Zoran Regvart**](https://github.com/zregvart) + +- Fixes the command that `yarn unlink` recommends to run as a followup (now `yarn install --force`) + + [#6931](https://github.com/yarnpkg/yarn/pull/6931) - [**Justin Sacbibit**](https://github.com/justinsacbibit) + +- Changes the location where the `--require ./.pnp.js` flag gets added into `NODE_OPTIONS`: now at the front + + [#6942](https://github.com/yarnpkg/yarn/pull/6942) - [**John-David Dalton**](https://twitter.com/jdalton) + +- Fixes a bug where `os` and `platform` requirements weren't properly checked when `engines` was missing + + [#6976](https://github.com/yarnpkg/yarn/pull/6976) - [**Micha Reiser**](https://github.com/MichaReiser) + +## 1.13.0 + +- Implements a new `package.json` field: `peerDependenciesMeta` + + [#6671](https://github.com/yarnpkg/yarn/pull/6671) - [**Maël Nison**](https://twitter.com/arcanis) + +- Adds an `optional` settings to `peerDependenciesMeta` to silence missing peer dependency warnings + + [#6671](https://github.com/yarnpkg/yarn/pull/6671) - [**Maël Nison**](https://twitter.com/arcanis) + +- Implements `yarn policies set-version [range]`. Check [the documentation]() for usage & tips. + + [#6673](https://github.com/yarnpkg/yarn/pull/6673) - [**Maël Nison**](https://twitter.com/arcanis) + +- Fixes a resolution issue when a package had an invalid `main` entry + + [#6682](https://github.com/yarnpkg/yarn/pull/6682) - [**Maël Nison**](https://twitter.com/arcanis) + +- Decreases the size of the generated `$PATH` environment variable for a better Windows support + + [#6683](https://github.com/yarnpkg/yarn/issues/6683) - [**Rowan Lonsdale**](https://github.com/hWorblehat) + +- Fixes postinstall scripts for third-party packages when they were referencing a binary from their own dependencies + + [#6712](https://github.com/yarnpkg/yarn/pull/6712) - [**Maël Nison**](https://twitter.com/arcanis) + +- Fixes yarn audit exit code overflow + + [#6748](https://github.com/yarnpkg/yarn/issues/6748) - [**Andrey Vetlugin**](https://github.com/antrew) + +- Stops automatically unplugging packages with postinstall script when running under `--ignore-scripts` + + [#6820](https://github.com/yarnpkg/yarn/pull/6820) - [**Maël Nison**](https://twitter.com/arcanis) + +- Adds transparent support for the [`resolve`](https://github.com/browserify/resolve) package when using Plug'n'Play + + [#6816](https://github.com/yarnpkg/yarn/pull/6816) - [**Maël Nison**](https://twitter.com/arcanis) + +- Properly reports the error codes when the npm registry throws 500's + + [#6817](https://github.com/yarnpkg/yarn/pull/6817) - [**Maël Nison**](https://twitter.com/arcanis) + +## 1.12.3 + +**Important:** This release contains a cache bump. It will cause the very first install following the upgrade to take slightly more time, especially if you don't use the [Offline Mirror](https://yarnpkg.com/blog/2016/11/24/offline-mirror/) feature. After that everything will be back to normal. + +- Fixes an issue with `yarn audit` when using workspaces + + [#6625](https://github.com/yarnpkg/yarn/pull/6639) - [**Jeff Valore**](https://twitter.com/codingwithspike) + +- Uses `NODE_OPTIONS` to instruct Node to load the PnP hook, instead of raw CLI arguments + + **Caveat:** This change might cause issues for PnP users having a space inside their cwd (cf [nodejs/node#24065](https://github.com/nodejs/node/pull/24065)) + + [#6479](https://github.com/yarnpkg/yarn/pull/6629) - [**Maël Nison**](https://twitter.com/arcanis) + +- Fixes Gulp when used with Plug'n'Play + + [#6623](https://github.com/yarnpkg/yarn/pull/6623) - [**Maël Nison**](https://twitter.com/arcanis) + +- Fixes an issue with `yarn audit` when the root package was missing a name + + [#6611](https://github.com/yarnpkg/yarn/pull/6611) - [**Jack Zhao**](https://github.com/bugzpodder) + +- Fixes an issue with `yarn audit` when a package was depending on an empty range + + [#6611](https://github.com/yarnpkg/yarn/pull/6611) - [**Jack Zhao**](https://github.com/bugzpodder) + +- Fixes an issue with how symlinks are setup into the cache on Windows + + [#6621](https://github.com/yarnpkg/yarn/pull/6621) - [**Yoad Snapir**](https://github.com/yoadsn) + +- Upgrades `inquirer`, fixing `upgrade-interactive` for users using both Node 10 and Windows + + [#6635](https://github.com/yarnpkg/yarn/pull/6635) - [**Philipp Feigl**](https://github.com/pfeigl) + +- Exposes the path to the PnP file using `require.resolve('pnpapi')` + + [#6643](https://github.com/yarnpkg/yarn/pull/6643) - [**Maël Nison**](https://twitter.com/arcanis) + +## 1.12.2 + +This release doesn't actually exists and was caused by a quirk in our systems. + +## 1.12.1 + +- Ensures the engine check is ran before showing the UI for `upgrade-interactive` + + [#6536](https://github.com/yarnpkg/yarn/pull/6536) - [**Orta Therox**](https://github.com/orta) + +- Restores Node v4 support by downgrading `cli-table3` + + [#6535](https://github.com/yarnpkg/yarn/pull/6535) - [**Mark Stacey**](https://github.com/Gudahtt) + +- Prevents infinite loop when parsing corrupted lockfiles with unterminated strings [#4965](https://github.com/yarnpkg/yarn/pull/4965) - [**Ryan Hendrickson**](https://github.com/rhendric) @@ -24,6 +168,22 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa [#5322](https://github.com/yarnpkg/yarn/pull/5322) - [**Karolis Narkevicius**](https://twitter.com/KidkArolis) +- Adds 2FA (Two Factor Authentication) support to publish & alike + + [#6555](https://github.com/yarnpkg/yarn/pull/6555) - [**Krzysztof Zbudniewek**](https://github.com/neonowy) + +- Fixes how the `files` property is interpreted to bring it in line with npm + + [#6562](https://github.com/yarnpkg/yarn/pull/6562) - [**Bertrand Marron**](https://github.com/tusbar) + +- Fixes Yarn invocations on Darwin when the `yarn` binary was symlinked + + [#6568](https://github.com/yarnpkg/yarn/pull/6568) - [**Hidde Boomsma**](https://github.com/hboomsma) + +- Fixes `require.resolve` when used together with the `paths` option + + [#6565](https://github.com/yarnpkg/yarn/pull/6565) - [**Maël Nison**](https://twitter.com/arcanis) + ## 1.12.0 - Adds initial support for PnP on Windows diff --git a/README.md b/README.md index c5aa699ee3..1305b9337f 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@

Circle Status Appveyor Status + Azure Pipelines status Discord Chat Commitizen friendly

diff --git a/__tests__/commands/_helpers.js b/__tests__/commands/_helpers.js index 654850d815..b7c641903b 100644 --- a/__tests__/commands/_helpers.js +++ b/__tests__/commands/_helpers.js @@ -85,6 +85,7 @@ export function makeConfigFromDirectory(cwd: string, reporter: Reporter, flags: { binLinks: !!flags.binLinks, cwd, + ignoreScripts: flags.ignoreScripts, globalFolder: flags.globalFolder || path.join(cwd, '.yarn-global'), cacheFolder: flags.cacheFolder || path.join(cwd, '.yarn-cache'), linkFolder: flags.linkFolder || path.join(cwd, '.yarn-link'), @@ -92,6 +93,7 @@ export function makeConfigFromDirectory(cwd: string, reporter: Reporter, flags: production: flags.production, updateChecksums: !!flags.updateChecksums, offline: !!flags.offline, + nonInteractive: typeof flags.nonInteractive !== 'undefined' ? Boolean(flags.nonInteractive) : true, focus: !!flags.focus, enableDefaultRc: !flags.noDefaultRc, extraneousYarnrcFiles: flags.useYarnrc, diff --git a/__tests__/commands/audit.js b/__tests__/commands/audit.js index aaf0fa5046..d24436c1c5 100644 --- a/__tests__/commands/audit.js +++ b/__tests__/commands/audit.js @@ -2,8 +2,11 @@ import {NoopReporter} from '../../src/reporters/index.js'; import {run as buildRun} from './_helpers.js'; +import * as auditModule from '../../src/cli/commands/audit.js'; import {run as audit} from '../../src/cli/commands/audit.js'; import {promisify} from '../../src/util/promise.js'; +import * as lockfileModule from '../../src/lockfile/index.js'; +import * as installModule from '../../src/cli/commands/install.js'; const path = require('path'); const zlib = require('zlib'); @@ -105,7 +108,7 @@ test('calls reporter auditAdvisory with correct data', () => { }); }); -// *** Test temporarily removed due to inability to correctly puggest actions to the user. +// *** Test temporarily removed due to inability to correctly suggest actions to the user. // test('calls reporter auditAction with correct data', () => { // return runAudit([], {}, 'single-vulnerable-dep-installed', (config, reporter) => { // const apiResponse = getAuditResponse(config); @@ -123,3 +126,141 @@ test('calls reporter auditSummary with correct data', () => { expect(reporter.auditSummary).toBeCalledWith(apiResponse.metadata); }); }); + +test.concurrent('sends correct dependency map to audit api for private package.', () => { + const expectedApiPost = { + install: [], + remove: [], + metadata: {}, + requires: { + 'left-pad': '^1.3.0', + }, + dependencies: { + 'left-pad': { + version: '1.3.0', + integrity: 'sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==', + requires: {}, + dependencies: {}, + }, + }, + }; + + return runAudit([], {}, 'private-package', async config => { + const calledWithPipe = config.requestManager.request.mock.calls[0][0].body; + const calledWith = JSON.parse(await gunzip(calledWithPipe)); + expect(calledWith).toEqual(expectedApiPost); + }); +}); + +test('calls reporter auditAdvisory with correct data for private package', () => { + return runAudit([], {}, 'single-vulnerable-dep-installed', (config, reporter) => { + const apiResponse = getAuditResponse(config); + expect(reporter.auditAdvisory).toBeCalledWith(apiResponse.actions[0].resolves[0], apiResponse.advisories['118']); + }); +}); + +test('calls reporter auditSummary with correct data for private package', () => { + return runAudit([], {}, 'single-vulnerable-dep-installed', (config, reporter) => { + const apiResponse = getAuditResponse(config); + expect(reporter.auditSummary).toBeCalledWith(apiResponse.metadata); + }); +}); + +describe('returns semantic exit codes', () => { + beforeAll(() => { + // mock unrelated stuff + jest.spyOn(lockfileModule.default, 'fromDirectory').mockImplementation(jest.fn()); + jest.spyOn(installModule, 'Install').mockImplementation(() => { + return { + fetchRequestFromCwd: jest.fn(() => { + return {}; + }), + resolver: { + init: jest.fn(), + }, + linker: { + init: jest.fn(), + }, + }; + }); + }); + + const exitCodeTestCases = [ + [0, {}, 'zero when no vulnerabilities'], + [1, {info: 77}, '1 for info'], + [2, {low: 77}, '2 for low'], + [4, {moderate: 77}, '4 for moderate'], + [8, {high: 77}, '8 for high'], + [16, {critical: 77}, '16 for critical'], + [17, {info: 55, critical: 77}, 'different categories sum up'], + ]; + exitCodeTestCases.forEach(([expectedExitCode, foundVulnerabilities, description]) => { + test(description, async () => { + jest.spyOn(auditModule.default.prototype, 'performAudit').mockImplementation(() => { + return foundVulnerabilities; + }); + const configMock: any = {}; + const reporterMock: any = {}; + const exitCode = await audit(configMock, reporterMock, {}, []); + expect(exitCode).toEqual(expectedExitCode); + }); + }); +}); + +test.concurrent('sends correct dependency map to audit api for workspaces.', () => { + const expectedApiPost = { + dependencies: { + 'balanced-match': { + dependencies: {}, + integrity: 'sha1-ibTRmasr7kneFk6gK4nORi1xt2c=', + requires: {}, + version: '1.0.0', + }, + 'brace-expansion': { + dependencies: {}, + integrity: 'sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==', + requires: { + 'balanced-match': '^1.0.0', + 'concat-map': '0.0.1', + }, + version: '1.1.11', + }, + 'concat-map': { + dependencies: {}, + integrity: 'sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=', + requires: {}, + version: '0.0.1', + }, + minimatch: { + dependencies: {}, + integrity: 'sha1-UjYVelHk8ATBd/s8Un/33Xjw74M=', + requires: { + 'brace-expansion': '^1.0.0', + }, + version: '3.0.0', + }, + prj1: { + dependencies: {}, + integrity: '', + requires: { + minimatch: '3.0.0', + }, + version: '0.0.0', + }, + }, + install: [], + metadata: {}, + name: 'yarn-test', + remove: [], + requires: { + prj1: '0.0.0', + }, + version: '1.0.0', + }; + + return runAudit([], {}, 'workspace', async config => { + const calledWithPipe = config.requestManager.request.mock.calls[0][0].body; + const calledWith = JSON.parse(await gunzip(calledWithPipe)); + expect(calledWith).toEqual(expectedApiPost); + }); +}); diff --git a/__tests__/commands/check.js b/__tests__/commands/check.js index f210e3a541..6a6b2d5d08 100644 --- a/__tests__/commands/check.js +++ b/__tests__/commands/check.js @@ -215,6 +215,7 @@ test.concurrent('--integrity should fail if --ignore-scripts is changed', async async (config, reporter, install, getStdout): Promise => { let thrown = false; try { + config.ignoreScripts = false; await checkCmd.run(config, reporter, {integrity: true, ignoreScripts: false}, []); } catch (e) { thrown = true; diff --git a/__tests__/commands/install/bin-links.js b/__tests__/commands/install/bin-links.js index 420013dc66..c18728d3f7 100644 --- a/__tests__/commands/install/bin-links.js +++ b/__tests__/commands/install/bin-links.js @@ -51,9 +51,9 @@ afterEach(request.__resetAuthedRequests); test('install should hoist nested bin scripts', (): Promise => { return runInstall({binLinks: true}, 'install-nested-bin', async config => { const binScripts = await fs.walk(path.join(config.cwd, 'node_modules', '.bin')); - // need to double the amount as windows makes 2 entries for each dependency - // so for below, there would be an entry for eslint and eslint.cmd on win32 - const amount = process.platform === 'win32' ? 20 : 10; + // need to triple the amount as windows makes 3 entries for each dependency + // so for below, there would be an entry for eslint, eslint.cmd and eslint.ps1 on win32 + const amount = process.platform === 'win32' ? 30 : 10; expect(binScripts).toHaveLength(amount); expect(await linkAt(config, 'node_modules', '.bin', 'standard')).toEqual('../standard/bin/cmd.js'); @@ -178,7 +178,7 @@ test('can use link protocol to install a package that would not be found via nod test('empty bin string does not create a link', (): Promise => { return runInstall({binLinks: true}, 'install-empty-bin', async config => { const binScripts = await fs.walk(path.join(config.cwd, 'node_modules', '.bin')); - const linkCount = process.platform === 'win32' ? 2 : 1; + const linkCount = process.platform === 'win32' ? 3 : 1; expect(binScripts).toHaveLength(linkCount); expect(await linkAt(config, 'node_modules', '.bin', 'depB')).toEqual('../depB/depb.js'); diff --git a/__tests__/commands/install/integration.js b/__tests__/commands/install/integration.js index 60a6f4dcfb..e3df495d88 100644 --- a/__tests__/commands/install/integration.js +++ b/__tests__/commands/install/integration.js @@ -48,6 +48,11 @@ async function mockConstants(base: Config, mocks: Object, cb: (config: Config) = beforeEach(request.__resetAuthedRequests); afterEach(request.__resetAuthedRequests); +test('install should not copy the .bin folders from the cache', () => + runInstall({}, 'install-no-bin', async config => { + expect(await fs.exists(`${config.cwd}/node_modules/is-pnp/.bin`)).toEqual(false); + })); + test('install should not hoist packages above their peer dependencies', () => runInstall({}, 'install-should-not-hoist-through-peer-deps', async config => { expect(await fs.exists(`${config.cwd}/node_modules/a/node_modules/c`)).toEqual(true); @@ -1118,3 +1123,27 @@ test('install will not warn for missing peerDep when both shallower and deeper', const warningMessage = messageParts.every(part => stdout.includes(part)); expect(warningMessage).toBe(false); })); + +test('install will warn for missing peer dependencies', () => + runInstall({}, 'missing-peer-dep', (config, reporter, install, getStdout) => { + const stdout = getStdout(); + const messageParts = reporter.lang('unmetPeer', 'undefined').split('undefined'); + const warningMessage = messageParts.every(part => stdout.includes(part)); + expect(warningMessage).toBe(true); + })); + +test('install will not warn for missing optional peer dependencies', () => + runInstall({}, 'missing-opt-peer-dep', (config, reporter, install, getStdout) => { + const stdout = getStdout(); + const messageParts = reporter.lang('unmetPeer', 'undefined').split('undefined'); + const warningMessage = messageParts.every(part => stdout.includes(part)); + expect(warningMessage).toBe(false); + })); + +test('install skips the scripts if the yarnrc specifies skip-scripts true', () => + runInstall({}, 'ignore-scripts-by-yarnrc', (config, reporter, install, getStdout) => { + const stdout = getStdout(); + + const ignoredScriptsMessage = reporter.lang('ignoredScripts'); + expect(stdout).toMatch(ignoredScriptsMessage); + })); diff --git a/__tests__/commands/install/offline-mirror.js b/__tests__/commands/install/offline-mirror.js index 176f76d356..843a761674 100644 --- a/__tests__/commands/install/offline-mirror.js +++ b/__tests__/commands/install/offline-mirror.js @@ -35,6 +35,7 @@ test.concurrent( // enable packing of built artifacts config.packBuiltPackages = true; + config.ignoreScripts = false; // after first run we observe both package and global side effects let reinstall = new Install({force: true}, config, reporter, await Lockfile.fromDirectory(config.cwd)); @@ -64,6 +65,7 @@ test.concurrent( // enable packing of built artifacts config.packBuiltPackages = true; + config.ignoreScripts = false; // after first run we observe package side effects let reinstall = new Install({force: true}, config, reporter, await Lockfile.fromDirectory(config.cwd)); @@ -89,6 +91,8 @@ test.concurrent('install without pack-built-packages should keep running install expect(await fs.exists(path.join(config.cwd, 'node_modules', 'dep-a', 'module-a-build.log'))).toEqual(false); expect(await fs.exists(path.join(config.cwd, 'module-a-build.log'))).toEqual(false); + config.ignoreScripts = false; + // after first run we observe both package and global side effects let reinstall = new Install({force: true}, config, reporter, await Lockfile.fromDirectory(config.cwd)); await reinstall.init(); @@ -113,6 +117,7 @@ test.concurrent('removing prebuilt package .tgz file falls back to running scrip // enable packing of built artifacts config.packBuiltPackages = true; + config.ignoreScripts = false; // after first run we observe both package and global side effects let reinstall = new Install({force: true}, config, reporter, await Lockfile.fromDirectory(config.cwd)); diff --git a/__tests__/commands/pack.js b/__tests__/commands/pack.js index 6403e6c768..dff8b1a22e 100644 --- a/__tests__/commands/pack.js +++ b/__tests__/commands/pack.js @@ -92,6 +92,18 @@ test.concurrent('pack should include all files listed in the files array', (): P }); }); +test.concurrent('pack should include files based from the package’s root', (): Promise => { + return runPack([], {}, 'files-include-from-root', async (config): Promise => { + const {cwd} = config; + const files = await getFilesFromArchive( + path.join(cwd, 'files-include-from-root-v1.0.0.tgz'), + path.join(cwd, 'files-include-from-root-v1.0.0'), + ); + expect(files.indexOf('index.js')).toBeGreaterThanOrEqual(0); + expect(files.indexOf('sub/index.js')).toEqual(-1); + }); +}); + test.concurrent('pack should included globbed files', (): Promise => { return runPack([], {}, 'files-glob', async (config): Promise => { const {cwd} = config; diff --git a/__tests__/fixtures/audit/private-package/audit-api-response.json b/__tests__/fixtures/audit/private-package/audit-api-response.json new file mode 100644 index 0000000000..e0d4605b3e --- /dev/null +++ b/__tests__/fixtures/audit/private-package/audit-api-response.json @@ -0,0 +1,77 @@ +{ + "actions": [ + { + "action": "install", + "module": "minimatch", + "target": "3.0.4", + "isMajor": false, + "resolves": [ + { + "id": 118, + "path": "minimatch", + "dev": false, + "optional": false, + "bundled": false + } + ] + } + ], + "advisories": { + "118": { + "findings": [ + { + "version": "3.0.0", + "paths": [ + "minimatch" + ], + "dev": false, + "optional": false, + "bundled": false + } + ], + "id": 118, + "created": "2016-05-25T16:37:20.000Z", + "updated": "2018-03-01T21:58:01.072Z", + "deleted": null, + "title": "Regular Expression Denial of Service", + "found_by": { + "name": "Nick Starke" + }, + "reported_by": { + "name": "Nick Starke" + }, + "module_name": "minimatch", + "cves": [ + "CVE-2016-10540" + ], + "vulnerable_versions": "<=3.0.1", + "patched_versions": ">=3.0.2", + "overview": "Affected versions of `minimatch` are vulnerable to regular expression denial of service attacks when user input is passed into the `pattern` argument of `minimatch(path, pattern)`.\n\n\n## Proof of Concept\n```\nvar minimatch = require(“minimatch”);\n\n// utility function for generating long strings\nvar genstr = function (len, chr) {\n var result = “”;\n for (i=0; i<=len; i++) {\n result = result + chr;\n }\n return result;\n}\n\nvar exploit = “[!” + genstr(1000000, “\\\\”) + “A”;\n\n// minimatch exploit.\nconsole.log(“starting minimatch”);\nminimatch(“foo”, exploit);\nconsole.log(“finishing minimatch”);\n```", + "recommendation": "Update to version 3.0.2 or later.", + "references": "", + "access": "public", + "severity": "high", + "cwe": "CWE-400", + "metadata": { + "module_type": "Multi.Library", + "exploitability": 4, + "affected_components": "Internal::Code::Function::minimatch({type:'args', key:0, vector:{type:'string'}})" + }, + "url": "https://nodesecurity.io/advisories/118" + } + }, + "muted": [], + "metadata": { + "vulnerabilities": { + "info": 0, + "low": 0, + "moderate": 0, + "high": 1, + "critical": 0 + }, + "dependencies": 5, + "devDependencies": 0, + "optionalDependencies": 0, + "totalDependencies": 5 + } +} diff --git a/__tests__/fixtures/audit/private-package/package.json b/__tests__/fixtures/audit/private-package/package.json new file mode 100644 index 0000000000..f16c191691 --- /dev/null +++ b/__tests__/fixtures/audit/private-package/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "left-pad": "^1.3.0" + } +} diff --git a/__tests__/fixtures/audit/private-package/yarn.lock b/__tests__/fixtures/audit/private-package/yarn.lock new file mode 100644 index 0000000000..9660884091 --- /dev/null +++ b/__tests__/fixtures/audit/private-package/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +left-pad@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" + integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== diff --git a/__tests__/fixtures/audit/workspace/audit-api-response.json b/__tests__/fixtures/audit/workspace/audit-api-response.json new file mode 100644 index 0000000000..c9171e2624 --- /dev/null +++ b/__tests__/fixtures/audit/workspace/audit-api-response.json @@ -0,0 +1,18 @@ +{ + "actions": [], + "advisories": {}, + "muted": [], + "metadata": { + "vulnerabilities": { + "info": 0, + "low": 0, + "moderate": 0, + "high": 0, + "critical": 0 + }, + "dependencies": 0, + "devDependencies": 0, + "optionalDependencies": 0, + "totalDependencies": 0 + } +} diff --git a/__tests__/fixtures/audit/workspace/package.json b/__tests__/fixtures/audit/workspace/package.json new file mode 100644 index 0000000000..828404e8b1 --- /dev/null +++ b/__tests__/fixtures/audit/workspace/package.json @@ -0,0 +1,8 @@ +{ + "name": "yarn-test", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "private": true, + "workspaces": ["packages/*"] +} diff --git a/__tests__/fixtures/audit/workspace/packages/prj1/package.json b/__tests__/fixtures/audit/workspace/packages/prj1/package.json new file mode 100644 index 0000000000..32af682e2f --- /dev/null +++ b/__tests__/fixtures/audit/workspace/packages/prj1/package.json @@ -0,0 +1,8 @@ +{ + "name": "prj1", + "private": true, + "version": "0.0.0", + "dependencies": { + "minimatch": "3.0.0" + } +} diff --git a/__tests__/fixtures/audit/workspace/yarn.lock b/__tests__/fixtures/audit/workspace/yarn.lock new file mode 100644 index 0000000000..5e2aa34974 --- /dev/null +++ b/__tests__/fixtures/audit/workspace/yarn.lock @@ -0,0 +1,28 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +brace-expansion@^1.0.0: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +minimatch@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.0.tgz#5236157a51e4f004c177fb3c527ff7dd78f0ef83" + integrity sha1-UjYVelHk8ATBd/s8Un/33Xjw74M= + dependencies: + brace-expansion "^1.0.0" diff --git a/__tests__/fixtures/cache/corrupted/.yarn-cache/v3/corrupted-meta-empty/node_modules/corrupted-meta-empty/.yarn-metadata.json b/__tests__/fixtures/cache/corrupted/.yarn-cache/v4/corrupted-meta-empty/node_modules/corrupted-meta-empty/.yarn-metadata.json similarity index 100% rename from __tests__/fixtures/cache/corrupted/.yarn-cache/v3/corrupted-meta-empty/node_modules/corrupted-meta-empty/.yarn-metadata.json rename to __tests__/fixtures/cache/corrupted/.yarn-cache/v4/corrupted-meta-empty/node_modules/corrupted-meta-empty/.yarn-metadata.json diff --git a/__tests__/fixtures/cache/corrupted/.yarn-cache/v3/corrupted-meta-not-existing/node_modules/corrupted-meta-not-existing/.gitkeep b/__tests__/fixtures/cache/corrupted/.yarn-cache/v4/corrupted-meta-not-existing/node_modules/corrupted-meta-not-existing/.gitkeep similarity index 100% rename from __tests__/fixtures/cache/corrupted/.yarn-cache/v3/corrupted-meta-not-existing/node_modules/corrupted-meta-not-existing/.gitkeep rename to __tests__/fixtures/cache/corrupted/.yarn-cache/v4/corrupted-meta-not-existing/node_modules/corrupted-meta-not-existing/.gitkeep diff --git a/__tests__/fixtures/cache/corrupted/.yarn-cache/v3/corrupted-meta-typo/node_modules/corrupted-meta-typo/.yarn-metadata.json b/__tests__/fixtures/cache/corrupted/.yarn-cache/v4/corrupted-meta-typo/node_modules/corrupted-meta-typo/.yarn-metadata.json similarity index 100% rename from __tests__/fixtures/cache/corrupted/.yarn-cache/v3/corrupted-meta-typo/node_modules/corrupted-meta-typo/.yarn-metadata.json rename to __tests__/fixtures/cache/corrupted/.yarn-cache/v4/corrupted-meta-typo/node_modules/corrupted-meta-typo/.yarn-metadata.json diff --git a/__tests__/fixtures/cache/corrupted/.yarn-cache/v3/good/node_modules/good/.yarn-metadata.json b/__tests__/fixtures/cache/corrupted/.yarn-cache/v4/good/node_modules/good/.yarn-metadata.json similarity index 100% rename from __tests__/fixtures/cache/corrupted/.yarn-cache/v3/good/node_modules/good/.yarn-metadata.json rename to __tests__/fixtures/cache/corrupted/.yarn-cache/v4/good/node_modules/good/.yarn-metadata.json diff --git a/__tests__/fixtures/install/ignore-scripts-by-yarnrc/.yarnrc b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/.yarnrc new file mode 100644 index 0000000000..13e317bfda --- /dev/null +++ b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/.yarnrc @@ -0,0 +1,2 @@ +yarn-offline-mirror "./mirror-for-offline" +ignore-scripts true \ No newline at end of file diff --git a/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-a-1.0.0.tgz b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-a-1.0.0.tgz new file mode 100644 index 0000000000..8219cb9a7d Binary files /dev/null and b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-a-1.0.0.tgz differ diff --git a/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-b-1.0.0.tgz b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-b-1.0.0.tgz new file mode 100644 index 0000000000..511a7d4bc3 Binary files /dev/null and b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-b-1.0.0.tgz differ diff --git a/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-c-1.0.0.tgz b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-c-1.0.0.tgz new file mode 100644 index 0000000000..0b12d36e32 Binary files /dev/null and b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/mirror-for-offline/dep-c-1.0.0.tgz differ diff --git a/__tests__/fixtures/install/ignore-scripts-by-yarnrc/package.json b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/package.json new file mode 100644 index 0000000000..c0d4b7cf22 --- /dev/null +++ b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "dep-a": "1.0.0" + } +} diff --git a/__tests__/fixtures/install/ignore-scripts-by-yarnrc/yarn.lock b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/yarn.lock new file mode 100644 index 0000000000..b044b0d81d --- /dev/null +++ b/__tests__/fixtures/install/ignore-scripts-by-yarnrc/yarn.lock @@ -0,0 +1,18 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +dep-a@1.0.0: + version "1.0.0" + resolved dep-a-1.0.0.tgz#63970c7301ec8a5d37dac4e454fff354f31c31b4 + integrity sha1-Y5cMcwHsil032sTkVP/zVPMcMbQ= + dependencies: + dep-b "1.0.0" +dep-b@1.0.0: + version "1.0.0" + resolved dep-b-1.0.0.tgz#569c27a4e30b1679eaa7e2299e741f30a7f70926 + integrity sha1-VpwnpOMLFnnqp+IpnnQfMKf3CSY= + dependencies: + dep-c "1.0.0" +dep-c@1.0.0: + version "1.0.0" + resolved dep-c-1.0.0.tgz#100eef2bf00fc31b596542fb9af18186e37716cc + integrity sha1-EA7vK/APwxtZZUL7mvGBhuN3Fsw= diff --git a/__tests__/fixtures/install/install-no-bin/package.json b/__tests__/fixtures/install/install-no-bin/package.json new file mode 100644 index 0000000000..5736570f54 --- /dev/null +++ b/__tests__/fixtures/install/install-no-bin/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "is-pnp": "^1.0.2" + } +} diff --git a/__tests__/fixtures/install/missing-opt-peer-dep/foo/package.json b/__tests__/fixtures/install/missing-opt-peer-dep/foo/package.json new file mode 100644 index 0000000000..5ef4d306d0 --- /dev/null +++ b/__tests__/fixtures/install/missing-opt-peer-dep/foo/package.json @@ -0,0 +1,12 @@ +{ + "name": "foo", + "version": "1.0.0", + "peerDependencies": { + "bar": "*" + }, + "peerDependenciesMeta": { + "bar": { + "optional": true + } + } +} diff --git a/__tests__/fixtures/install/missing-opt-peer-dep/package.json b/__tests__/fixtures/install/missing-opt-peer-dep/package.json new file mode 100644 index 0000000000..eb09afab80 --- /dev/null +++ b/__tests__/fixtures/install/missing-opt-peer-dep/package.json @@ -0,0 +1,6 @@ +{ + "name": "missing-peer-dep", + "dependencies": { + "foo": "file:./foo" + } +} diff --git a/__tests__/fixtures/install/missing-peer-dep/foo/package.json b/__tests__/fixtures/install/missing-peer-dep/foo/package.json new file mode 100644 index 0000000000..4eff210f8f --- /dev/null +++ b/__tests__/fixtures/install/missing-peer-dep/foo/package.json @@ -0,0 +1,7 @@ +{ + "name": "foo", + "version": "1.0.0", + "peerDependencies": { + "bar": "*" + } +} diff --git a/__tests__/fixtures/install/missing-peer-dep/package.json b/__tests__/fixtures/install/missing-peer-dep/package.json new file mode 100644 index 0000000000..eb09afab80 --- /dev/null +++ b/__tests__/fixtures/install/missing-peer-dep/package.json @@ -0,0 +1,6 @@ +{ + "name": "missing-peer-dep", + "dependencies": { + "foo": "file:./foo" + } +} diff --git a/__tests__/fixtures/pack/files-include-from-root/index.js b/__tests__/fixtures/pack/files-include-from-root/index.js new file mode 100644 index 0000000000..452029d835 --- /dev/null +++ b/__tests__/fixtures/pack/files-include-from-root/index.js @@ -0,0 +1 @@ +console.log('included'); diff --git a/__tests__/fixtures/pack/files-include-from-root/package.json b/__tests__/fixtures/pack/files-include-from-root/package.json new file mode 100644 index 0000000000..94eca8baf3 --- /dev/null +++ b/__tests__/fixtures/pack/files-include-from-root/package.json @@ -0,0 +1,6 @@ +{ + "name": "files-include-from-root", + "version": "1.0.0", + "license": "MIT", + "files": ["index.js"] +} diff --git a/__tests__/fixtures/pack/files-include-from-root/sub/index.js b/__tests__/fixtures/pack/files-include-from-root/sub/index.js new file mode 100644 index 0000000000..14816cc323 --- /dev/null +++ b/__tests__/fixtures/pack/files-include-from-root/sub/index.js @@ -0,0 +1 @@ +console.log('not included'); diff --git a/__tests__/package-compatibility.js b/__tests__/package-compatibility.js index 78eeef570e..c681c398fd 100644 --- a/__tests__/package-compatibility.js +++ b/__tests__/package-compatibility.js @@ -1,6 +1,6 @@ /* @flow */ -import {testEngine} from '../src/package-compatibility.js'; +import {testEngine, shouldCheck} from '../src/package-compatibility.js'; test('node semver semantics', () => { expect(testEngine('node', '^5.0.0', {node: '5.1.0'}, true)).toEqual(true); @@ -19,3 +19,67 @@ test('node semver semantics', () => { test('ignore semver prerelease semantics for yarn', () => { expect(testEngine('yarn', '^1.3.0', {yarn: '1.4.1-20180208.2355'}, true)).toEqual(true); }); + +test('shouldCheck returns true if ignorePlatform is false and the manifest specifies an os or cpu requirement', () => { + expect( + shouldCheck( + { + os: ['darwin'], + }, + {ignorePlatform: false, ignoreEngines: false}, + ), + ).toBe(true); + + expect( + shouldCheck( + { + cpu: ['i32'], + }, + {ignorePlatform: false, ignoreEngines: false}, + ), + ).toBe(true); + + expect(shouldCheck({}, {ignorePlatform: false, ignoreEngines: false})).toBe(false); + + expect( + shouldCheck( + { + os: [], + cpu: [], + }, + {ignorePlatform: false, ignoreEngines: false}, + ), + ).toBe(false); + + expect( + shouldCheck( + { + cpu: ['i32'], + os: ['darwin'], + }, + {ignorePlatform: true, ignoreEngines: false}, + ), + ).toBe(false); +}); + +test('shouldCheck returns true if ignoreEngines is false and the manifest specifies engines', () => { + expect( + shouldCheck( + { + engines: {node: '>= 10'}, + }, + {ignorePlatform: false, ignoreEngines: false}, + ), + ).toBe(true); + + expect(shouldCheck({}, {ignorePlatform: false, ignoreEngines: false})).toBe(false); + + expect( + shouldCheck( + { + engines: {node: '>= 10'}, + }, + {ignorePlatform: false, ignoreEngines: true}, + ), + ).toBe(false); +}); diff --git a/__tests__/registries/npm-registry.js b/__tests__/registries/npm-registry.js index 6f7551174f..4848cef2db 100644 --- a/__tests__/registries/npm-registry.js +++ b/__tests__/registries/npm-registry.js @@ -85,6 +85,10 @@ describe('request', () => { const npmRegistry = new NpmRegistry(testCwd, mockRegistries, mockRequestManager, mockReporter, true, []); npmRegistry.config = config; return { + setOtp(otp: string) { + npmRegistry.setOtp(otp); + }, + request(url: string, options: Object, packageName: string): Object { npmRegistry.request(url, options, packageName); const lastIndex = mockRequestManager.request.mock.calls.length - 1; @@ -101,6 +105,17 @@ describe('request', () => { expect(requestParams.url).toBe(url); }); + test('should add `npm-otp` header', () => { + const url = 'https://registry.npmjs.org/yarn'; + const config = {}; + const registry = createRegistry(config); + + registry.setOtp('123 456'); + + const requestParams = registry.request(url); + expect(requestParams.headers['npm-otp']).toBe('123 456'); + }); + const testCases = [ { title: 'using npm as default registry and using private registry for scoped packages', diff --git a/__tests__/util/request-manager.js b/__tests__/util/request-manager.js index 206d4c58f9..be9b964653 100644 --- a/__tests__/util/request-manager.js +++ b/__tests__/util/request-manager.js @@ -1,6 +1,7 @@ /* @flow */ /* eslint max-len: 0 */ +import {OneTimePasswordError} from '../../src/errors.js'; import {Reporter} from '../../src/reporters/index.js'; import Config from '../../src/config.js'; import * as fs from '../../src/util/fs.js'; @@ -209,6 +210,48 @@ for (const statusCode of [403, 442]) { }); } +test('RequestManager.execute one time password error on npm request', async () => { + jest.resetModules(); + jest.mock('request', factory => options => { + options.callback( + '', + {statusCode: 401, headers: {'www-authenticate': 'otp'}}, + {error: 'You must provide a one-time pass. Upgrade your client to npm@latest in order to use 2FA.'}, + ); + return { + on: () => {}, + }; + }); + + try { + const config = await Config.create({}); + await config.requestManager.request({ + url: 'https://registry.npmjs.org/yarn', + }); + } catch (err) { + expect(err).toBeInstanceOf(OneTimePasswordError); + } +}); + +test('RequestManager.execute one time password error on npm login request', async () => { + jest.resetModules(); + jest.mock('request', factory => options => { + options.callback('', {statusCode: 401, headers: {'www-authenticate': 'otp'}}, {ok: false}); + return { + on: () => {}, + }; + }); + + try { + const config = await Config.create({}); + await config.requestManager.request({ + url: 'https://registry.npmjs.org/-/user/org.couchdb.user:user', + }); + } catch (err) { + expect(err).toBeInstanceOf(OneTimePasswordError); + } +}); + // Cloudflare will occasionally return an html response with a 500 status code on some calls for (const statusCode of [408, 500, 542]) { test(`RequestManager.execute retries on ${statusCode} error`, async () => { diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..c625c8a030 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,51 @@ +jobs: + +- job: Windows + pool: 'Hosted VS2017' + + variables: + os_name: Windows + + strategy: + matrix: + node_8_x: + node_version: 8.x + node_10_x: + node_version: 10.x + + steps: + - template: scripts/azure-run-tests.yml + +- job: Linux + pool: + vmImage: 'Ubuntu 16.04' + + variables: + os_name: Linux + + strategy: + matrix: + node_8_x: + node_version: 8.x + node_10_x: + node_version: 10.x + + steps: + - template: scripts/azure-run-tests.yml + +- job: OSX + pool: + vmImage: 'macOS 10.13' + + variables: + os_name: OSX + + strategy: + matrix: + node_8_x: + node_version: 8.x + node_10_x: + node_version: 10.x + + steps: + - template: scripts/azure-run-tests.yml \ No newline at end of file diff --git a/bin/yarn b/bin/yarn index a2264cd04e..35ad5177ff 100755 --- a/bin/yarn +++ b/bin/yarn @@ -3,6 +3,7 @@ argv0=$(echo "$0" | sed -e 's,\\,/,g') basedir=$(dirname "$(readlink "$0" || echo "$argv0")") case "$(uname -s)" in + Darwin) basedir="$( cd "$( dirname "$argv0" )" && pwd )";; Linux) basedir=$(dirname "$(readlink -f "$0" || echo "$argv0")");; *CYGWIN*) basedir=`cygpath -w "$basedir"`;; *MSYS*) basedir=`cygpath -w "$basedir"`;; diff --git a/package.json b/package.json index a8bed6dedb..58f0f7d96b 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,17 @@ { "name": "yarn", "installationMethod": "unknown", - "version": "1.13.0-0", + "version": "1.15.0-0", "license": "BSD-2-Clause", "preferGlobal": true, "description": "📦🐈 Fast, reliable, and secure dependency management.", "dependencies": { - "@zkochan/cmd-shim": "^2.2.4", + "@zkochan/cmd-shim": "^3.1.0", "babel-runtime": "^6.26.0", "bytes": "^3.0.0", "camelcase": "^4.0.0", "chalk": "^2.1.0", - "cli-table3": "^0.5.1", + "cli-table3": "^0.4.0", "commander": "^2.9.0", "death": "^1.0.0", "debug": "^3.0.0", @@ -23,7 +23,7 @@ "hash-for-dep": "^1.2.3", "imports-loader": "^0.8.0", "ini": "^1.3.4", - "inquirer": "^3.0.1", + "inquirer": "^6.2.0", "invariant": "^2.2.0", "is-builtin-module": "^2.0.0", "is-ci": "^1.0.10", @@ -78,7 +78,7 @@ "eslint-plugin-prefer-object-spread": "^1.2.1", "eslint-plugin-prettier": "^2.1.2", "eslint-plugin-react": "^7.1.0", - "eslint-plugin-relay": "^0.0.24", + "eslint-plugin-relay": "^0.0.28", "eslint-plugin-yarn-internal": "file:scripts/eslint-rules", "execa": "^0.11.0", "fancy-log": "^1.3.2", @@ -95,6 +95,7 @@ "minimatch": "^3.0.4", "mock-stdin": "^0.3.0", "prettier": "^1.5.2", + "string-replace-loader": "^2.1.1", "temp": "^0.8.3", "webpack": "^2.1.0-beta.25", "yargs": "^6.3.0" diff --git a/packages/pkg-tests/.gitignore b/packages/pkg-tests/.gitignore index 93cab344de..238b09ea37 100644 --- a/packages/pkg-tests/.gitignore +++ b/packages/pkg-tests/.gitignore @@ -1,2 +1,3 @@ node_modules yarn-error.log +junit.xml \ No newline at end of file diff --git a/packages/pkg-tests/package.json b/packages/pkg-tests/package.json index f3bc9a3682..2b7e1fa77a 100644 --- a/packages/pkg-tests/package.json +++ b/packages/pkg-tests/package.json @@ -11,6 +11,7 @@ "babel-preset-flow": "^6.23.0", "flow-bin": "^0.66.0", "jest": "^23.0.0", + "jest-junit": "^5.2.0", "prettier": "^1.10.2" }, "scripts": { @@ -25,7 +26,7 @@ }, "jest": { "modulePathIgnorePatterns": [ - "[/\\\\]pkg-tests-fixtures[/\\\\]packages[/\\\\]" + "/pkg-tests-fixtures/packages/" ] } } diff --git a/packages/pkg-tests/pkg-tests-core/sources/utils/exec.js b/packages/pkg-tests/pkg-tests-core/sources/utils/exec.js index ad499b4605..244866ac91 100644 --- a/packages/pkg-tests/pkg-tests-core/sources/utils/exec.js +++ b/packages/pkg-tests/pkg-tests-core/sources/utils/exec.js @@ -12,6 +12,8 @@ exports.execFile = function( if (error) { reject(error); } else { + stdout = stdout.replace(/\r\n?/g, `\n`); + stderr = stderr.replace(/\r\n?/g, `\n`); resolve({stdout, stderr}); } }); diff --git a/packages/pkg-tests/pkg-tests-core/sources/utils/fs.js b/packages/pkg-tests/pkg-tests-core/sources/utils/fs.js index a39f4a9058..a15aa9d383 100644 --- a/packages/pkg-tests/pkg-tests-core/sources/utils/fs.js +++ b/packages/pkg-tests/pkg-tests-core/sources/utils/fs.js @@ -11,6 +11,8 @@ const zlib = require('zlib'); const miscUtils = require('./misc'); +const IS_WIN32 = process.platform === `win32`; + exports.walk = function walk( source: string, {filter, relative = false}: {|filter?: Array, relative?: boolean|} = {}, @@ -75,13 +77,13 @@ exports.packToStream = function packToStream( const packStream = tarFs.pack(source, { map: header => { if (true) { - header.name = path.resolve('/', header.name); - header.name = path.relative('/', header.name); + header.name = path.posix.resolve('/', header.name); + header.name = path.posix.relative('/', header.name); } if (virtualPath) { - header.name = path.resolve('/', virtualPath, header.name); - header.name = path.relative('/', header.name); + header.name = path.posix.resolve('/', virtualPath, header.name); + header.name = path.posix.relative('/', header.name); } return header; @@ -186,6 +188,9 @@ exports.makeFakeBinary = async function( target: string, {output = `Fake binary`, exitCode = 1}: {|output: string, exitCode: number|} = {}, ): Promise { - await exports.writeFile(target, `#!/bin/sh\necho "${output}"\nexit ${exitCode}\n`); - await exports.chmod(target, 0o755); + const realTarget = IS_WIN32 ? `${target}.cmd` : target; + const header = IS_WIN32 ? `@echo off\n` : `#!/bin/sh\n`; + + await exports.writeFile(realTarget, `${header}echo ${output}\nexit ${exitCode}\n`); + await exports.chmod(realTarget, 0o755); }; diff --git a/packages/pkg-tests/pkg-tests-core/sources/utils/tests.js b/packages/pkg-tests/pkg-tests-core/sources/utils/tests.js index f1a9e20132..388e74bd38 100644 --- a/packages/pkg-tests/pkg-tests-core/sources/utils/tests.js +++ b/packages/pkg-tests/pkg-tests-core/sources/utils/tests.js @@ -364,3 +364,9 @@ exports.generatePkgDriver = function generatePkgDriver({runDriver}: {|runDriver: return withConfig({}); }; + +exports.testIf = function testIf(condition, ...args) { + if (condition()) { + test(...args); + } +}; diff --git a/packages/pkg-tests/pkg-tests-fixtures/packages/invalid-main-1.0.0/index.js b/packages/pkg-tests/pkg-tests-fixtures/packages/invalid-main-1.0.0/index.js new file mode 100644 index 0000000000..a6bf8f5865 --- /dev/null +++ b/packages/pkg-tests/pkg-tests-fixtures/packages/invalid-main-1.0.0/index.js @@ -0,0 +1,10 @@ +/* @flow */ + +module.exports = require(`./package.json`); + +for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { + for (const dep of Object.keys(module.exports[key] || {})) { + // $FlowFixMe The whole point of this file is to be dynamic + module.exports[key][dep] = require(dep); + } +} diff --git a/packages/pkg-tests/pkg-tests-fixtures/packages/invalid-main-1.0.0/package.json b/packages/pkg-tests/pkg-tests-fixtures/packages/invalid-main-1.0.0/package.json new file mode 100644 index 0000000000..90bc5010e2 --- /dev/null +++ b/packages/pkg-tests/pkg-tests-fixtures/packages/invalid-main-1.0.0/package.json @@ -0,0 +1,5 @@ +{ + "name": "invalid-main", + "version": "1.0.0", + "main": "DoesntExists" +} diff --git a/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/package.json b/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/package.json index 294c8b4d37..8bd8ad90b9 100644 --- a/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/package.json +++ b/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/package.json @@ -2,8 +2,8 @@ "name": "no-deps-scripted", "version": "1.0.0", "scripts": { - "preinstall": "echo 'module.exports.push(100);' >> log.js", - "install": "echo 'module.exports.push(200);' >> log.js", - "postinstall": "echo 'module.exports.push(300);' >> log.js; echo 'module.exports = '\"$(node -p 'Math.floor(Math.random() * 512000)')\"';' > rnd.js" + "preinstall": "node scripts/preinstall", + "install": "node scripts/install", + "postinstall": "node scripts/postinstall" } } diff --git a/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/install.js b/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/install.js new file mode 100644 index 0000000000..b125c4eb93 --- /dev/null +++ b/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/install.js @@ -0,0 +1,3 @@ +const fs = require(`fs`); + +fs.appendFileSync(`${__dirname}/../log.js`, `module.exports.push('install');`); diff --git a/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/postinstall.js b/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/postinstall.js new file mode 100644 index 0000000000..b415a0022d --- /dev/null +++ b/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/postinstall.js @@ -0,0 +1,4 @@ +const fs = require(`fs`); + +fs.appendFileSync(`${__dirname}/../log.js`, `module.exports.push('postinstall');`); +fs.appendFileSync(`${__dirname}/../rnd.js`, `module.exports = ${Math.floor(Math.random() * 512000)};`); diff --git a/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/preinstall.js b/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/preinstall.js new file mode 100644 index 0000000000..b3e152ba1f --- /dev/null +++ b/packages/pkg-tests/pkg-tests-fixtures/packages/no-deps-scripted-1.0.0/scripts/preinstall.js @@ -0,0 +1,3 @@ +const fs = require(`fs`); + +fs.appendFileSync(`${__dirname}/../log.js`, `module.exports.push('preinstall');`); diff --git a/packages/pkg-tests/pkg-tests-fixtures/packages/one-dep-scripted-1.0.0/index.js b/packages/pkg-tests/pkg-tests-fixtures/packages/one-dep-scripted-1.0.0/index.js new file mode 100644 index 0000000000..a6bf8f5865 --- /dev/null +++ b/packages/pkg-tests/pkg-tests-fixtures/packages/one-dep-scripted-1.0.0/index.js @@ -0,0 +1,10 @@ +/* @flow */ + +module.exports = require(`./package.json`); + +for (const key of [`dependencies`, `devDependencies`, `peerDependencies`]) { + for (const dep of Object.keys(module.exports[key] || {})) { + // $FlowFixMe The whole point of this file is to be dynamic + module.exports[key][dep] = require(dep); + } +} diff --git a/packages/pkg-tests/pkg-tests-fixtures/packages/one-dep-scripted-1.0.0/package.json b/packages/pkg-tests/pkg-tests-fixtures/packages/one-dep-scripted-1.0.0/package.json new file mode 100644 index 0000000000..a080c7ce4f --- /dev/null +++ b/packages/pkg-tests/pkg-tests-fixtures/packages/one-dep-scripted-1.0.0/package.json @@ -0,0 +1,10 @@ +{ + "name": "one-dep-scripted", + "version": "1.0.0", + "dependencies": { + "has-bin-entries": "1.0.0" + }, + "scripts": { + "install": "has-bin-entries" + } +} diff --git a/packages/pkg-tests/pkg-tests-specs/package.json b/packages/pkg-tests/pkg-tests-specs/package.json index 5ef9b6ab96..5b84ce264f 100644 --- a/packages/pkg-tests/pkg-tests-specs/package.json +++ b/packages/pkg-tests/pkg-tests-specs/package.json @@ -4,6 +4,7 @@ "main": "./sources/index.js", "dependencies": { "fs-extra": "^7.0.0", - "pkg-tests-core": "1.0.0" + "pkg-tests-core": "1.0.0", + "semver": "^5.6.0" } } diff --git a/packages/pkg-tests/pkg-tests-specs/sources/basic.js b/packages/pkg-tests/pkg-tests-specs/sources/basic.js index 8ad67bfc99..46de091cee 100644 --- a/packages/pkg-tests/pkg-tests-specs/sources/basic.js +++ b/packages/pkg-tests/pkg-tests-specs/sources/basic.js @@ -380,5 +380,69 @@ module.exports = (makeTemporaryEnv: PackageDriver) => { }, ), ); + + test( + `it should fail if the environment does not satisfy the os platform`, + makeTemporaryEnv( + { + os: ['unicorn'], + }, + async ({path, run, source}) => { + await expect(run(`install`)).rejects.toThrow(/The platform "\w+" is incompatible with this module\./); + }, + ), + ); + + test( + `it should fail if the environment does not satisfy the cpu architecture`, + makeTemporaryEnv( + { + cpu: ['unicorn'], + }, + async ({path, run, source}) => { + await expect(run(`install`)).rejects.toThrow(/The CPU architecture "\w+" is incompatible with this module\./); + }, + ), + ); + + test( + `it should fail if the environment does not satisfy the engine requirements`, + makeTemporaryEnv( + { + engines: { + node: "0.18.1" + } + }, + async ({path, run, source}) => { + await expect(run(`install`)).rejects.toThrow(/The engine "node" is incompatible with this module\. Expected version "0.18.1"./); + }, + ), + ); + + test( + `it should not fail if the environment does not satisfy the os and cpu architecture but ignore platform is true`, + makeTemporaryEnv( + { + os: ['unicorn'], + }, + async ({path, run, source}) => { + await run(`install`, '--ignore-platform'); + }, + ), + ); + + test( + `it should not fail if the environment does not satisfy the engine requirements but ignore engines is true`, + makeTemporaryEnv( + { + engines: { + node: "0.18.1" + } + }, + async ({path, run, source}) => { + await run(`install`, '--ignore-engines'); + }, + ), + ); }); }; diff --git a/packages/pkg-tests/pkg-tests-specs/sources/pnp.js b/packages/pkg-tests/pkg-tests-specs/sources/pnp.js index 3c70197991..a4ed85795d 100644 --- a/packages/pkg-tests/pkg-tests-specs/sources/pnp.js +++ b/packages/pkg-tests/pkg-tests-specs/sources/pnp.js @@ -1,10 +1,11 @@ const cp = require('child_process'); const {existsSync, statSync, stat, rename, readdir, remove} = require('fs-extra'); const {relative, isAbsolute} = require('path'); +const {satisfies} = require('semver'); const { fs: {createTemporaryFolder, readFile, readJson, writeFile, writeJson}, - tests: {getPackageDirectoryPath}, + tests: {getPackageDirectoryPath, testIf}, } = require('pkg-tests-core'); module.exports = makeTemporaryEnv => { @@ -311,7 +312,7 @@ module.exports = makeTemporaryEnv => { makeTemporaryEnv( { dependencies: {[`no-deps`]: `1.0.0`}, - scripts: {myScript: `node -p 'require("no-deps/package.json").version'`}, + scripts: {myScript: `node -p "require('no-deps/package.json').version"`}, }, { plugNPlay: true, @@ -460,6 +461,110 @@ module.exports = makeTemporaryEnv => { ), ); + if (satisfies(process.versions.node, `>=8.9.0`)) { + test( + `it should support the 'paths' option from require.resolve (same dependency tree)`, + makeTemporaryEnv( + { + private: true, + workspaces: [`workspace-*`], + }, + { + plugNPlay: true, + }, + async ({path, run, source}) => { + await writeJson(`${path}/workspace-a/package.json`, { + name: `workspace-a`, + version: `1.0.0`, + dependencies: {[`no-deps`]: `1.0.0`}, + }); + + await writeJson(`${path}/workspace-b/package.json`, { + name: `workspace-b`, + version: `1.0.0`, + dependencies: {[`no-deps`]: `2.0.0`, [`one-fixed-dep`]: `1.0.0`}, + }); + + await run(`install`); + + await expect( + source( + `require(require.resolve('no-deps', {paths: ${JSON.stringify([ + `${path}/workspace-a`, + `${path}/workspace-b`, + ])}}))`, + ), + ).resolves.toMatchObject({ + name: `no-deps`, + version: `1.0.0`, + }); + }, + ), + ); + + // Skipped because not supported (we can't require files from within other dependency trees, since we couldn't + // reconcile them together: dependency tree A could think that package X has deps Y@1 while dependency tree B + // could think that X has deps Y@2 instead. Since they would share the same location on the disk, PnP wouldn't + // be able to tell which one should be used) + test.skip( + `it should support the 'paths' option from require.resolve (different dependency trees)`, + makeTemporaryEnv( + { + dependencies: {}, + }, + { + plugNPlay: true, + }, + async ({path, run, source}) => { + await run(`install`); + + const tmpA = await createTemporaryFolder(); + const tmpB = await createTemporaryFolder(); + + await writeJson(`${tmpA}/package.json`, { + dependencies: {[`no-deps`]: `1.0.0`}, + }); + + await writeJson(`${tmpB}/package.json`, { + dependencies: {[`no-deps`]: `2.0.0`, [`one-fixed-dep`]: `1.0.0`}, + }); + + await run(`install`, { + cwd: tmpA, + }); + + await run(`install`, { + cwd: tmpB, + }); + + await expect( + source(`require(require.resolve('no-deps', {paths: ${JSON.stringify([tmpA, tmpB])}}))`), + ).resolves.toMatchObject({ + name: `no-deps`, + version: `1.0.0`, + }); + }, + ), + ); + + test( + `using require.resolve with unsupported options should throw`, + makeTemporaryEnv( + { + dependencies: {[`no-deps`]: `1.0.0`}, + }, + { + plugNPlay: true, + }, + async ({path, run, source}) => { + await run(`install`); + + await expect(source(`require.resolve('no-deps', {foobar: 42})`)).rejects.toBeTruthy(); + }, + ), + ); + } + test( `it should load the index.js file when loading from a folder`, makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { @@ -469,7 +574,7 @@ module.exports = makeTemporaryEnv => { await writeFile(`${tmp}/folder/index.js`, `module.exports = 42;`); - await expect(source(`require("${tmp}/folder")`)).resolves.toEqual(42); + await expect(source(`require(${JSON.stringify(tmp)} + "/folder")`)).resolves.toEqual(42); }), ); @@ -482,10 +587,30 @@ module.exports = makeTemporaryEnv => { await writeFile(`${tmp}/file.js`, `module.exports = 42;`); - await expect(source(`require("${tmp}/file")`)).resolves.toEqual(42); + await expect(source(`require(${JSON.stringify(tmp)} + "/file")`)).resolves.toEqual(42); }), ); + test( + `it should ignore the "main" entry if it doesn't resolve`, + makeTemporaryEnv( + { + dependencies: { + [`invalid-main`]: `1.0.0`, + }, + }, + {plugNPlay: true}, + async ({path, run, source}) => { + await run(`install`); + + await expect(source(`require("invalid-main")`)).resolves.toMatchObject({ + name: `invalid-main`, + version: `1.0.0`, + }); + }, + ), + ); + test( `it should use the regular Node resolution when requiring files outside of the pnp install tree`, makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { @@ -496,7 +621,7 @@ module.exports = makeTemporaryEnv => { await writeFile(`${tmp}/node_modules/dep/index.js`, `module.exports = 42;`); await writeFile(`${tmp}/index.js`, `require('dep')`); - await source(`require("${tmp}/index.js")`); + await source(`require(${JSON.stringify(tmp)} + "/index.js")`); }), ); @@ -619,7 +744,8 @@ module.exports = makeTemporaryEnv => { ), ); - test( + testIf( + () => process.platform !== 'win32', `it should generate a file that can be used as an executable to resolve a request (valid request)`, makeTemporaryEnv( { @@ -648,7 +774,8 @@ module.exports = makeTemporaryEnv => { ), ); - test( + testIf( + () => process.platform !== `win32`, `it should generate a file that can be used as an executable to resolve a request (builtin request)`, makeTemporaryEnv( { @@ -672,7 +799,8 @@ module.exports = makeTemporaryEnv => { ), ); - test( + testIf( + () => process.platform !== `win32`, `it should generate a file that can be used as an executable to resolve a request (invalid request)`, makeTemporaryEnv( { @@ -1235,5 +1363,97 @@ module.exports = makeTemporaryEnv => { }, ), ); + + test( + `it should not break spawning new Node processes ('node' command)`, + makeTemporaryEnv( + { + dependencies: {[`no-deps`]: `1.0.0`}, + }, + {plugNPlay: true}, + async ({path, run, source}) => { + await run(`install`); + + await writeFile(`${path}/script.js`, `console.log(JSON.stringify(require('no-deps')))`); + + await expect( + source( + `JSON.parse(require('child_process').execFileSync(process.execPath, [${JSON.stringify( + `${path}/script.js`, + )}]).toString())`, + ), + ).resolves.toMatchObject({ + name: `no-deps`, + version: `1.0.0`, + }); + }, + ), + ); + + test( + `it should not break spawning new Node processes ('run' command)`, + makeTemporaryEnv( + { + dependencies: {[`no-deps`]: `1.0.0`}, + scripts: {[`script`]: `node main.js`}, + }, + {plugNPlay: true}, + async ({path, run, source}) => { + await run(`install`); + + await writeFile(`${path}/sub.js`, `console.log(JSON.stringify(require('no-deps')))`); + await writeFile( + `${path}/main.js`, + `console.log(require('child_process').execFileSync(process.execPath, [${JSON.stringify( + `${path}/sub.js`, + )}]).toString())`, + ); + + expect(JSON.parse((await run(`run`, `script`)).stdout)).toMatchObject({ + name: `no-deps`, + version: `1.0.0`, + }); + }, + ), + ); + + test( + `it should properly forward the NODE_OPTIONS environment variable`, + makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { + await run(`install`); + + await writeFile(`${path}/foo.js`, `console.log(42);`); + + await expect( + run(`node`, `-e`, `console.log(21);`, {env: {NODE_OPTIONS: `--require ${path}/foo`}}), + ).resolves.toMatchObject({ + // Note that '42' is present twice: the first one because Node executes Yarn, and the second one because Yarn spawns Node + stdout: `42\n42\n21\n`, + }); + }), + ); + + test( + `it should transparently support the "resolve" package`, + makeTemporaryEnv( + { + dependencies: { + [`resolve`]: `https://github.com/browserify/resolve.git`, + }, + resolutions: { + [`path-parse`]: `https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz`, + }, + }, + {plugNPlay: true}, + async ({path, run, source}) => { + await run(`install`); + + await expect(source(`require('resolve').sync('resolve')`)).resolves.toEqual( + await source(`require.resolve('resolve')`), + ); + }, + ), + 15000, + ); }); }; diff --git a/packages/pkg-tests/pkg-tests-specs/sources/pnpapi-v1.js b/packages/pkg-tests/pkg-tests-specs/sources/pnpapi-v1.js index e56fb700e8..29be4c2faf 100644 --- a/packages/pkg-tests/pkg-tests-specs/sources/pnpapi-v1.js +++ b/packages/pkg-tests/pkg-tests-specs/sources/pnpapi-v1.js @@ -1,9 +1,10 @@ +const {normalize} = require('path'); const {fs: {writeFile, writeJson}} = require('pkg-tests-core'); module.exports = makeTemporaryEnv => { describe(`Plug'n'Play API (v1)`, () => { test( - `it should expost VERSIONS`, + `it should expose VERSIONS`, makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { await run(`install`); @@ -12,7 +13,7 @@ module.exports = makeTemporaryEnv => { ); test( - `it should expost resolveToUnqualified`, + `it should expose resolveToUnqualified`, makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { await run(`install`); @@ -21,7 +22,7 @@ module.exports = makeTemporaryEnv => { ); test( - `it should expost resolveToUnqualified`, + `it should expose resolveToUnqualified`, makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { await run(`install`); @@ -30,7 +31,7 @@ module.exports = makeTemporaryEnv => { ); test( - `it should expost resolveToUnqualified`, + `it should expose resolveToUnqualified`, makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { await run(`install`); @@ -39,12 +40,25 @@ module.exports = makeTemporaryEnv => { ); describe(`resolveRequest`, () => { + test( + `it should return the path to the PnP file for when 'pnpapi' is requested`, + makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { + await run(`install`); + + await expect( + source(`require('pnpapi').resolveRequest('pnpapi', ${JSON.stringify(path + '/')})`), + ).resolves.toEqual(normalize(`${path}/.pnp.js`)); + }), + ); + test( `it should return null for builtins`, makeTemporaryEnv({}, {plugNPlay: true}, async ({path, run, source}) => { await run(`install`); - await expect(source(`require('pnpapi').resolveRequest('fs', '${path}/')`)).resolves.toEqual(null); + await expect( + source(`require('pnpapi').resolveRequest('fs', ${JSON.stringify(path)} + '/')`), + ).resolves.toEqual(null); }), ); @@ -65,8 +79,10 @@ module.exports = makeTemporaryEnv => { await run(`install`); await expect( - source(`require('pnpapi').resolveRequest('fs', '${path}/', {considerBuiltins: false})`), - ).resolves.toEqual(`${path}/fs/index.js`); + source( + `require('pnpapi').resolveRequest('fs', ${JSON.stringify(path)} + '/', {considerBuiltins: false})`, + ), + ).resolves.toEqual(normalize(`${path}/fs/index.js`)); }, ), ); @@ -79,8 +95,8 @@ module.exports = makeTemporaryEnv => { await run(`install`); await expect( - source(`require('pnpapi').resolveRequest('./foo', '${path}/', {extensions: ['.bar']})`), - ).resolves.toEqual(`${path}/foo.bar`); + source(`require('pnpapi').resolveRequest('./foo', ${JSON.stringify(path)} + '/', {extensions: ['.bar']})`), + ).resolves.toEqual(normalize(`${path}/foo.bar`)); }), ); }); diff --git a/packages/pkg-tests/pkg-tests-specs/sources/script.js b/packages/pkg-tests/pkg-tests-specs/sources/script.js index 999d6c452c..44f6a6f58e 100644 --- a/packages/pkg-tests/pkg-tests-specs/sources/script.js +++ b/packages/pkg-tests/pkg-tests-specs/sources/script.js @@ -12,22 +12,18 @@ module.exports = (makeTemporaryEnv: PackageDriver) => { test( `it should run scripts using the same Node than the one used by Yarn`, makeTemporaryEnv({scripts: {myScript: `node --version`}}, async ({path, run, source}) => { - await makeFakeBinary(`${path}/bin/node`); + await makeFakeBinary(`${path}/bin/node`, {exitCode: 1}); - await expect(run(`run`, `myScript`)).resolves.toMatchObject({ - stdout: `${process.version}\n`, - }); + await expect(run(`run`, `myScript`)).resolves.toBeTruthy(); }), ); test( `it should run scripts using the same package manager than the one running the scripts`, makeTemporaryEnv({scripts: {myScript: `yarn --version`}}, async ({path, run, source}) => { - await makeFakeBinary(`${path}/bin/yarn`); + await makeFakeBinary(`${path}/bin/yarn`, {exitCode: 1}); - await expect(run(`run`, `myScript`)).resolves.toMatchObject({ - stdout: (await run(`--version`)).stdout, - }); + await expect(run(`run`, `myScript`)).resolves.toBeTruthy(); }), ); @@ -200,8 +196,24 @@ module.exports = (makeTemporaryEnv: PackageDriver) => { makeTemporaryEnv({dependencies: {[`no-deps-scripted`]: `1.0.0`}}, async ({path, run, source}) => { await run(`install`); - await expect(source(`require('no-deps-scripted/log.js')`)).resolves.toEqual([100, 200, 300]); + await expect(source(`require('no-deps-scripted/log.js')`)).resolves.toEqual([ + 'preinstall', + 'install', + 'postinstall', + ]); }), ); + + test( + `it should allow dependencies with install scripts to run the binaries exposed by their own dependencies`, + makeTemporaryEnv( + { + dependencies: {[`one-dep-scripted`]: `1.0.0`}, + }, + async ({path, run, source}) => { + await run(`install`); + }, + ), + ); }); }; diff --git a/packages/pkg-tests/yarn.lock b/packages/pkg-tests/yarn.lock index 8adeb97797..77bfd7e361 100644 --- a/packages/pkg-tests/yarn.lock +++ b/packages/pkg-tests/yarn.lock @@ -363,6 +363,14 @@ babel-jest@^23.0.1: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.0.1" +babel-jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" + integrity sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew== + dependencies: + babel-plugin-istanbul "^4.1.6" + babel-preset-jest "^23.2.0" + babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" @@ -388,6 +396,11 @@ babel-plugin-jest-hoist@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.1.tgz#eaa11c964563aea9c21becef2bdf7853f7f3c148" +babel-plugin-jest-hoist@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" + integrity sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc= + babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" @@ -660,6 +673,14 @@ babel-preset-jest@^23.0.1: babel-plugin-jest-hoist "^23.0.1" babel-plugin-syntax-object-rest-spread "^6.13.0" +babel-preset-jest@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" + integrity sha1-jsegOhOPABoaj7HoETZSvxpV2kY= + dependencies: + babel-plugin-jest-hoist "^23.2.0" + babel-plugin-syntax-object-rest-spread "^6.13.0" + babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" @@ -689,7 +710,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: +babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: @@ -703,7 +724,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: +babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: @@ -808,6 +829,13 @@ browser-resolve@^1.11.2: dependencies: resolve "1.1.7" +browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== + dependencies: + resolve "1.1.7" + browserslist@^2.1.2: version "2.11.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" @@ -1244,6 +1272,18 @@ expect@^23.1.0: jest-message-util "^23.1.0" jest-regex-util "^23.0.0" +expect@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" + integrity sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w== + dependencies: + ansi-styles "^3.2.0" + jest-diff "^23.6.0" + jest-get-type "^22.1.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -2016,6 +2056,26 @@ jest-config@^23.1.0: jest-validate "^23.0.1" pretty-format "^23.0.1" +jest-config@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" + integrity sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ== + dependencies: + babel-core "^6.0.0" + babel-jest "^23.6.0" + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^23.4.0" + jest-environment-node "^23.4.0" + jest-get-type "^22.1.0" + jest-jasmine2 "^23.6.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + pretty-format "^23.6.0" + jest-diff@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.1.tgz#3d49137cee12c320a4b4d2b4a6fa6e82d491a16a" @@ -2025,6 +2085,16 @@ jest-diff@^23.0.1: jest-get-type "^22.1.0" pretty-format "^23.0.1" +jest-diff@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" + integrity sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g== + dependencies: + chalk "^2.0.1" + diff "^3.2.0" + jest-get-type "^22.1.0" + pretty-format "^23.6.0" + jest-docblock@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.0.1.tgz#deddd18333be5dc2415260a04ef3fce9276b5725" @@ -2038,6 +2108,14 @@ jest-each@^23.1.0: chalk "^2.0.1" pretty-format "^23.0.1" +jest-each@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" + integrity sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg== + dependencies: + chalk "^2.0.1" + pretty-format "^23.6.0" + jest-environment-jsdom@^23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.1.0.tgz#85929914e23bed3577dac9755f4106d0697c479c" @@ -2046,6 +2124,15 @@ jest-environment-jsdom@^23.1.0: jest-util "^23.1.0" jsdom "^11.5.1" +jest-environment-jsdom@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" + integrity sha1-BWp5UrP+pROsYqFAosNox52eYCM= + dependencies: + jest-mock "^23.2.0" + jest-util "^23.4.0" + jsdom "^11.5.1" + jest-environment-node@^23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.1.0.tgz#452c0bf949cfcbbacda1e1762eeed70bc784c7d5" @@ -2053,6 +2140,14 @@ jest-environment-node@^23.1.0: jest-mock "^23.1.0" jest-util "^23.1.0" +jest-environment-node@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" + integrity sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA= + dependencies: + jest-mock "^23.2.0" + jest-util "^23.4.0" + jest-get-type@^22.1.0: version "22.1.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" @@ -2085,6 +2180,35 @@ jest-jasmine2@^23.1.0: jest-util "^23.1.0" pretty-format "^23.0.1" +jest-jasmine2@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" + integrity sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ== + dependencies: + babel-traverse "^6.0.0" + chalk "^2.0.1" + co "^4.6.0" + expect "^23.6.0" + is-generator-fn "^1.0.0" + jest-diff "^23.6.0" + jest-each "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + pretty-format "^23.6.0" + +jest-junit@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-5.2.0.tgz#980401db7aa69999cf117c6d740a8135c22ae379" + integrity sha512-Mdg0Qpdh1Xm/FA1B/mcLlmEmlr3XzH5pZg7MvcAwZhjHijPRd1z/UwYwkwNHmCV7o4ZOWCf77nLu7ZkhHHrtJg== + dependencies: + jest-config "^23.6.0" + jest-validate "^23.0.1" + mkdirp "^0.5.1" + strip-ansi "^4.0.0" + xml "^1.0.1" + jest-leak-detector@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.1.tgz#9dba07505ac3495c39d3ec09ac1e564599e861a0" @@ -2099,6 +2223,15 @@ jest-matcher-utils@^23.0.1: jest-get-type "^22.1.0" pretty-format "^23.0.1" +jest-matcher-utils@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" + integrity sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog== + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + pretty-format "^23.6.0" + jest-message-util@^23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.1.0.tgz#9a809ba487ecac5ce511d4e698ee3b5ee2461ea9" @@ -2109,14 +2242,35 @@ jest-message-util@^23.1.0: slash "^1.0.0" stack-utils "^1.0.1" +jest-message-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" + integrity sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8= + dependencies: + "@babel/code-frame" "^7.0.0-beta.35" + chalk "^2.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + stack-utils "^1.0.1" + jest-mock@^23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.1.0.tgz#a381c31b121ab1f60c462a2dadb7b86dcccac487" +jest-mock@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" + integrity sha1-rRxg8p6HGdR8JuETgJi20YsmETQ= + jest-regex-util@^23.0.0: version "23.0.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0.tgz#dd5c1fde0c46f4371314cf10f7a751a23f4e8f76" +jest-regex-util@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" + integrity sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U= + jest-resolve-dependencies@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.1.tgz#d01a10ddad9152c4cecdf5eac2b88571c4b6a64d" @@ -2132,6 +2286,15 @@ jest-resolve@^23.1.0: chalk "^2.0.1" realpath-native "^1.0.0" +jest-resolve@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" + integrity sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA== + dependencies: + browser-resolve "^1.11.3" + chalk "^2.0.1" + realpath-native "^1.0.0" + jest-runner@^23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.1.0.tgz#fa20a933fff731a5432b3561e7f6426594fa29b5" @@ -2191,6 +2354,22 @@ jest-snapshot@^23.0.1: natural-compare "^1.4.0" pretty-format "^23.0.1" +jest-snapshot@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" + integrity sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg== + dependencies: + babel-types "^6.0.0" + chalk "^2.0.1" + jest-diff "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-resolve "^23.6.0" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^23.6.0" + semver "^5.5.0" + jest-util@^23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.1.0.tgz#c0251baf34644c6dd2fea78a962f4263ac55772d" @@ -2204,6 +2383,20 @@ jest-util@^23.1.0: slash "^1.0.0" source-map "^0.6.0" +jest-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" + integrity sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE= + dependencies: + callsites "^2.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + jest-message-util "^23.4.0" + mkdirp "^0.5.1" + slash "^1.0.0" + source-map "^0.6.0" + jest-validate@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.1.tgz#cd9f01a89d26bb885f12a8667715e9c865a5754f" @@ -2213,6 +2406,16 @@ jest-validate@^23.0.1: leven "^2.1.0" pretty-format "^23.0.1" +jest-validate@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" + integrity sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A== + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + leven "^2.1.0" + pretty-format "^23.6.0" + jest-watcher@^23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.1.0.tgz#a8d5842e38d9fb4afff823df6abb42a58ae6cdbd" @@ -2859,6 +3062,14 @@ pretty-format@^23.0.1: ansi-regex "^3.0.0" ansi-styles "^3.2.0" +pretty-format@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" + integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== + dependencies: + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" + private@^0.1.6, private@^0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -3150,6 +3361,11 @@ sax@^1.2.4: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +semver@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -3720,6 +3936,11 @@ xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" +xml@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= + xtend@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" diff --git a/packages/pkg-tests/yarn.test.js b/packages/pkg-tests/yarn.test.js index 25b5d968f0..ca5c274a1c 100644 --- a/packages/pkg-tests/yarn.test.js +++ b/packages/pkg-tests/yarn.test.js @@ -21,7 +21,7 @@ const pkgDriver = generatePkgDriver({ async runDriver( path, [command, ...args], - {cwd, projectFolder, registryUrl, plugNPlay, plugnplayShebang, plugnplayBlacklist}, + {cwd, projectFolder, registryUrl, plugNPlay, plugnplayShebang, plugnplayBlacklist, env}, ) { let beforeArgs = []; let middleArgs = []; @@ -49,6 +49,7 @@ const pkgDriver = generatePkgDriver({ [`PATH`]: `${path}/bin${delimiter}${process.env.PATH}`, }, plugNPlay ? {[`YARN_PLUGNPLAY_OVERRIDE`]: plugNPlay ? `1` : `0`} : {}, + env, ), cwd: cwd || path, }, @@ -65,6 +66,10 @@ const pkgDriver = generatePkgDriver({ }, }); +if (process.platform === `win32`) { + jest.setTimeout(10000); +} + beforeEach(async () => { await startPackageServer(); await getPackageRegistry(); diff --git a/resources/win-chocolatey/tools/chocolateyinstall.ps1.in b/resources/win-chocolatey/tools/chocolateyinstall.ps1.in index 05e40cf3ab..1134bd8311 100644 --- a/resources/win-chocolatey/tools/chocolateyinstall.ps1.in +++ b/resources/win-chocolatey/tools/chocolateyinstall.ps1.in @@ -1,10 +1,12 @@ -$ErrorActionPreference = 'Stop'; # stop on all errors +$ErrorActionPreference = 'Stop'; # stop on all errors + $packageName = 'yarn' + $packageArgs = @{ packageName = $packageName softwareName = 'Yarn*' fileType = 'msi' - silentArgs = "/qn /norestart /l*v `"$env:TEMP\chocolatey\$($packageName)\$($packageName).MsiInstall.log`"" + silentArgs = "/qn /norestart" validExitCodes = @(0, 3010, 1641) checksumType = 'sha256' @@ -20,9 +22,17 @@ if (Test-Path "${env:ProgramFiles(x86)}\Yarn\package.json") { } else { $path = "$env:ProgramFiles\Yarn\package.json" } + $script = @" (Get-Content -Path '$path') `` -replace 'installationMethod":.+', 'installationMethod": "choco",' `` | Set-Content '$path' "@ + Start-ChocolateyProcessAsAdmin -Statements $script + +if (-Not (Get-Command "node" -errorAction SilentlyContinue)) { + Write-Host "Yarn requires NodeJS to be installed. To install, use either of the commands below:" + Write-Host "choco install nodejs" + Write-Host "choco install nodejs-lts" +} diff --git a/resources/win-chocolatey/yarn.nuspec b/resources/win-chocolatey/yarn.nuspec index 629771a146..feccc54aa9 100644 --- a/resources/win-chocolatey/yarn.nuspec +++ b/resources/win-chocolatey/yarn.nuspec @@ -10,21 +10,19 @@ yarn node nodejs npm javascript packages bower admin Package manager for the npm and bower package repositories -Yarn is a package manager for the npm and bower registries with a few specific -focuses. +Yarn is a package manager for the npm and bower registries with a few specific focuses. -**Determinism:** Based around a version lockfile which ensures that operations on -the dependency graph can be easily transitioned. We check module directories -and verify their integrity to ensure Yarn install always produces the same file -structure. +## Features -**Security:** Strict guarantees are placed around package installation. You have -control over whether lifecycle scripts are executed for packages and package -hashes are stored in the lockfile to ensure you get the same package each time. +**Determinism:** Based around a version lockfile which ensures that operations on the dependency graph can be easily transitioned. We check module directories and verify their integrity to ensure Yarn install always produces the same file structure. -**Performance:** We're always performing operations such as package resolving and -fetching in parallel. This ensures little idle time and maximum resource -utilization. +**Security:** Strict guarantees are placed around package installation. You have control over whether lifecycle scripts are executed for packages and package hashes are stored in the lockfile to ensure you get the same package each time. + +**Performance:** We're always performing operations such as package resolving and fetching in parallel. This ensures little idle time and maximum resource utilization. + +## Notes + +This package requires NodeJS. You can install via either the [nodejs](https://chocolatey.org/packages/nodejs) or [nodejs-lts](https://chocolatey.org/packages/nodejs-lts) package if you do not have it installed already. https://yarnpkg.com/ https://github.com/yarnpkg/yarn/tree/master/resources/win-chocolatey @@ -35,9 +33,6 @@ utilization. https://yarnpkg.com/en/docs/ https://github.com/yarnpkg/yarn/issues https://github.com/yarnpkg/yarn/releases/tag/v$version$ - - - diff --git a/scripts/azure-run-tests.yml b/scripts/azure-run-tests.yml new file mode 100644 index 0000000000..45e105d047 --- /dev/null +++ b/scripts/azure-run-tests.yml @@ -0,0 +1,30 @@ +steps: + +- task: NodeTool@0 + inputs: + versionSpec: $(node_version) + displayName: 'Install Node.js' + +- bash: | + yarn + yarn run build + ls -lhR bin + ls -lhR lib + displayName: 'Install and build' + +- script: | + cd packages/pkg-tests + yarn + displayName: 'Install the acceptance tests' + +- script: | + cd packages/pkg-tests + yarn jest yarn --reporters=default --reporters=jest-junit + displayName: 'Run the acceptance tests' + +- task: PublishTestResults@2 + inputs: + testResultsFiles: '**/junit.xml' + testRunTitle: $(os_name) Node $(node_version) + displayName: 'Publishing the test results' + condition: always() diff --git a/scripts/build-chocolatey.ps1 b/scripts/build-chocolatey.ps1 index 081b627285..8841eeca4d 100644 --- a/scripts/build-chocolatey.ps1 +++ b/scripts/build-chocolatey.ps1 @@ -25,15 +25,13 @@ if ($Env:YARN_VERSION) { $latest_version = [String](Invoke-WebRequest -Uri https://yarnpkg.com/latest-version -UseBasicParsing) } -$latest_chocolatey_version = (Find-Package -Name Yarn).Version - -if ([Version]$latest_chocolatey_version -ge [Version]$latest_version) { - Write-Output ('Current version ({0}) is the latest' -f $latest_chocolatey_version) +Write-Output "Checking if $latest_version is already on Chocolatey..." +$choco_output = choco list yarn --exact --version $latest_version | Out-String +if ($choco_output -notmatch '0 packages found') { + Write-Output 'Already on Chocolatey. Nothing to do!' Exit } -Write-Output ('Latest version is {0}, version on Chocolatey is {1}. Updating...' -f $latest_version, $latest_chocolatey_version) - if (-Not (Test-Path artifacts)) { mkdir artifacts } diff --git a/scripts/build-webpack.js b/scripts/build-webpack.js index dc7b68ffae..d0b166fa2d 100755 --- a/scripts/build-webpack.js +++ b/scripts/build-webpack.js @@ -85,6 +85,15 @@ const compiler = webpack({ test: /rx\.lite\.aggregates\.js/, use: 'imports-loader?define=>false' }, + { + test: /hash-for-dep\/lib\/pkg.js/, + loader: 'string-replace-loader', + options: { + search: 'require[(]([^\'"])', + replace: '__non_webpack_require__($1', + flags: 'g' + } + } ], }, plugins: [ @@ -121,7 +130,7 @@ const compilerLegacy = webpack({ rules: [ { test: /\.js$/, - exclude: /node_modules/, + exclude: /node_modules[\\\/](?!inquirer)/, use: [ { loader:'babel-loader', diff --git a/src/cli/commands/audit.js b/src/cli/commands/audit.js index b9faa70381..ccb798d4cd 100644 --- a/src/cli/commands/audit.js +++ b/src/cli/commands/audit.js @@ -131,12 +131,19 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg }); const vulnerabilities = await audit.performAudit(manifest, install.resolver, install.linker, patterns); - const totalVulnerabilities = - vulnerabilities.info + - vulnerabilities.low + - vulnerabilities.moderate + - vulnerabilities.high + - vulnerabilities.critical; + + const EXIT_INFO = 1; + const EXIT_LOW = 2; + const EXIT_MODERATE = 4; + const EXIT_HIGH = 8; + const EXIT_CRITICAL = 16; + + const exitCode = + (vulnerabilities.info ? EXIT_INFO : 0) + + (vulnerabilities.low ? EXIT_LOW : 0) + + (vulnerabilities.moderate ? EXIT_MODERATE : 0) + + (vulnerabilities.high ? EXIT_HIGH : 0) + + (vulnerabilities.critical ? EXIT_CRITICAL : 0); if (flags.summary) { audit.summary(); @@ -144,7 +151,7 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg audit.report(); } - return totalVulnerabilities; + return exitCode; } export default class Audit { @@ -160,13 +167,18 @@ export default class Audit { _mapHoistedNodes(auditNode: AuditNode, hoistedNodes: HoistedTrees) { for (const node of hoistedNodes) { const pkg = node.manifest.pkg; + const requires = Object.assign({}, pkg.dependencies || {}, pkg.optionalDependencies || {}); + for (const name of Object.keys(requires)) { + if (!requires[name]) { + requires[name] = '*'; + } + } auditNode.dependencies[node.name] = { version: node.version, integrity: pkg._remote ? pkg._remote.integrity || '' : '', - requires: Object.assign({}, pkg.dependencies || {}, pkg.optionalDependencies || {}), + requires, dependencies: {}, }; - if (node.children) { this._mapHoistedNodes(auditNode.dependencies[node.name], node.children); } @@ -175,7 +187,7 @@ export default class Audit { _mapHoistedTreesToAuditTree(manifest: Object, hoistedTrees: HoistedTrees): AuditTree { const auditTree: AuditTree = { - name: manifest.name, + name: manifest.name || undefined, version: manifest.version || undefined, install: [], remove: [], @@ -224,12 +236,27 @@ export default class Audit { return responseJson; } + _insertWorkspacePackagesIntoManifest(manifest: Object, resolver: PackageResolver) { + if (resolver.workspaceLayout) { + const workspaceAggregatorName = resolver.workspaceLayout.virtualManifestName; + const workspaceManifest = resolver.workspaceLayout.workspaces[workspaceAggregatorName].manifest; + + manifest.dependencies = Object.assign(manifest.dependencies || {}, workspaceManifest.dependencies); + manifest.devDependencies = Object.assign(manifest.devDependencies || {}, workspaceManifest.devDependencies); + manifest.optionalDependencies = Object.assign( + manifest.optionalDependencies || {}, + workspaceManifest.optionalDependencies, + ); + } + } + async performAudit( manifest: Object, resolver: PackageResolver, linker: PackageLinker, patterns: Array, ): Promise { + this._insertWorkspacePackagesIntoManifest(manifest, resolver); const hoistedTrees = await hoistedTreeBuilder(resolver, linker, patterns); const auditTree = this._mapHoistedTreesToAuditTree(manifest, hoistedTrees); this.auditData = await this._fetchAudit(auditTree); diff --git a/src/cli/commands/cache.js b/src/cli/commands/cache.js index 240f11a80f..39945ab946 100644 --- a/src/cli/commands/cache.js +++ b/src/cli/commands/cache.js @@ -31,7 +31,7 @@ export async function getCachedPackagesDirs(config: Config, currentPath: string) const candidates = await fs.readdir(packageParentPath); invariant( candidates.length === 1, - `There should only be one folder in a package cache (got ${candidates.join(',')})`, + `There should only be one folder in a package cache (got ${candidates.join(',')} in ${packageParentPath})`, ); for (const candidate of candidates) { @@ -40,7 +40,7 @@ export async function getCachedPackagesDirs(config: Config, currentPath: string) const subCandidates = await fs.readdir(candidatePath); invariant( subCandidates.length === 1, - `There should only be one folder in a package cache (got ${subCandidates.join(',')})`, + `There should only be one folder in a package cache (got ${subCandidates.join(',')} in ${candidatePath})`, ); for (const subCandidate of subCandidates) { diff --git a/src/cli/commands/help.js b/src/cli/commands/help.js index 7405707132..7d77dd379d 100644 --- a/src/cli/commands/help.js +++ b/src/cli/commands/help.js @@ -23,7 +23,7 @@ export function run(config: Config, reporter: Reporter, commander: Object, args: const command = commands[commandName]; if (command) { command.setFlags(commander); - const examples: Array = ((command && command.examples) || []).map(example => ` $ yarn ${example}`); + const examples: Array = (command.examples || []).map(example => ` $ yarn ${example}`); if (examples.length) { commander.on('--help', () => { reporter.log(reporter.lang('helpExamples', reporter.rawText(examples.join('\n')))); diff --git a/src/cli/commands/index.js b/src/cli/commands/index.js index 182f9958aa..2a8f6a852f 100644 --- a/src/cli/commands/index.js +++ b/src/cli/commands/index.js @@ -32,6 +32,7 @@ import * as node from './node.js'; import * as outdated from './outdated.js'; import * as owner from './owner.js'; import * as pack from './pack.js'; +import * as policies from './policies.js'; import * as publish from './publish.js'; import * as remove from './remove.js'; import * as run from './run.js'; @@ -78,6 +79,7 @@ const commands = { outdated, owner, pack, + policies, prune: buildUseless("The prune command isn't necessary. `yarn install` will prune extraneous packages."), publish, remove, diff --git a/src/cli/commands/install.js b/src/cli/commands/install.js index c7387470ef..f273b5d3ed 100644 --- a/src/cli/commands/install.js +++ b/src/cli/commands/install.js @@ -56,7 +56,6 @@ type Flags = { har: boolean, ignorePlatform: boolean, ignoreEngines: boolean, - ignoreScripts: boolean, ignoreOptional: boolean, linkDuplicates: boolean, force: boolean, @@ -572,10 +571,10 @@ export class Install { this.scripts.setArtifacts(artifacts); } - if (!this.flags.ignoreEngines && typeof manifest.engines === 'object') { + if (compatibility.shouldCheck(manifest, this.flags)) { steps.push(async (curr: number, total: number) => { this.reporter.step(curr, total, this.reporter.lang('checkingManifest'), emoji.get('mag')); - await compatibility.checkOne({_reference: {}, ...manifest}, this.config, this.flags.ignoreEngines); + await this.checkCompatibility(); }); } @@ -682,10 +681,10 @@ export class Install { curr, total, this.flags.force ? this.reporter.lang('rebuildingPackages') : this.reporter.lang('buildingFreshPackages'), - emoji.get('page_with_curl'), + emoji.get('hammer'), ); - if (this.flags.ignoreScripts) { + if (this.config.ignoreScripts) { this.reporter.warn(this.reporter.lang('ignoredScripts')); } else { await this.scripts.init(flattenedTopLevelPatterns); @@ -743,6 +742,11 @@ export class Install { return flattenedTopLevelPatterns; } + async checkCompatibility(): Promise { + const {manifest} = await this.fetchRequestFromCwd(); + await compatibility.checkOne({_reference: {}, ...manifest}, this.config, this.flags.ignoreEngines); + } + async persistChanges(): Promise { // get all the different registry manifests in this folder const manifests = await this.config.getRootManifests(); diff --git a/src/cli/commands/login.js b/src/cli/commands/login.js index 73bef37ded..e9371bad9a 100644 --- a/src/cli/commands/login.js +++ b/src/cli/commands/login.js @@ -36,6 +36,10 @@ async function getCredentials( return {username, email}; } +export function getOneTimePassword(reporter: Reporter): Promise { + return reporter.question(reporter.lang('npmOneTimePassword')); +} + export async function getToken( config: Config, reporter: Reporter, @@ -45,6 +49,10 @@ export async function getToken( ): Promise<() => Promise> { const auth = registry ? config.registries.npm.getAuthByRegistry(registry) : config.registries.npm.getAuth(name); + if (config.otp) { + config.registries.npm.setOtp(config.otp); + } + if (auth) { config.registries.npm.setToken(auth); return function revoke(): Promise { diff --git a/src/cli/commands/node.js b/src/cli/commands/node.js index a8c752c1a1..9121882b9d 100644 --- a/src/cli/commands/node.js +++ b/src/cli/commands/node.js @@ -21,14 +21,16 @@ export function hasWrapper(commander: Object, args: Array): boolean { export async function run(config: Config, reporter: Reporter, flags: Object, args: Array): Promise { const pnpPath = `${config.lockfileFolder}/${PNP_FILENAME}`; + let nodeOptions = process.env.NODE_OPTIONS || ''; if (await fs.exists(pnpPath)) { - args = ['-r', pnpPath, ...args]; + nodeOptions = `--require ${pnpPath} ${nodeOptions}`; } try { await child.spawn(NODE_BIN_PATH, args, { stdio: 'inherit', cwd: flags.into || config.cwd, + env: {...process.env, NODE_OPTIONS: nodeOptions}, }); } catch (err) { throw err; diff --git a/src/cli/commands/pack.js b/src/cli/commands/pack.js index bb6c2713f5..05c78c03e6 100644 --- a/src/cli/commands/pack.js +++ b/src/cli/commands/pack.js @@ -95,7 +95,7 @@ export async function packTarball( onlyFiles.map((filename: string): string => `!${filename}`), onlyFiles.map((filename: string): string => `!${path.join(filename, '**')}`), ); - const regexes = ignoreLinesToRegex(lines, '.'); + const regexes = ignoreLinesToRegex(lines, './'); filters = filters.concat(regexes); } diff --git a/src/cli/commands/policies.js b/src/cli/commands/policies.js new file mode 100644 index 0000000000..4bd1fb6b5a --- /dev/null +++ b/src/cli/commands/policies.js @@ -0,0 +1,162 @@ +/* @flow */ + +import type {Reporter} from '../../reporters/index.js'; +import type Config from '../../config.js'; +import buildSubCommands from './_build-sub-commands.js'; +import {getRcConfigForCwd} from '../../rc.js'; +import * as fs from '../../util/fs.js'; +import {stringify} from '../../lockfile'; + +const chalk = require('chalk'); +const invariant = require('invariant'); +const path = require('path'); +const semver = require('semver'); + +type ReleaseAsset = {| + id: any, + + name: string, + browser_download_url: string, +|}; + +type Release = {| + id: any, + + draft: boolean, + prerelease: boolean, + + tag_name: string, + version: {| + version: string, + |}, + + assets: Array, +|}; + +function getBundleAsset(release: Release): ?ReleaseAsset { + return release.assets.find(asset => { + return asset.name.match(/^yarn-[0-9]+\.[0-9]+\.[0-9]+\.js$/); + }); +} + +type FetchReleasesOptions = {| + includePrereleases: boolean, +|}; + +async function fetchReleases( + config: Config, + {includePrereleases = false}: FetchReleasesOptions = {}, +): Promise> { + const token = process.env.GITHUB_TOKEN; + const tokenUrlParameter = token ? `?access_token=${token}` : ''; + const request: Array = await config.requestManager.request({ + url: `https://api.github.com/repos/yarnpkg/yarn/releases${tokenUrlParameter}`, + json: true, + }); + + const releases = request.filter(release => { + if (release.draft) { + return false; + } + + if (release.prerelease && !includePrereleases) { + return false; + } + + // $FlowFixMe + release.version = semver.coerce(release.tag_name); + + if (!release.version) { + return false; + } + + if (!getBundleAsset(release)) { + return false; + } + + return true; + }); + + releases.sort((a, b) => { + // $FlowFixMe + return -semver.compare(a.version, b.version); + }); + + return releases; +} + +function fetchBundle(config: Config, url: string): Promise { + return config.requestManager.request({ + url, + buffer: true, + }); +} + +export function hasWrapper(flags: Object, args: Array): boolean { + return false; +} + +const {run, setFlags, examples} = buildSubCommands('policies', { + async setVersion(config: Config, reporter: Reporter, flags: Object, args: Array): Promise { + let range = args[0] || 'latest'; + let allowRc = flags.rc; + + reporter.log(`Resolving ${chalk.yellow(range)} to a url...`); + + if (range === 'rc') { + range = 'latest'; + allowRc = true; + } + + if (range === 'latest') { + range = '*'; + } + + let bundleUrl; + let bundleVersion; + + if (range === 'nightly' || range === 'nightlies') { + bundleUrl = 'https://nightly.yarnpkg.com/latest.js'; + bundleVersion = 'nightly'; + } else { + const releases = await fetchReleases(config, { + includePrereleases: allowRc, + }); + + const release = releases.find(release => { + // $FlowFixMe + return semver.satisfies(release.version, range); + }); + + if (!release) { + throw new Error(`Release not found: ${range}`); + } + + const asset = getBundleAsset(release); + invariant(asset, 'The bundle asset should exist'); + + bundleUrl = asset.browser_download_url; + bundleVersion = release.version.version; + } + + reporter.log(`Downloading ${chalk.green(bundleUrl)}...`); + + const bundle = await fetchBundle(config, bundleUrl); + const rc = getRcConfigForCwd(config.lockfileFolder, []); + + const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-${bundleVersion}.js`); + reporter.log(`Saving it into ${chalk.magenta(yarnPath)}...`); + await fs.mkdirp(path.dirname(yarnPath)); + await fs.writeFile(yarnPath, bundle); + await fs.chmod(yarnPath, 0o755); + + const rcPath = `${config.lockfileFolder}/.yarnrc`; + reporter.log(`Updating ${chalk.magenta(rcPath)}...`); + rc['yarn-path'] = path.relative(config.lockfileFolder, yarnPath); + await fs.writeFilePreservingEol(rcPath, `${stringify(rc)}\n`); + + reporter.log(`Done!`); + }, +}); + +export {run, setFlags, examples}; diff --git a/src/cli/commands/remove.js b/src/cli/commands/remove.js index 05af15da5b..bb71d32bfd 100644 --- a/src/cli/commands/remove.js +++ b/src/cli/commands/remove.js @@ -87,7 +87,7 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg } // reinstall so we can get the updated lockfile - reporter.step(++step, totalSteps, reporter.lang('uninstallRegenerate'), emoji.get('page_with_curl')); + reporter.step(++step, totalSteps, reporter.lang('uninstallRegenerate'), emoji.get('hammer')); const installFlags = {force: true, workspaceRootIsCwd: true, ...flags}; const reinstall = new Install(installFlags, config, new NoopReporter(), lockfile); await reinstall.init(); diff --git a/src/cli/commands/upgrade-interactive.js b/src/cli/commands/upgrade-interactive.js index 090341f53a..e5e1d77803 100644 --- a/src/cli/commands/upgrade-interactive.js +++ b/src/cli/commands/upgrade-interactive.js @@ -46,6 +46,10 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg return; } + // Fail early with runtime compatibility checks so that it doesn't fail after you've made your selections + const install = new Install(flags, config, reporter, lockfile); + await install.checkCompatibility(); + const usesWorkspaces = !!config.workspaceRootFolder; const maxLengthArr = { diff --git a/src/cli/index.js b/src/cli/index.js index 5b2ea0e050..d0c58f1c6b 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -122,6 +122,7 @@ export async function main({ ); commander.option('--no-node-version-check', 'do not warn when using a potentially unsupported Node version'); commander.option('--focus', 'Focus on a single workspace by installing remote copies of its sibling workspaces.'); + commander.option('--otp ', 'one-time password for two factor authentication'); // if -v is the first command, then always exit after returning the version if (args[0] === '-v') { @@ -290,7 +291,7 @@ export async function main({ const runEventuallyWithFile = (mutexFilename: ?string, isFirstTime?: boolean): Promise => { return new Promise(resolve => { const lockFilename = mutexFilename || path.join(config.cwd, constants.SINGLE_INSTANCE_FILENAME); - lockfile.lock(lockFilename, {realpath: false}, (err: mixed, release: () => void) => { + lockfile.lock(lockFilename, {realpath: false}, (err: mixed, release: (() => void) => void) => { if (err) { if (isFirstTime) { reporter.warn(reporter.lang('waitingInstance')); @@ -302,7 +303,7 @@ export async function main({ onDeath(() => { process.exitCode = 1; }); - resolve(run().then(release)); + resolve(run().then(() => new Promise(resolve => release(resolve)))); } }); }); @@ -527,6 +528,7 @@ export async function main({ nonInteractive: commander.nonInteractive, updateChecksums: commander.updateChecksums, focus: commander.focus, + otp: commander.otp, }) .then(() => { // lockfile check must happen after config.init sets lockfileFolder diff --git a/src/config.js b/src/config.js index 70152afa60..22dbadb0d0 100644 --- a/src/config.js +++ b/src/config.js @@ -68,6 +68,8 @@ export type ConfigOptions = { updateChecksums?: boolean, focus?: boolean, + + otp?: string, }; type PackageMetadata = { @@ -207,6 +209,8 @@ export default class Config { autoAddIntegrity: boolean; + otp: ?string; + /** * Execute a promise produced by factory if it doesn't exist in our cache with * the associated key. @@ -379,7 +383,7 @@ export default class Config { this._cacheRootFolder = String(cacheRootFolder); } - const manifest = await this.maybeReadManifest(this.cwd); + const manifest = await this.maybeReadManifest(this.lockfileFolder); const plugnplayByEnv = this.getOption('plugnplay-override'); if (plugnplayByEnv != null) { @@ -397,8 +401,8 @@ export default class Config { } if (process.platform === 'win32') { - const cacheRootFolderDrive = path.parse(this._cacheRootFolder).root; - const lockfileFolderDrive = path.parse(this.lockfileFolder).root; + const cacheRootFolderDrive = path.parse(this._cacheRootFolder).root.toLowerCase(); + const lockfileFolderDrive = path.parse(this.lockfileFolder).root.toLowerCase(); if (cacheRootFolderDrive !== lockfileFolderDrive) { if (this.plugnplayEnabled) { @@ -412,6 +416,8 @@ export default class Config { this.plugnplayShebang = String(this.getOption('plugnplay-shebang') || '') || '/usr/bin/env node'; this.plugnplayBlacklist = String(this.getOption('plugnplay-blacklist') || '') || null; + this.ignoreScripts = opts.ignoreScripts || Boolean(this.getOption('ignore-scripts', false)); + this.workspacesEnabled = this.getOption('workspaces-experimental') !== false; this.workspacesNohoistEnabled = this.getOption('workspaces-nohoist-experimental') !== false; @@ -495,6 +501,8 @@ export default class Config { this.focus = !!opts.focus; this.focusedWorkspaceName = ''; + + this.otp = opts.otp || ''; } /** diff --git a/src/constants.js b/src/constants.js index e93a098c59..cb4f587288 100644 --- a/src/constants.js +++ b/src/constants.js @@ -28,7 +28,7 @@ export const YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi'; export const SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; // cache version, bump whenever we make backwards incompatible changes -export const CACHE_VERSION = 3; +export const CACHE_VERSION = 4; // lockfile version, bump whenever we make backwards incompatible changes export const LOCKFILE_VERSION = 1; diff --git a/src/errors.js b/src/errors.js index c976c98a23..5af95a7b44 100644 --- a/src/errors.js +++ b/src/errors.js @@ -33,3 +33,5 @@ export class ResponseError extends Error { responseCode: number; } + +export class OneTimePasswordError extends Error {} diff --git a/src/fetchers/base-fetcher.js b/src/fetchers/base-fetcher.js index 94b43fbea4..692809b036 100644 --- a/src/fetchers/base-fetcher.js +++ b/src/fetchers/base-fetcher.js @@ -6,10 +6,11 @@ import type {PackageRemote, FetchedMetadata, FetchedOverride} from '../types.js' import type {RegistryNames} from '../registries/index.js'; import type Config from '../config.js'; import normalizeManifest from '../util/normalize-manifest/index.js'; -import {makePortableProxyScript} from '../util/portable-script.js'; import * as constants from '../constants.js'; import * as fs from '../util/fs.js'; +import lockMutex from '../util/mutex.js'; +const cmdShim = require('@zkochan/cmd-shim'); const path = require('path'); export default class BaseFetcher { @@ -77,7 +78,16 @@ export default class BaseFetcher { } await fs.mkdirp(binDest); - await fs.symlink(src, `${binDest}/${binName}`); + if (process.platform === 'win32') { + const unlockMutex = await lockMutex(src); + try { + await cmdShim.ifExists(src, `${binDest}/${binName}`); + } finally { + unlockMutex(); + } + } else { + await fs.symlink(src, `${binDest}/${binName}`); + } } } diff --git a/src/fetchers/tarball-fetcher.js b/src/fetchers/tarball-fetcher.js index 6f492f6773..573fcc3dcd 100644 --- a/src/fetchers/tarball-fetcher.js +++ b/src/fetchers/tarball-fetcher.js @@ -6,6 +6,7 @@ import * as constants from '../constants.js'; import BaseFetcher from './base-fetcher.js'; import * as fsUtil from '../util/fs.js'; import {removePrefix} from '../util/misc.js'; +import normalizeUrl from 'normalize-url'; const crypto = require('crypto'); const path = require('path'); @@ -190,6 +191,7 @@ export default class TarballFetcher extends BaseFetcher { hash: this.hash || hexDigest, }); }); + return {validateStream, extractorStream}; } @@ -227,11 +229,13 @@ export default class TarballFetcher extends BaseFetcher { const registry = this.config.registries[this.registry]; try { + const headers = this.requestHeaders(); return await registry.request( this.reference, { headers: { 'Accept-Encoding': 'gzip', + ...headers, }, buffer: true, process: (req, resolve, reject) => { @@ -272,6 +276,24 @@ export default class TarballFetcher extends BaseFetcher { } } + requestHeaders(): {[string]: string} { + const registry = this.config.registries.yarn; + const config = registry.config; + const requestParts = urlParts(this.reference); + return Object.keys(config).reduce((headers, option) => { + const parts = option.split(':'); + if (parts.length === 3 && parts[1] === '_header') { + const registryParts = urlParts(parts[0]); + if (requestParts.host === registryParts.host && requestParts.path.startsWith(registryParts.path)) { + const headerName = parts[2]; + const headerValue = config[option]; + headers[headerName] = headerValue; + } + } + return headers; + }, {}); + } + _fetch(): Promise { const isFilePath = this.reference.startsWith('file:'); this.reference = removePrefix(this.reference, 'file:'); @@ -328,3 +350,16 @@ export class LocalTarballFetcher extends TarballFetcher { return this.fetchFromLocal(this.reference); } } + +type UrlParts = { + host: string, + path: string, +}; + +function urlParts(requestUrl: string): UrlParts { + const normalizedUrl = normalizeUrl(requestUrl); + const parsed = url.parse(normalizedUrl); + const host = parsed.host || ''; + const path = parsed.path || ''; + return {host, path}; +} diff --git a/src/integrity-checker.js b/src/integrity-checker.js index 3f4ab4dbf1..c1f7500d26 100644 --- a/src/integrity-checker.js +++ b/src/integrity-checker.js @@ -237,7 +237,8 @@ export default class InstallationIntegrityChecker { if (flags.flat) { result.flags.push('flat'); } - if (flags.ignoreScripts) { + + if (this.config.ignoreScripts) { result.flags.push('ignoreScripts'); } if (this.config.focus) { diff --git a/src/package-compatibility.js b/src/package-compatibility.js index 5dbe96f7a2..7ba68615d3 100644 --- a/src/package-compatibility.js +++ b/src/package-compatibility.js @@ -15,6 +15,8 @@ const VERSIONS = Object.assign({}, process.versions, { yarn: yarnVersion, }); +type PartialManifest = $Shape; + function isValid(items: Array, actual: string): boolean { let isNotWhitelist = true; let isBlacklist = false; @@ -126,20 +128,17 @@ export function checkOne(info: Manifest, config: Config, ignoreEngines: boolean) } }; - const invalidPlatform = - !config.ignorePlatform && Array.isArray(info.os) && info.os.length > 0 && !isValidPlatform(info.os); + const {os, cpu, engines} = info; - if (invalidPlatform) { + if (shouldCheckPlatform(os, config.ignorePlatform) && !isValidPlatform(os)) { pushError(reporter.lang('incompatibleOS', process.platform)); } - const invalidCpu = !config.ignorePlatform && Array.isArray(info.cpu) && info.cpu.length > 0 && !isValidArch(info.cpu); - - if (invalidCpu) { + if (shouldCheckCpu(cpu, config.ignorePlatform) && !isValidArch(cpu)) { pushError(reporter.lang('incompatibleCPU', process.arch)); } - if (!ignoreEngines && typeof info.engines === 'object') { + if (shouldCheckEngines(engines, ignoreEngines)) { for (const entry of entries(info.engines)) { let name = entry[0]; const range = entry[1]; @@ -168,3 +167,26 @@ export function check(infos: Array, config: Config, ignoreEngines: boo checkOne(info, config, ignoreEngines); } } + +function shouldCheckCpu(cpu: $PropertyType, ignorePlatform: boolean): boolean %checks { + return !ignorePlatform && Array.isArray(cpu) && cpu.length > 0; +} + +function shouldCheckPlatform(os: $PropertyType, ignorePlatform: boolean): boolean %checks { + return !ignorePlatform && Array.isArray(os) && os.length > 0; +} + +function shouldCheckEngines(engines: $PropertyType, ignoreEngines: boolean): boolean %checks { + return !ignoreEngines && typeof engines === 'object'; +} + +export function shouldCheck( + manifest: PartialManifest, + options: {ignoreEngines: boolean, ignorePlatform: boolean}, +): boolean { + return ( + shouldCheckCpu(manifest.cpu, options.ignorePlatform) || + shouldCheckPlatform(manifest.os, options.ignorePlatform) || + shouldCheckEngines(manifest.engines, options.ignoreEngines) + ); +} diff --git a/src/package-hoister.js b/src/package-hoister.js index 7df285936f..84a873184a 100644 --- a/src/package-hoister.js +++ b/src/package-hoister.js @@ -838,7 +838,7 @@ export default class PackageHoister { for (let i = 0; i < keyParts.length; i++) { const key = keyParts.slice(0, i + 1).join('#'); const hoisted = this.tree.get(key); - invariant(hoisted, 'expected hoisted manifest'); + invariant(hoisted, `expected hoisted manifest for "${key}"`); parts.push(this.config.getFolder(hoisted.pkg)); parts.push(keyParts[i]); } diff --git a/src/package-linker.js b/src/package-linker.js index c0f69d921a..0a8a8931a7 100644 --- a/src/package-linker.js +++ b/src/package-linker.js @@ -444,7 +444,7 @@ export default class PackageLinker { possibleExtraneous, artifactFiles, - ignoreBasenames: [constants.METADATA_FILENAME, constants.TARBALL_FILENAME], + ignoreBasenames: [constants.METADATA_FILENAME, constants.TARBALL_FILENAME, '.bin'], onStart: (num: number) => { tick = this.reporter.progress(num); @@ -595,11 +595,15 @@ export default class PackageLinker { resolvePeerModules() { for (const pkg of this.resolver.getManifests()) { const peerDeps = pkg.peerDependencies; + const peerDepsMeta = pkg.peerDependenciesMeta; + if (!peerDeps) { continue; } + const ref = pkg._reference; invariant(ref, 'Package reference is missing'); + // TODO: We are taking the "shortest" ref tree but there may be multiple ref trees with the same length const refTree = ref.requests.map(req => req.parentNames).sort((arr1, arr2) => arr1.length - arr2.length)[0]; @@ -618,6 +622,10 @@ export default class PackageLinker { for (const peerDepName in peerDeps) { const range = peerDeps[peerDepName]; + const meta = peerDepsMeta && peerDepsMeta[peerDepName]; + + const isOptional = !!(meta && meta.optional); + const peerPkgs = this.resolver.getAllInfoForPackageName(peerDepName); let peerError = 'unmetPeer'; @@ -649,7 +657,7 @@ export default class PackageLinker { resolvedPeerPkg.level, ), ); - } else { + } else if (!isOptional) { this.reporter.warn( this.reporter.lang( peerError, @@ -690,7 +698,11 @@ export default class PackageLinker { } // If the package has a postinstall script, we also unplug it (otherwise they would run into the cache) - if (pkg.scripts && (pkg.scripts.preinstall || pkg.scripts.install || pkg.scripts.postinstall)) { + if ( + !this.config.ignoreScripts && + pkg.scripts && + (pkg.scripts.preinstall || pkg.scripts.install || pkg.scripts.postinstall) + ) { return true; } diff --git a/src/registries/base-registry.js b/src/registries/base-registry.js index 1f55448a23..c563a7edfd 100644 --- a/src/registries/base-registry.js +++ b/src/registries/base-registry.js @@ -65,6 +65,9 @@ export default class BaseRegistry { // token: string; + // + otp: string; + // cwd: string; @@ -81,6 +84,10 @@ export default class BaseRegistry { this.token = token; } + setOtp(otp: string) { + this.otp = otp; + } + getOption(key: string): mixed { return this.config[key]; } diff --git a/src/registries/npm-registry.js b/src/registries/npm-registry.js index 6fd7665de5..f1fb3786b7 100644 --- a/src/registries/npm-registry.js +++ b/src/registries/npm-registry.js @@ -15,6 +15,8 @@ import {addSuffix} from '../util/misc'; import {getPosixPath, resolveWithHome} from '../util/path'; import normalizeUrl from 'normalize-url'; import {default as userHome, home} from '../util/user-home-dir'; +import {MessageError, OneTimePasswordError} from '../errors.js'; +import {getOneTimePassword} from '../cli/commands/login.js'; import path from 'path'; import url from 'url'; import ini from 'ini'; @@ -133,7 +135,7 @@ export default class NpmRegistry extends Registry { return (requestToRegistryHost || requestToYarn) && (requestToRegistryPath || customHostSuffixInUse); } - request(pathname: string, opts?: RegistryRequestOptions = {}, packageName: ?string): Promise<*> { + async request(pathname: string, opts?: RegistryRequestOptions = {}, packageName: ?string): Promise<*> { // packageName needs to be escaped when if it is passed const packageIdent = (packageName && NpmRegistry.escapeName(packageName)) || pathname; const registry = opts.registry || this.getRegistry(packageIdent); @@ -161,17 +163,38 @@ export default class NpmRegistry extends Registry { } } - return this.requestManager.request({ - url: requestUrl, - method: opts.method, - body: opts.body, - auth: opts.auth, - headers, - json: !opts.buffer, - buffer: opts.buffer, - process: opts.process, - gzip: true, - }); + if (this.otp) { + headers['npm-otp'] = this.otp; + } + + try { + return await this.requestManager.request({ + url: requestUrl, + method: opts.method, + body: opts.body, + auth: opts.auth, + headers, + json: !opts.buffer, + buffer: opts.buffer, + process: opts.process, + gzip: true, + }); + } catch (error) { + if (error instanceof OneTimePasswordError) { + if (this.otp) { + throw new MessageError(this.reporter.lang('incorrectOneTimePassword')); + } + + this.reporter.info(this.reporter.lang('twoFactorAuthenticationEnabled')); + this.otp = await getOneTimePassword(this.reporter); + + this.requestManager.clearCache(); + + return this.request(pathname, opts, packageName); + } else { + throw error; + } + } } requestNeedsAuth(requestUrl: string): boolean { @@ -193,7 +216,7 @@ export default class NpmRegistry extends Registry { const escapedName = NpmRegistry.escapeName(name); const req = await this.request(escapedName, {unfiltered: true}); if (!req) { - throw new Error('couldnt find ' + name); + throw new Error(`couldn't find ${name}`); } // By default use top level 'repository' and 'homepage' values diff --git a/src/registries/yarn-registry.js b/src/registries/yarn-registry.js index 020638afa5..5e63209129 100644 --- a/src/registries/yarn-registry.js +++ b/src/registries/yarn-registry.js @@ -31,7 +31,8 @@ export const DEFAULTS = { 'user-agent': [`yarn/${version}`, 'npm/?', `node/${process.version}`, process.platform, process.arch].join(' '), }; -const RELATIVE_KEYS = ['yarn-offline-mirror', 'cache-folder', 'offline-cache-folder']; +const RELATIVE_KEYS = ['yarn-offline-mirror', 'cache-folder', 'offline-cache-folder', 'yarn-path']; +const FOLDER_KEY = ['yarn-offline-mirror', 'cache-folder', 'offline-cache-folder']; const npmMap = { 'version-git-sign': 'sign-git-tag', @@ -96,7 +97,10 @@ export default class YarnRegistry extends NpmRegistry { if (!this.config[key] && valueLoc) { const resolvedLoc = (config[key] = path.resolve(path.dirname(loc), valueLoc)); - await fs.mkdirp(resolvedLoc); + + if (FOLDER_KEY.includes(key)) { + await fs.mkdirp(resolvedLoc); + } } } diff --git a/src/reporters/lang/en.js b/src/reporters/lang/en.js index 5066290975..fdd512fdd6 100644 --- a/src/reporters/lang/en.js +++ b/src/reporters/lang/en.js @@ -179,7 +179,7 @@ const messages = { 'You can now run `yarn unlink $0` in the projects where you no longer want to use this package.', linkUsing: 'Using linked package for $0.', linkDisusing: 'Removed linked package $0.', - linkDisusingMessage: 'You will need to run `yarn` to re-install the package that was linked.', + linkDisusingMessage: 'You will need to run `yarn install --force` to re-install the package that was linked.', linkTargetMissing: 'The target of linked package $0 is missing. Removing link.', createInvalidBin: 'Invalid bin entry found in package $0.', @@ -311,6 +311,7 @@ const messages = { npmUsername: 'npm username', npmPassword: 'npm password', npmEmail: 'npm email', + npmOneTimePassword: 'npm one-time password', loggingIn: 'Logging in', loggedIn: 'Logged in.', @@ -322,6 +323,8 @@ const messages = { loginAsPublic: 'Logging in as public', incorrectCredentials: 'Incorrect username or password.', + incorrectOneTimePassword: 'Incorrect one-time password.', + twoFactorAuthenticationEnabled: 'Two factor authentication enabled.', clearedCredentials: 'Cleared login credentials.', publishFail: "Couldn't publish package: $0", diff --git a/src/reporters/noop-reporter.js b/src/reporters/noop-reporter.js index 3af43a45eb..2e2041db2e 100644 --- a/src/reporters/noop-reporter.js +++ b/src/reporters/noop-reporter.js @@ -5,8 +5,6 @@ import type { ReporterSpinnerSet, ReporterSelectOption, Trees, - Stdout, - Stdin, Package, ReporterSpinner, QuestionOptions, @@ -14,9 +12,6 @@ import type { } from './types.js'; import type {LanguageKeys} from './lang/en.js'; import type {Formatter} from './format.js'; -import {defaultFormatter} from './format.js'; -import * as languages from './lang/index.js'; -import isCI from 'is-ci'; import BaseReporter from './base-reporter.js'; export default class NoopReporter extends BaseReporter { diff --git a/src/types.js b/src/types.js index 092e9b20cd..442b54ff7d 100644 --- a/src/types.js +++ b/src/types.js @@ -13,6 +13,20 @@ export type CLIFunction = (config: Config, reporter: Reporter, flags: Object, ar type _CLIFunctionReturn = boolean; export type CLIFunctionReturn = ?_CLIFunctionReturn | Promise; +export type DependencyMeta = {}; + +export type DependenciesMeta = { + [name: string]: DependencyMeta, +}; + +export type PeerDependencyMeta = { + optional?: boolean, +}; + +export type PeerDependenciesMeta = { + [name: string]: PeerDependencyMeta, +}; + // dependency request pattern data structure that's used to request dependencies from a // PackageResolver export type DependencyRequestPattern = { @@ -132,6 +146,9 @@ export type Manifest = { peerDependencies?: Dependencies, optionalDependencies?: Dependencies, + dependenciesMeta?: DependenciesMeta, + peerDependenciesMeta?: PeerDependenciesMeta, + bundleDependencies?: Array, bundledDependencies?: Array, diff --git a/src/util/execute-lifecycle-script.js b/src/util/execute-lifecycle-script.js index 82c01acae3..48b2051ae4 100644 --- a/src/util/execute-lifecycle-script.js +++ b/src/util/execute-lifecycle-script.js @@ -26,14 +26,6 @@ export const IGNORE_MANIFEST_KEYS: Set = new Set(['readme', 'notice', 'l // See https://github.com/yarnpkg/yarn/issues/2286. const IGNORE_CONFIG_KEYS = ['lastUpdateCheck']; -async function getPnpParameters(config: Config): Promise> { - if (await fs.exists(`${config.lockfileFolder}/${constants.PNP_FILENAME}`)) { - return ['-r', `${config.lockfileFolder}/${constants.PNP_FILENAME}`]; - } else { - return []; - } -} - let wrappersFolder = null; export async function getWrappersFolder(config: Config): Promise { @@ -45,7 +37,6 @@ export async function getWrappersFolder(config: Config): Promise { await makePortableProxyScript(process.execPath, wrappersFolder, { proxyBasename: 'node', - prependArguments: [...(await getPnpParameters(config))], }); await makePortableProxyScript(process.execPath, wrappersFolder, { @@ -212,10 +203,21 @@ export async function makeEnv( } } - if (await fs.exists(`${config.lockfileFolder}/${constants.PNP_FILENAME}`)) { - const pnpApi = dynamicRequire(`${config.lockfileFolder}/${constants.PNP_FILENAME}`); + let pnpFile; - const packageLocator = pnpApi.findPackageLocator(`${config.cwd}/`); + if (process.versions.pnp) { + pnpFile = dynamicRequire.resolve('pnpapi'); + } else { + const candidate = `${config.lockfileFolder}/${constants.PNP_FILENAME}`; + if (await fs.exists(candidate)) { + pnpFile = candidate; + } + } + + if (pnpFile) { + const pnpApi = dynamicRequire(pnpFile); + + const packageLocator = pnpApi.findPackageLocator(`${cwd}/`); const packageInformation = pnpApi.getPackageInformation(packageLocator); for (const [name, reference] of packageInformation.packageDependencies.entries()) { @@ -225,8 +227,16 @@ export async function makeEnv( continue; } - pathParts.unshift(`${dependencyInformation.packageLocation}/.bin`); + const binFolder = `${dependencyInformation.packageLocation}/.bin`; + if (await fs.exists(binFolder)) { + pathParts.unshift(binFolder); + } } + + // Note that NODE_OPTIONS doesn't support any style of quoting its arguments at the moment + // For this reason, it won't work if the user has a space inside its $PATH + env.NODE_OPTIONS = env.NODE_OPTIONS || ''; + env.NODE_OPTIONS = `--require ${pnpFile} ${env.NODE_OPTIONS}`; } pathParts.unshift(await getWrappersFolder(config)); diff --git a/src/util/fs.js b/src/util/fs.js index 7877d0a63c..498b9707d2 100644 --- a/src/util/fs.js +++ b/src/util/fs.js @@ -28,7 +28,9 @@ export const lockQueue = new BlockingQueue('fs lock'); export const readFileBuffer = promisify(fs.readFile); export const open: (path: string, flags: string, mode?: number) => Promise> = promisify(fs.open); -export const writeFile: (path: string, data: string, options?: Object) => Promise = promisify(fs.writeFile); +export const writeFile: (path: string, data: string | Buffer, options?: Object) => Promise = promisify( + fs.writeFile, +); export const readlink: (path: string, opts: void) => Promise = promisify(fs.readlink); export const realpath: (path: string, opts: void) => Promise = promisify(fs.realpath); export const readdir: (path: string, opts: void) => Promise> = promisify(fs.readdir); diff --git a/src/util/generate-pnp-map-api.tpl.js b/src/util/generate-pnp-map-api.tpl.js index f594353b07..835b6f85f1 100644 --- a/src/util/generate-pnp-map-api.tpl.js +++ b/src/util/generate-pnp-map-api.tpl.js @@ -13,13 +13,14 @@ const StringDecoder = require('string_decoder'); const ignorePattern = $$BLACKLIST ? new RegExp($$BLACKLIST) : null; +const pnpFile = path.resolve(__dirname, __filename); const builtinModules = new Set(Module.builtinModules || Object.keys(process.binding('natives'))); const topLevelLocator = {name: null, reference: null}; const blacklistedLocator = {name: NaN, reference: NaN}; // Used for compatibility purposes - cf setupCompatibilityLayer -const patchedModules = new Map(); +const patchedModules = []; const fallbackLocators = [topLevelLocator]; // Matches backslashes of Windows paths @@ -33,7 +34,7 @@ const isDirRegExp = /\/$/; const isStrictRegExp = /^\.{0,2}\//; // Splits a require request into its components, or return null if the request is a file path -const pathRegExp = /^(?!\.{0,2}(?:\/|$))((?:@[^\/]+\/)?[^\/]+)\/?(.*|)$/; +const pathRegExp = /^(?![a-zA-Z]:[\\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^\/]+\/)?[^\/]+)\/?(.*|)$/; // Keep a reference around ("module" is a common name in this context, so better rename it to something more significant) const pnpModule = module; @@ -81,7 +82,7 @@ function blacklistCheck(locator) { `A package has been resolved through a blacklisted path - this is usually caused by one of your tools calling`, `"realpath" on the return value of "require.resolve". Since the returned values use symlinks to disambiguate`, `peer dependencies, they must be passed untransformed to "require".`, - ].join(` `), + ].join(` `) ); } @@ -115,7 +116,7 @@ function getPackageInformationSafe(packageLocator) { if (!packageInformation) { throw makeError( `INTERNAL`, - `Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)`, + `Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)` ); } @@ -175,8 +176,11 @@ function applyNodeExtensionResolution(unqualifiedPath, {extensions}) { // If the "main" field changed the path, we start again from this new location if (nextUnqualifiedPath && nextUnqualifiedPath !== unqualifiedPath) { - unqualifiedPath = nextUnqualifiedPath; - continue; + const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, {extensions}); + + if (resolution !== null) { + return resolution; + } } } @@ -236,9 +240,14 @@ function makeFakeModule(path) { * Normalize path to posix format. */ -// eslint-disable-next-line no-unused-vars function normalizePath(fsPath) { - return process.platform === 'win32' ? fsPath.replace(backwardSlashRegExp, '/') : fsPath; + fsPath = path.normalize(fsPath); + + if (process.platform === 'win32') { + fsPath = fsPath.replace(backwardSlashRegExp, '/'); + } + + return fsPath; } /** @@ -313,6 +322,12 @@ exports.getPackageInformation = function getPackageInformation({name, reference} */ exports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {considerBuiltins = true} = {}) { + // The 'pnpapi' request is reserved and will always return the path to the PnP file, from everywhere + + if (request === `pnpapi`) { + return pnpFile; + } + // Bailout if the request is a native module if (considerBuiltins && builtinModules.has(request)) { @@ -323,7 +338,7 @@ exports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {c // contain multiple levels of dependencies (ie. a yarn.lock inside a subfolder of a yarn.lock). This is // typically solved using workspaces, but not all of them have been converted already. - if (ignorePattern && ignorePattern.test(issuer)) { + if (ignorePattern && ignorePattern.test(normalizePath(issuer))) { const result = callNativeResolution(request, issuer); if (result === false) { @@ -333,7 +348,7 @@ exports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {c { request, issuer, - }, + } ); } @@ -377,7 +392,7 @@ exports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {c { request, issuer, - }, + } ); } @@ -409,13 +424,13 @@ exports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {c throw makeError( `MISSING_PEER_DEPENDENCY`, `You seem to be requiring a peer dependency ("${dependencyName}"), but it is not installed (which might be because you're the top-level package)`, - {request, issuer, dependencyName}, + {request, issuer, dependencyName} ); } else { throw makeError( `MISSING_PEER_DEPENDENCY`, `Package "${issuerLocator.name}@${issuerLocator.reference}" is trying to access a peer dependency ("${dependencyName}") that should be provided by its direct ancestor but isn't`, - {request, issuer, issuerLocator: Object.assign({}, issuerLocator), dependencyName}, + {request, issuer, issuerLocator: Object.assign({}, issuerLocator), dependencyName} ); } } else { @@ -423,16 +438,16 @@ exports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {c throw makeError( `UNDECLARED_DEPENDENCY`, `You cannot require a package ("${dependencyName}") that is not declared in your dependencies (via "${issuer}")`, - {request, issuer, dependencyName}, + {request, issuer, dependencyName} ); } else { const candidates = Array.from(issuerInformation.packageDependencies.keys()); throw makeError( `UNDECLARED_DEPENDENCY`, `Package "${issuerLocator.name}@${issuerLocator.reference}" (via "${issuer}") is trying to require the package "${dependencyName}" (via "${request}") without it being listed in its dependencies (${candidates.join( - `, `, + `, ` )})`, - {request, issuer, issuerLocator: Object.assign({}, issuerLocator), dependencyName, candidates}, + {request, issuer, issuerLocator: Object.assign({}, issuerLocator), dependencyName, candidates} ); } } @@ -448,7 +463,7 @@ exports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {c throw makeError( `MISSING_DEPENDENCY`, `Package "${dependencyLocator.name}@${dependencyLocator.reference}" is a valid dependency, but hasn't been installed and thus cannot be required (it might be caused if you install a partial tree, such as on production environments)`, - {request, issuer, dependencyLocator: Object.assign({}, dependencyLocator)}, + {request, issuer, dependencyLocator: Object.assign({}, dependencyLocator)} ); } @@ -471,7 +486,7 @@ exports.resolveToUnqualified = function resolveToUnqualified(request, issuer, {c exports.resolveUnqualified = function resolveUnqualified( unqualifiedPath, - {extensions = Object.keys(Module._extensions)} = {}, + {extensions = Object.keys(Module._extensions)} = {} ) { const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, {extensions}); @@ -481,7 +496,7 @@ exports.resolveUnqualified = function resolveUnqualified( throw makeError( `QUALIFIED_PATH_RESOLUTION_FAILED`, `Couldn't find a suitable Node resolution for unqualified path "${unqualifiedPath}"`, - {unqualifiedPath}, + {unqualifiedPath} ); } }; @@ -535,7 +550,7 @@ exports.resolveRequest = function resolveRequest(request, issuer, {considerBuilt request, issuer, realIssuer, - }, + } ); } } @@ -633,8 +648,10 @@ exports.setup = function setup() { // Some modules might have to be patched for compatibility purposes - if (patchedModules.has(request)) { - module.exports = patchedModules.get(request)(module.exports); + for (const [filter, patchFn] of patchedModules) { + if (filter.test(request)) { + module.exports = patchFn(exports.findPackageLocator(parent.filename), module.exports); + } } return module.exports; @@ -647,11 +664,47 @@ exports.setup = function setup() { return originalModuleResolveFilename.call(Module, request, parent, isMain, options); } - const issuerModule = getIssuerModule(parent); - const issuer = issuerModule ? issuerModule.filename : process.cwd() + '/'; + let issuers; + + if (options) { + const optionNames = new Set(Object.keys(options)); + optionNames.delete('paths'); + + if (optionNames.size > 0) { + throw makeError( + `UNSUPPORTED`, + `Some options passed to require() aren't supported by PnP yet (${Array.from(optionNames).join(', ')})` + ); + } + + if (options.paths) { + issuers = options.paths.map(entry => `${path.normalize(entry)}/`); + } + } + + if (!issuers) { + const issuerModule = getIssuerModule(parent); + const issuer = issuerModule ? issuerModule.filename : `${process.cwd()}/`; + + issuers = [issuer]; + } + + let firstError; - const resolution = exports.resolveRequest(request, issuer); - return resolution !== null ? resolution : request; + for (const issuer of issuers) { + let resolution; + + try { + resolution = exports.resolveRequest(request, issuer); + } catch (error) { + firstError = firstError || error; + continue; + } + + return resolution !== null ? resolution : request; + } + + throw firstError; }; const originalFindPath = Module._findPath; @@ -682,17 +735,6 @@ exports.setup = function setup() { }; exports.setupCompatibilityLayer = () => { - // see https://github.com/browserify/resolve/blob/master/lib/caller.js - const getCaller = () => { - const origPrepareStackTrace = Error.prepareStackTrace; - - Error.prepareStackTrace = (_, stack) => stack; - const stack = new Error().stack; - Error.prepareStackTrace = origPrepareStackTrace; - - return stack[2].getFileName(); - }; - // ESLint currently doesn't have any portable way for shared configs to specify their own // plugins that should be used (https://github.com/eslint/eslint/issues/10125). This will // likely get fixed at some point, but it'll take time and in the meantime we'll just add @@ -707,84 +749,52 @@ exports.setupCompatibilityLayer = () => { } } - // We need to shim the "resolve" module, because Liftoff uses it in order to find the location - // of the module in the dependency tree. And Liftoff is used to power Gulp, which doesn't work - // at all unless modulePath is set, which we cannot configure from any other way than through - // the Liftoff pipeline (the key isn't whitelisted for env or cli options). + // Modern versions of `resolve` support a specific entry point that custom resolvers can use + // to inject a specific resolution logic without having to patch the whole package. + // + // Cf: https://github.com/browserify/resolve/pull/174 - patchedModules.set(/^resolve$/, realResolve => { - const mustBeShimmed = caller => { - const callerLocator = exports.findPackageLocator(caller); - - return callerLocator && callerLocator.name === 'liftoff'; - }; - - const attachCallerToOptions = (caller, options) => { - if (!options.basedir) { - options.basedir = path.dirname(caller); + patchedModules.push([ + /^\.\/normalize-options\.js$/, + (issuer, normalizeOptions) => { + if (!issuer || issuer.name !== 'resolve') { + return normalizeOptions; } - }; - - const resolveSyncShim = (request, {basedir}) => { - return exports.resolveRequest(request, basedir, { - considerBuiltins: false, - }); - }; - const resolveShim = (request, options, callback) => { - setImmediate(() => { - let error; - let result; + return (request, opts) => { + opts = opts || {}; - try { - result = resolveSyncShim(request, options); - } catch (thrown) { - error = thrown; + if (opts.forceNodeResolution) { + return opts; } - callback(error, result); - }); - }; - - return Object.assign( - (request, options, callback) => { - if (typeof options === 'function') { - callback = options; - options = {}; - } else if (!options) { - options = {}; - } + opts.preserveSymlinks = true; + opts.paths = function(request, basedir, getNodeModulesDir, opts) { + // Extract the name of the package being requested (1=full name, 2=scope name, 3=local name) + const parts = request.match(/^((?:(@[^\/]+)\/)?([^\/]+))/); - const caller = getCaller(); - attachCallerToOptions(caller, options); - - if (mustBeShimmed(caller)) { - return resolveShim(request, options, callback); - } else { - return realResolve.sync(request, options, callback); - } - }, - { - sync: (request, options) => { - if (!options) { - options = {}; + // make sure that basedir ends with a slash + if (basedir.charAt(basedir.length - 1) !== '/') { + basedir = path.join(basedir, '/'); } + // This is guaranteed to return the path to the "package.json" file from the given package + const manifestPath = exports.resolveToUnqualified(`${parts[1]}/package.json`, basedir); - const caller = getCaller(); - attachCallerToOptions(caller, options); + // The first dirname strips the package.json, the second strips the local named folder + let nodeModules = path.dirname(path.dirname(manifestPath)); - if (mustBeShimmed(caller)) { - return resolveSyncShim(request, options); - } else { - return realResolve.sync(request, options); + // Strips the scope named folder if needed + if (parts[2]) { + nodeModules = path.dirname(nodeModules); } - }, - isCore: request => { - return realResolve.isCore(request); - }, - }, - ); - }); + + return [nodeModules]; + }; + + return opts; + }; + }, + ]); }; if (module.parent && module.parent.id === 'internal/preload') { diff --git a/src/util/generate-pnp-map.js b/src/util/generate-pnp-map.js index 7956721db9..437aed7303 100644 --- a/src/util/generate-pnp-map.js +++ b/src/util/generate-pnp-map.js @@ -173,7 +173,7 @@ async function getPackageInformationStores( const normalizeDirectoryPath = (fsPath: string) => { let relativePath = normalizePath(path.relative(targetDirectory, resolveOfflineCacheFolder(fsPath))); - if (!relativePath.match(/^\.{0,2}\//)) { + if (!relativePath.match(/^\.{0,2}\//) && !path.isAbsolute(relativePath)) { relativePath = `./${relativePath}`; } diff --git a/src/util/portable-script.js b/src/util/portable-script.js index be901cff00..fdecf17c2b 100644 --- a/src/util/portable-script.js +++ b/src/util/portable-script.js @@ -36,11 +36,19 @@ async function makePortableProxyScriptUnix( const sourcePath = path.isAbsolute(source) ? source : `$(dirname "$0")/../${source}`; await fs.mkdirp(destination); - await fs.writeFile( - filePath, - `#!/bin/sh\n\n${environment}"${sourcePath}"${prependedArguments} "$@"${appendedArguments}\n`, - ); - await fs.chmod(filePath, 0o755); + + if (process.platform === 'win32') { + await fs.writeFile( + filePath + '.cmd', + `@${environment}"${sourcePath}" ${prependedArguments} ${appendedArguments} %*\r\n`, + ); + } else { + await fs.writeFile( + filePath, + `#!/bin/sh\n\n${environment}exec "${sourcePath}"${prependedArguments} "$@"${appendedArguments}\n`, + ); + await fs.chmod(filePath, 0o755); + } } export function makePortableProxyScript( diff --git a/src/util/request-manager.js b/src/util/request-manager.js index 2f7b3be308..60cdb442f2 100644 --- a/src/util/request-manager.js +++ b/src/util/request-manager.js @@ -8,7 +8,7 @@ import invariant from 'invariant'; import RequestCaptureHar from 'request-capture-har'; import type {Reporter} from '../reporters/index.js'; -import {MessageError, ResponseError} from '../errors.js'; +import {MessageError, ResponseError, OneTimePasswordError} from '../errors.js'; import BlockingQueue from './blocking-queue.js'; import * as constants from '../constants.js'; import * as network from './network.js'; @@ -401,6 +401,8 @@ export default class RequestManager { if (!queueForRetry(this.reporter.lang('offlineRetrying'))) { reject(err); } + } else { + reject(err); } }; @@ -426,6 +428,15 @@ export default class RequestManager { } } + if (res.statusCode === 401 && res.headers['www-authenticate']) { + const authMethods = res.headers['www-authenticate'].split(/,\s*/).map(s => s.toLowerCase()); + + if (authMethods.indexOf('otp') !== -1) { + reject(new OneTimePasswordError()); + return; + } + } + if (body && typeof body.error === 'string') { reject(new Error(body.error)); return; @@ -489,8 +500,19 @@ export default class RequestManager { req.on('data', queue.stillActive.bind(queue)); } - if (params.process) { - params.process(req, resolve, reject); + const process = params.process; + if (process) { + req.on('response', res => { + if (res.statusCode >= 200 && res.statusCode < 300) { + return; + } + + const description = `${res.statusCode} ${http.STATUS_CODES[res.statusCode]}`; + reject(new ResponseError(this.reporter.lang('requestFailed', description), res.statusCode)); + + req.abort(); + }); + process(req, resolve, reject); } } diff --git a/stats.json b/stats.json deleted file mode 100644 index ad1c049f7e..0000000000 --- a/stats.json +++ /dev/null @@ -1 +0,0 @@ -{"errors":[],"warnings":[],"version":"2.6.0","hash":"2d767f0c72f8cdf44fcd","time":27035,"publicPath":"","assetsByChunkName":{"artifacts/yarn-1.8.0-0.js":"artifacts/yarn-1.8.0-0.js","packages/lockfile/index.js":"packages/lockfile/index.js"},"assets":[{"name":"artifacts/yarn-1.8.0-0.js","size":4165972,"chunks":[0,1],"chunkNames":["artifacts/yarn-1.8.0-0.js"],"emitted":true,"isOverSizeLimit":true},{"name":"packages/lockfile/index.js","size":260972,"chunks":[1],"chunkNames":["packages/lockfile/index.js"],"emitted":true,"isOverSizeLimit":true}],"entrypoints":{"artifacts/yarn-1.8.0-0.js":{"chunks":[0],"assets":["artifacts/yarn-1.8.0-0.js"],"isOverSizeLimit":true},"packages/lockfile/index.js":{"chunks":[1],"assets":["packages/lockfile/index.js"],"isOverSizeLimit":true}},"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":4108451,"names":["artifacts/yarn-1.8.0-0.js"],"files":["artifacts/yarn-1.8.0-0.js"],"hash":"e26746f42f76de16749a","parents":[],"origins":[{"moduleId":384,"module":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","moduleName":"./src/cli/index.js","loc":"","name":"artifacts/yarn-1.8.0-0.js","reasons":[]}]},{"id":1,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":248310,"names":["packages/lockfile/index.js"],"files":["packages/lockfile/index.js"],"hash":"59cd523c353d2a798b7d","parents":[],"origins":[{"moduleId":12,"module":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","moduleName":"./src/lockfile/index.js","loc":"","name":"packages/lockfile/index.js","reasons":[]}]}],"modules":[{"id":0,"identifier":"external \"path\"","name":"external \"path\"","index":70,"index2":69,"size":42,"cacheable":false,"built":false,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","issuerId":12,"issuerName":"./src/lockfile/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":5,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\fs.js","module":"./src/util/fs.js","moduleName":"./src/util/fs.js","type":"cjs require","userRequest":"path","loc":"1080:40-55"},{"moduleId":6,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\constants.js","module":"./src/constants.js","moduleName":"./src/constants.js","type":"cjs require","userRequest":"path","loc":"8:13-28"},{"moduleId":12,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","module":"./src/lockfile/index.js","moduleName":"./src/lockfile/index.js","type":"cjs require","userRequest":"path","loc":"78:13-28"},{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"path","loc":"243:13-28"},{"moduleId":42,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\user-home-dir.js","module":"./src/util/user-home-dir.js","moduleName":"./src/util/user-home-dir.js","type":"cjs require","userRequest":"path","loc":"16:13-28"},{"moduleId":52,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\npm-registry.js","module":"./src/registries/npm-registry.js","moduleName":"./src/registries/npm-registry.js","type":"cjs require","userRequest":"path","loc":"83:41-56"},{"moduleId":56,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\minimatch\\minimatch.js","module":"./~/minimatch/minimatch.js","moduleName":"./~/minimatch/minimatch.js","type":"cjs require","userRequest":"path","loc":"6:9-24"},{"moduleId":68,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\glob.js","module":"./~/glob/glob.js","moduleName":"./~/glob/glob.js","type":"cjs require","userRequest":"path","loc":"49:11-26"},{"moduleId":85,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\yarn-version.js","module":"./src/util/yarn-version.js","moduleName":"./src/util/yarn-version.js","type":"cjs require","userRequest":"path","loc":"60:40-55"},{"moduleId":86,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\global.js","module":"./src/cli/commands/global.js","moduleName":"./src/cli/commands/global.js","type":"cjs require","userRequest":"path","loc":"396:13-28"},{"moduleId":88,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-request.js","module":"./src/package-request.js","moduleName":"./src/package-request.js","type":"cjs require","userRequest":"path","loc":"16:40-55"},{"moduleId":92,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\execute-lifecycle-script.js","module":"./src/util/execute-lifecycle-script.js","moduleName":"./src/util/execute-lifecycle-script.js","type":"cjs require","userRequest":"path","loc":"375:13-28"},{"moduleId":107,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\common.js","module":"./~/glob/common.js","moduleName":"./~/glob/common.js","type":"cjs require","userRequest":"path","loc":"15:11-26"},{"moduleId":108,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\mkdirp\\index.js","module":"./~/mkdirp/index.js","moduleName":"./~/mkdirp/index.js","type":"cjs require","userRequest":"path","loc":"1:11-26"},{"moduleId":114,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","module":"./src/config.js","moduleName":"./src/config.js","type":"cjs require","userRequest":"path","loc":"94:13-28"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"path","loc":"105:40-55"},{"moduleId":117,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\pack.js","module":"./src/cli/commands/pack.js","moduleName":"./src/cli/commands/pack.js","type":"cjs require","userRequest":"path","loc":"184:13-28"},{"moduleId":118,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\base-fetcher.js","module":"./src/fetchers/base-fetcher.js","moduleName":"./src/fetchers/base-fetcher.js","type":"cjs require","userRequest":"path","loc":"35:13-28"},{"moduleId":138,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tar-fs\\index.js","module":"./~/tar-fs/index.js","moduleName":"./~/tar-fs/index.js","type":"cjs require","userRequest":"path","loc":"6:11-26"},{"moduleId":150,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\integrity-checker.js","module":"./src/integrity-checker.js","moduleName":"./src/integrity-checker.js","type":"cjs require","userRequest":"path","loc":"56:13-28"},{"moduleId":152,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-linker.js","module":"./src/package-linker.js","moduleName":"./src/package-linker.js","type":"cjs require","userRequest":"path","loc":"90:13-28"},{"moduleId":156,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\file-resolver.js","module":"./src/resolvers/exotics/file-resolver.js","moduleName":"./src/resolvers/exotics/file-resolver.js","type":"cjs require","userRequest":"path","loc":"17:40-55"},{"moduleId":158,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\registries\\npm-resolver.js","module":"./src/resolvers/registries/npm-resolver.js","moduleName":"./src/resolvers/registries/npm-resolver.js","type":"cjs require","userRequest":"path","loc":"68:13-28"},{"moduleId":161,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\index.js","module":"./src/util/normalize-manifest/index.js","moduleName":"./src/util/normalize-manifest/index.js","type":"cjs require","userRequest":"path","loc":"33:13-28"},{"moduleId":166,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\user-dirs.js","module":"./src/util/user-dirs.js","moduleName":"./src/util/user-dirs.js","type":"cjs require","userRequest":"path","loc":"9:13-28"},{"moduleId":212,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\fs.realpath\\old.js","module":"./~/fs.realpath/old.js","moduleName":"./~/fs.realpath/old.js","type":"cjs require","userRequest":"path","loc":"22:17-32"},{"moduleId":213,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\sync.js","module":"./~/glob/sync.js","moduleName":"./~/glob/sync.js","type":"cjs require","userRequest":"path","loc":"10:11-26"},{"moduleId":225,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\micromatch\\lib\\utils.js","module":"./~/micromatch/lib/utils.js","moduleName":"./~/micromatch/lib/utils.js","type":"cjs require","userRequest":"path","loc":"4:11-26"},{"moduleId":231,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rimraf\\rimraf.js","module":"./~/rimraf/rimraf.js","moduleName":"./~/rimraf/rimraf.js","type":"cjs require","userRequest":"path","loc":"5:11-26"},{"moduleId":240,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\commander\\index.js","module":"./~/commander/index.js","moduleName":"./~/commander/index.js","type":"cjs require","userRequest":"path","loc":"8:11-26"},{"moduleId":249,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\autoclean.js","module":"./src/cli/commands/autoclean.js","moduleName":"./src/cli/commands/autoclean.js","type":"cjs require","userRequest":"path","loc":"221:13-28"},{"moduleId":250,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\check.js","module":"./src/cli/commands/check.js","moduleName":"./src/cli/commands/check.js","type":"cjs require","userRequest":"path","loc":"489:13-28"},{"moduleId":251,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\link.js","module":"./src/cli/commands/link.js","moduleName":"./src/cli/commands/link.js","type":"cjs require","userRequest":"path","loc":"147:13-28"},{"moduleId":253,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\remove.js","module":"./src/cli/commands/remove.js","moduleName":"./src/cli/commands/remove.js","type":"cjs require","userRequest":"path","loc":"201:13-28"},{"moduleId":255,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\upgrade-interactive.js","module":"./src/cli/commands/upgrade-interactive.js","moduleName":"./src/cli/commands/upgrade-interactive.js","type":"cjs require","userRequest":"path","loc":"265:13-28"},{"moduleId":256,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\version.js","module":"./src/cli/commands/version.js","moduleName":"./src/cli/commands/version.js","type":"cjs require","userRequest":"path","loc":"239:13-28"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"path","loc":"60:13-28"},{"moduleId":264,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\link-resolver.js","module":"./src/resolvers/exotics/link-resolver.js","moduleName":"./src/resolvers/exotics/link-resolver.js","type":"cjs require","userRequest":"path","loc":"36:13-28"},{"moduleId":268,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\filter.js","module":"./src/util/filter.js","moduleName":"./src/util/filter.js","type":"cjs require","userRequest":"path","loc":"18:13-28"},{"moduleId":269,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git\\git-spawn.js","module":"./src/util/git/git-spawn.js","moduleName":"./src/util/git/git-spawn.js","type":"cjs require","userRequest":"path","loc":"17:40-55"},{"moduleId":271,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\path.js","module":"./src/util/path.js","moduleName":"./src/util/path.js","type":"cjs require","userRequest":"path","loc":"12:17-32"},{"moduleId":276,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\cmd-shim\\index.js","module":"./~/cmd-shim/index.js","moduleName":"./~/cmd-shim/index.js","type":"cjs require","userRequest":"path","loc":"17:11-26"},{"moduleId":338,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\rc.js","module":"./src/rc.js","moduleName":"./src/rc.js","type":"cjs require","userRequest":"path","loc":"12:17-32"},{"moduleId":343,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\proper-lockfile\\index.js","module":"./~/proper-lockfile/index.js","moduleName":"./~/proper-lockfile/index.js","type":"cjs require","userRequest":"path","loc":"4:13-28"},{"moduleId":361,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\bin.js","module":"./src/cli/commands/bin.js","moduleName":"./src/cli/commands/bin.js","type":"cjs require","userRequest":"path","loc":"20:13-28"},{"moduleId":362,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\cache.js","module":"./src/cli/commands/cache.js","moduleName":"./src/cli/commands/cache.js","type":"cjs require","userRequest":"path","loc":"159:13-28"},{"moduleId":364,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\create.js","module":"./src/cli/commands/create.js","moduleName":"./src/cli/commands/create.js","type":"cjs require","userRequest":"path","loc":"65:13-28"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"path","loc":"179:13-28"},{"moduleId":370,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\init.js","module":"./src/cli/commands/init.js","moduleName":"./src/cli/commands/init.js","type":"cjs require","userRequest":"path","loc":"285:13-28"},{"moduleId":376,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","module":"./src/cli/commands/publish.js","moduleName":"./src/cli/commands/publish.js","type":"cjs require","userRequest":"path","loc":"209:40-55"},{"moduleId":377,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\run.js","module":"./src/cli/commands/run.js","moduleName":"./src/cli/commands/run.js","type":"cjs require","userRequest":"path","loc":"239:13-28"},{"moduleId":379,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\unlink.js","module":"./src/cli/commands/unlink.js","moduleName":"./src/cli/commands/unlink.js","type":"cjs require","userRequest":"path","loc":"111:13-28"},{"moduleId":381,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\why.js","module":"./src/cli/commands/why.js","moduleName":"./src/cli/commands/why.js","type":"cjs require","userRequest":"path","loc":"311:13-28"},{"moduleId":383,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspaces.js","module":"./src/cli/commands/workspaces.js","moduleName":"./src/cli/commands/workspaces.js","type":"cjs require","userRequest":"path","loc":"131:13-28"},{"moduleId":384,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","module":"./src/cli/index.js","moduleName":"./src/cli/index.js","type":"cjs require","userRequest":"path","loc":"74:40-55"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"path","loc":"79:13-28"},{"moduleId":390,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-hoister.js","module":"./src/package-hoister.js","moduleName":"./src/package-hoister.js","type":"cjs require","userRequest":"path","loc":"42:13-28"},{"moduleId":391,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-install-scripts.js","module":"./src/package-install-scripts.js","moduleName":"./src/package-install-scripts.js","type":"cjs require","userRequest":"path","loc":"56:13-28"},{"moduleId":392,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\base-registry.js","module":"./src/registries/base-registry.js","moduleName":"./src/registries/base-registry.js","type":"cjs require","userRequest":"path","loc":"29:13-28"},{"moduleId":393,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\yarn-registry.js","module":"./src/registries/yarn-registry.js","moduleName":"./src/registries/yarn-registry.js","type":"cjs require","userRequest":"path","loc":"49:13-28"},{"moduleId":414,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\fix.js","module":"./src/util/normalize-manifest/fix.js","moduleName":"./src/util/normalize-manifest/fix.js","type":"cjs require","userRequest":"path","loc":"48:13-28"},{"moduleId":417,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\resolve-relative.js","module":"./src/util/normalize-manifest/resolve-relative.js","moduleName":"./src/util/normalize-manifest/resolve-relative.js","type":"cjs require","userRequest":"path","loc":"109:13-28"},{"moduleId":420,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\rc.js","module":"./src/util/rc.js","moduleName":"./src/util/rc.js","type":"cjs require","userRequest":"path","loc":"17:41-56"},{"moduleId":429,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\chownr\\chownr.js","module":"./~/chownr/chownr.js","moduleName":"./~/chownr/chownr.js","type":"cjs require","userRequest":"path","loc":"5:9-24"},{"moduleId":468,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\form-data\\lib\\form_data.js","module":"./~/form-data/lib/form_data.js","moduleName":"./~/form-data/lib/form_data.js","type":"cjs require","userRequest":"path","loc":"3:11-26"},{"moduleId":471,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob-base\\index.js","module":"./~/glob-base/index.js","moduleName":"./~/glob-base/index.js","type":"cjs require","userRequest":"path","loc":"10:11-26"},{"moduleId":472,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob-parent\\index.js","module":"./~/glob-parent/index.js","moduleName":"./~/glob-parent/index.js","type":"cjs require","userRequest":"path","loc":"3:11-26"},{"moduleId":583,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\mime-types\\index.js","module":"./~/mime-types/index.js","moduleName":"./~/mime-types/index.js","type":"cjs require","userRequest":"path","loc":"16:14-29"},{"moduleId":589,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\npm-logical-tree\\index.js","module":"./~/npm-logical-tree/index.js","moduleName":"./~/npm-logical-tree/index.js","type":"cjs require","userRequest":"path","loc":"42:26-41"},{"moduleId":630,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\node_modules\\mime-types\\index.js","module":"./~/request/~/mime-types/index.js","moduleName":"./~/request/~/mime-types/index.js","type":"cjs require","userRequest":"path","loc":"16:14-29"},{"moduleId":664,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tmp\\lib\\tmp.js","module":"./~/tmp/lib/tmp.js","moduleName":"./~/tmp/lib/tmp.js","type":"cjs require","userRequest":"path","loc":"14:11-26"}],"usedExports":true,"providedExports":null,"depth":1},{"id":1,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-runtime\\helpers\\asyncToGenerator.js","name":"./~/babel-runtime/helpers/asyncToGenerator.js","index":2,"index2":66,"size":906,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","issuerId":12,"issuerName":"./src/lockfile/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":5,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\fs.js","module":"./src/util/fs.js","moduleName":"./src/util/fs.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":12,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","module":"./src/lockfile/index.js","moduleName":"./src/lockfile/index.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"17:53-102"},{"moduleId":41,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\_build-sub-commands.js","module":"./src/cli/commands/_build-sub-commands.js","moduleName":"./src/cli/commands/_build-sub-commands.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":52,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\npm-registry.js","module":"./src/registries/npm-registry.js","moduleName":"./src/registries/npm-registry.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":75,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\reporters\\base-reporter.js","module":"./src/reporters/base-reporter.js","moduleName":"./src/reporters/base-reporter.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":76,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\hosted-git-resolver.js","module":"./src/resolvers/exotics/hosted-git-resolver.js","moduleName":"./src/resolvers/exotics/hosted-git-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":85,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\yarn-version.js","module":"./src/util/yarn-version.js","moduleName":"./src/util/yarn-version.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":86,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\global.js","module":"./src/cli/commands/global.js","moduleName":"./src/cli/commands/global.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":87,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\login.js","module":"./src/cli/commands/login.js","moduleName":"./src/cli/commands/login.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":88,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-request.js","module":"./src/package-request.js","moduleName":"./src/package-request.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":90,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\git-resolver.js","module":"./src/resolvers/exotics/git-resolver.js","moduleName":"./src/resolvers/exotics/git-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":92,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\execute-lifecycle-script.js","module":"./src/util/execute-lifecycle-script.js","moduleName":"./src/util/execute-lifecycle-script.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"17:53-102"},{"moduleId":114,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","module":"./src/config.js","moduleName":"./src/config.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"16:53-102"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":117,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\pack.js","module":"./src/cli/commands/pack.js","moduleName":"./src/cli/commands/pack.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":118,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\base-fetcher.js","module":"./src/fetchers/base-fetcher.js","moduleName":"./src/fetchers/base-fetcher.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":149,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\upgrade.js","module":"./src/cli/commands/upgrade.js","moduleName":"./src/cli/commands/upgrade.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":150,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\integrity-checker.js","module":"./src/integrity-checker.js","moduleName":"./src/integrity-checker.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"17:53-102"},{"moduleId":151,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-fetcher.js","module":"./src/package-fetcher.js","moduleName":"./src/package-fetcher.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":152,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-linker.js","module":"./src/package-linker.js","moduleName":"./src/package-linker.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":156,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\file-resolver.js","module":"./src/resolvers/exotics/file-resolver.js","moduleName":"./src/resolvers/exotics/file-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":158,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\registries\\npm-resolver.js","module":"./src/resolvers/registries/npm-resolver.js","moduleName":"./src/resolvers/registries/npm-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":159,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\fs-normalized.js","module":"./src/util/fs-normalized.js","moduleName":"./src/util/fs-normalized.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":161,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\index.js","module":"./src/util/normalize-manifest/index.js","moduleName":"./src/util/normalize-manifest/index.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":249,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\autoclean.js","module":"./src/cli/commands/autoclean.js","moduleName":"./src/cli/commands/autoclean.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":250,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\check.js","module":"./src/cli/commands/check.js","moduleName":"./src/cli/commands/check.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":251,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\link.js","module":"./src/cli/commands/link.js","moduleName":"./src/cli/commands/link.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":252,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\list.js","module":"./src/cli/commands/list.js","moduleName":"./src/cli/commands/list.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":253,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\remove.js","module":"./src/cli/commands/remove.js","moduleName":"./src/cli/commands/remove.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"17:53-102"},{"moduleId":254,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\tag.js","module":"./src/cli/commands/tag.js","moduleName":"./src/cli/commands/tag.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":255,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\upgrade-interactive.js","module":"./src/cli/commands/upgrade-interactive.js","moduleName":"./src/cli/commands/upgrade-interactive.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"17:53-102"},{"moduleId":256,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\version.js","module":"./src/cli/commands/version.js","moduleName":"./src/cli/commands/version.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":260,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-resolver.js","module":"./src/package-resolver.js","moduleName":"./src/package-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":264,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\link-resolver.js","module":"./src/resolvers/exotics/link-resolver.js","moduleName":"./src/resolvers/exotics/link-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":362,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\cache.js","module":"./src/cli/commands/cache.js","moduleName":"./src/cli/commands/cache.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":363,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\config.js","module":"./src/cli/commands/config.js","moduleName":"./src/cli/commands/config.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":364,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\create.js","module":"./src/cli/commands/create.js","moduleName":"./src/cli/commands/create.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":365,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\exec.js","module":"./src/cli/commands/exec.js","moduleName":"./src/cli/commands/exec.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":366,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\generate-lock-entry.js","module":"./src/cli/commands/generate-lock-entry.js","moduleName":"./src/cli/commands/generate-lock-entry.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":369,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\info.js","module":"./src/cli/commands/info.js","moduleName":"./src/cli/commands/info.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":370,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\init.js","module":"./src/cli/commands/init.js","moduleName":"./src/cli/commands/init.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":371,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\licenses.js","module":"./src/cli/commands/licenses.js","moduleName":"./src/cli/commands/licenses.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"17:53-102"},{"moduleId":372,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\logout.js","module":"./src/cli/commands/logout.js","moduleName":"./src/cli/commands/logout.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":373,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\node.js","module":"./src/cli/commands/node.js","moduleName":"./src/cli/commands/node.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":374,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\outdated.js","module":"./src/cli/commands/outdated.js","moduleName":"./src/cli/commands/outdated.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"17:53-102"},{"moduleId":375,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\owner.js","module":"./src/cli/commands/owner.js","moduleName":"./src/cli/commands/owner.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":376,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","module":"./src/cli/commands/publish.js","moduleName":"./src/cli/commands/publish.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":377,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\run.js","module":"./src/cli/commands/run.js","moduleName":"./src/cli/commands/run.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":378,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\team.js","module":"./src/cli/commands/team.js","moduleName":"./src/cli/commands/team.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"17:53-102"},{"moduleId":379,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\unlink.js","module":"./src/cli/commands/unlink.js","moduleName":"./src/cli/commands/unlink.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":380,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\versions.js","module":"./src/cli/commands/versions.js","moduleName":"./src/cli/commands/versions.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":381,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\why.js","module":"./src/cli/commands/why.js","moduleName":"./src/cli/commands/why.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":382,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspace.js","module":"./src/cli/commands/workspace.js","moduleName":"./src/cli/commands/workspace.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":383,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspaces.js","module":"./src/cli/commands/workspaces.js","moduleName":"./src/cli/commands/workspaces.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":384,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","module":"./src/cli/index.js","moduleName":"./src/cli/index.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":385,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\copy-fetcher.js","module":"./src/fetchers/copy-fetcher.js","moduleName":"./src/fetchers/copy-fetcher.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":388,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\workspace-fetcher.js","module":"./src/fetchers/workspace-fetcher.js","moduleName":"./src/fetchers/workspace-fetcher.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"16:53-102"},{"moduleId":391,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-install-scripts.js","module":"./src/package-install-scripts.js","moduleName":"./src/package-install-scripts.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":392,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\base-registry.js","module":"./src/registries/base-registry.js","moduleName":"./src/registries/base-registry.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":393,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\yarn-registry.js","module":"./src/registries/yarn-registry.js","moduleName":"./src/registries/yarn-registry.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":395,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\reporters\\console\\console-reporter.js","module":"./src/reporters/console/console-reporter.js","moduleName":"./src/reporters/console/console-reporter.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":401,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\reporters\\noop-reporter.js","module":"./src/reporters/noop-reporter.js","moduleName":"./src/reporters/noop-reporter.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":403,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\bitbucket-resolver.js","module":"./src/resolvers/exotics/bitbucket-resolver.js","moduleName":"./src/resolvers/exotics/bitbucket-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":406,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\tarball-resolver.js","module":"./src/resolvers/exotics/tarball-resolver.js","moduleName":"./src/resolvers/exotics/tarball-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"},{"moduleId":410,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git\\git-ref-resolver.js","module":"./src/util/git/git-ref-resolver.js","moduleName":"./src/util/git/git-ref-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"11:53-102"},{"moduleId":414,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\fix.js","module":"./src/util/normalize-manifest/fix.js","moduleName":"./src/util/normalize-manifest/fix.js","type":"cjs require","userRequest":"babel-runtime/helpers/asyncToGenerator","loc":"10:53-102"}],"usedExports":true,"providedExports":null,"depth":1,"source":"\"use strict\";\n\nexports.__esModule = true;\n\nvar _promise = require(\"../core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new _promise2.default(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return _promise2.default.resolve(value).then(function (value) {\n step(\"next\", value);\n }, function (err) {\n step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};"},{"id":2,"identifier":"external \"util\"","name":"external \"util\"","index":84,"index2":81,"size":42,"cacheable":false,"built":false,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\parse.js","issuerId":74,"issuerName":"./src/lockfile/parse.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":9,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\assert-plus\\assert.js","module":"./~/assert-plus/assert.js","moduleName":"./~/assert-plus/assert.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":23,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\private-key.js","module":"./~/sshpk/lib/private-key.js","moduleName":"./~/sshpk/lib/private-key.js","type":"cjs require","userRequest":"util","loc":"11:11-26"},{"moduleId":38,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inherits\\inherits.js","module":"./~/inherits/inherits.js","moduleName":"./~/inherits/inherits.js","type":"cjs require","userRequest":"util","loc":"2:13-28"},{"moduleId":48,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\errors.js","module":"./~/sshpk/lib/errors.js","moduleName":"./~/sshpk/lib/errors.js","type":"cjs require","userRequest":"util","loc":"4:11-26"},{"moduleId":68,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\glob.js","module":"./~/glob/glob.js","moduleName":"./~/glob/glob.js","type":"cjs require","userRequest":"util","loc":"59:11-26"},{"moduleId":74,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\parse.js","module":"./src/lockfile/parse.js","moduleName":"./src/lockfile/parse.js","type":"cjs require","userRequest":"util","loc":"15:40-55"},{"moduleId":75,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\reporters\\base-reporter.js","module":"./src/reporters/base-reporter.js","moduleName":"./src/reporters/base-reporter.js","type":"cjs require","userRequest":"util","loc":"43:13-28"},{"moduleId":109,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\certificate.js","module":"./~/sshpk/lib/certificate.js","moduleName":"./~/sshpk/lib/certificate.js","type":"cjs require","userRequest":"util","loc":"11:11-26"},{"moduleId":112,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\identity.js","module":"./~/sshpk/lib/identity.js","moduleName":"./~/sshpk/lib/identity.js","type":"cjs require","userRequest":"util","loc":"11:11-26"},{"moduleId":125,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\utils.js","module":"./~/http-signature/lib/utils.js","moduleName":"./~/http-signature/lib/utils.js","type":"cjs require","userRequest":"util","loc":"5:11-26"},{"moduleId":207,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\debug\\src\\node.js","module":"./~/debug/src/node.js","moduleName":"./~/debug/src/node.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":213,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\sync.js","module":"./~/glob/sync.js","moduleName":"./~/glob/sync.js","type":"cjs require","userRequest":"util","loc":"9:11-26"},{"moduleId":279,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\combined-stream\\lib\\combined_stream.js","module":"./~/combined-stream/lib/combined_stream.js","moduleName":"./~/combined-stream/lib/combined_stream.js","type":"cjs require","userRequest":"util","loc":"1:11-26"},{"moduleId":283,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\extsprintf\\lib\\extsprintf.js","module":"./~/extsprintf/lib/extsprintf.js","moduleName":"./~/extsprintf/lib/extsprintf.js","type":"cjs require","userRequest":"util","loc":"6:15-30"},{"moduleId":286,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\graceful-fs\\graceful-fs.js","module":"./~/graceful-fs/graceful-fs.js","moduleName":"./~/graceful-fs/graceful-fs.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":304,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\readable-stream\\lib\\_stream_readable.js","module":"./~/readable-stream/lib/_stream_readable.js","moduleName":"./~/readable-stream/lib/_stream_readable.js","type":"cjs require","userRequest":"util","loc":"42:16-31"},{"moduleId":320,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\ed-compat.js","module":"./~/sshpk/lib/ed-compat.js","moduleName":"./~/sshpk/lib/ed-compat.js","type":"cjs require","userRequest":"util","loc":"10:11-26"},{"moduleId":326,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\through2\\through2.js","module":"./~/through2/through2.js","moduleName":"./~/through2/through2.js","type":"cjs require","userRequest":"util","loc":"2:16-31"},{"moduleId":342,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\loud-rejection\\index.js","module":"./~/loud-rejection/index.js","moduleName":"./~/loud-rejection/index.js","type":"cjs require","userRequest":"util","loc":"2:11-26"},{"moduleId":395,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\reporters\\console\\console-reporter.js","module":"./src/reporters/console/console-reporter.js","moduleName":"./src/reporters/console/console-reporter.js","type":"cjs require","userRequest":"util","loc":"57:15-30"},{"moduleId":422,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\bl\\bl.js","module":"./~/bl/bl.js","moduleName":"./~/bl/bl.js","type":"cjs require","userRequest":"util","loc":"2:19-34"},{"moduleId":446,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\delayed-stream\\lib\\delayed_stream.js","module":"./~/delayed-stream/lib/delayed_stream.js","moduleName":"./~/delayed-stream/lib/delayed_stream.js","type":"cjs require","userRequest":"util","loc":"2:11-26"},{"moduleId":467,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\forever-agent\\index.js","module":"./~/forever-agent/index.js","moduleName":"./~/forever-agent/index.js","type":"cjs require","userRequest":"util","loc":"4:11-26"},{"moduleId":468,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\form-data\\lib\\form_data.js","module":"./~/form-data/lib/form_data.js","moduleName":"./~/form-data/lib/form_data.js","type":"cjs require","userRequest":"util","loc":"2:11-26"},{"moduleId":531,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\parser.js","module":"./~/http-signature/lib/parser.js","moduleName":"./~/http-signature/lib/parser.js","type":"cjs require","userRequest":"util","loc":"4:11-26"},{"moduleId":532,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\signer.js","module":"./~/http-signature/lib/signer.js","moduleName":"./~/http-signature/lib/signer.js","type":"cjs require","userRequest":"util","loc":"11:14-29"},{"moduleId":532,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\signer.js","module":"./~/http-signature/lib/signer.js","moduleName":"./~/http-signature/lib/signer.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":537,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\checkbox.js","module":"./~/inquirer/lib/prompts/checkbox.js","moduleName":"./~/inquirer/lib/prompts/checkbox.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":538,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\confirm.js","module":"./~/inquirer/lib/prompts/confirm.js","moduleName":"./~/inquirer/lib/prompts/confirm.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":539,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\editor.js","module":"./~/inquirer/lib/prompts/editor.js","moduleName":"./~/inquirer/lib/prompts/editor.js","type":"cjs require","userRequest":"util","loc":"5:11-26"},{"moduleId":540,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\expand.js","module":"./~/inquirer/lib/prompts/expand.js","moduleName":"./~/inquirer/lib/prompts/expand.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":541,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\input.js","module":"./~/inquirer/lib/prompts/input.js","moduleName":"./~/inquirer/lib/prompts/input.js","type":"cjs require","userRequest":"util","loc":"5:11-26"},{"moduleId":542,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\list.js","module":"./~/inquirer/lib/prompts/list.js","moduleName":"./~/inquirer/lib/prompts/list.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":543,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\password.js","module":"./~/inquirer/lib/prompts/password.js","moduleName":"./~/inquirer/lib/prompts/password.js","type":"cjs require","userRequest":"util","loc":"5:11-26"},{"moduleId":544,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\rawlist.js","module":"./~/inquirer/lib/prompts/rawlist.js","moduleName":"./~/inquirer/lib/prompts/rawlist.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":545,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\ui\\bottom-bar.js","module":"./~/inquirer/lib/ui/bottom-bar.js","moduleName":"./~/inquirer/lib/ui/bottom-bar.js","type":"cjs require","userRequest":"util","loc":"5:11-26"},{"moduleId":546,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\ui\\prompt.js","module":"./~/inquirer/lib/ui/prompt.js","moduleName":"./~/inquirer/lib/ui/prompt.js","type":"cjs require","userRequest":"util","loc":"4:11-26"},{"moduleId":570,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\jsprim\\lib\\jsprim.js","module":"./~/jsprim/lib/jsprim.js","moduleName":"./~/jsprim/lib/jsprim.js","type":"cjs require","userRequest":"util","loc":"6:15-30"},{"moduleId":633,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\request.js","module":"./~/request/request.js","moduleName":"./~/request/request.js","type":"cjs require","userRequest":"util","loc":"6:11-26"},{"moduleId":661,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tar-stream\\extract.js","module":"./~/tar-stream/extract.js","moduleName":"./~/tar-stream/extract.js","type":"cjs require","userRequest":"util","loc":"1:11-26"},{"moduleId":662,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tar-stream\\pack.js","module":"./~/tar-stream/pack.js","moduleName":"./~/tar-stream/pack.js","type":"cjs require","userRequest":"util","loc":"3:11-26"},{"moduleId":666,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tough-cookie\\lib\\memstore.js","module":"./~/tough-cookie/lib/memstore.js","moduleName":"./~/tough-cookie/lib/memstore.js","type":"cjs require","userRequest":"util","loc":"35:11-26"},{"moduleId":668,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tunnel-agent\\index.js","module":"./~/tunnel-agent/index.js","moduleName":"./~/tunnel-agent/index.js","type":"cjs require","userRequest":"util","loc":"9:11-26"},{"moduleId":669,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\util-deprecate\\node.js","module":"./~/util-deprecate/node.js","moduleName":"./~/util-deprecate/node.js","type":"cjs require","userRequest":"util","loc":"6:17-32"},{"moduleId":673,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\verror\\lib\\verror.js","module":"./~/verror/lib/verror.js","moduleName":"./~/verror/lib/verror.js","type":"cjs require","userRequest":"util","loc":"6:15-30"}],"usedExports":true,"providedExports":null,"depth":2},{"id":3,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\errors.js","name":"./src/errors.js","index":240,"index2":235,"size":760,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","issuerId":384,"issuerName":"./src/cli/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"../../errors.js","loc":"118:19-45"},{"moduleId":40,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\child.js","module":"./src/util/child.js","moduleName":"./src/util/child.js","type":"cjs require","userRequest":"../errors.js","loc":"27:19-42"},{"moduleId":41,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\_build-sub-commands.js","module":"./src/cli/commands/_build-sub-commands.js","moduleName":"./src/cli/commands/_build-sub-commands.js","type":"cjs require","userRequest":"../../errors.js","loc":"72:19-45"},{"moduleId":74,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\parse.js","module":"./src/lockfile/parse.js","moduleName":"./src/lockfile/parse.js","type":"cjs require","userRequest":"../errors.js","loc":"39:19-42"},{"moduleId":76,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\hosted-git-resolver.js","module":"./src/resolvers/exotics/hosted-git-resolver.js","moduleName":"./src/resolvers/exotics/hosted-git-resolver.js","type":"cjs require","userRequest":"../../errors.js","loc":"18:19-45"},{"moduleId":86,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\global.js","module":"./src/cli/commands/global.js","moduleName":"./src/cli/commands/global.js","type":"cjs require","userRequest":"../../errors.js","loc":"284:19-45"},{"moduleId":87,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\login.js","module":"./src/cli/commands/login.js","moduleName":"./src/cli/commands/login.js","type":"cjs require","userRequest":"../../errors.js","loc":"156:19-45"},{"moduleId":88,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-request.js","module":"./src/package-request.js","moduleName":"./src/package-request.js","type":"cjs require","userRequest":"./errors.js","loc":"58:19-41"},{"moduleId":92,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\execute-lifecycle-script.js","module":"./src/util/execute-lifecycle-script.js","moduleName":"./src/util/execute-lifecycle-script.js","type":"cjs require","userRequest":"../errors.js","loc":"332:19-42"},{"moduleId":93,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\validate.js","module":"./src/util/normalize-manifest/validate.js","moduleName":"./src/util/normalize-manifest/validate.js","type":"cjs require","userRequest":"../../errors.js","loc":"83:19-45"},{"moduleId":114,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","module":"./src/config.js","moduleName":"./src/config.js","type":"cjs require","userRequest":"./errors.js","loc":"42:19-41"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"../../errors.js","loc":"81:19-45"},{"moduleId":117,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\pack.js","module":"./src/cli/commands/pack.js","moduleName":"./src/cli/commands/pack.js","type":"cjs require","userRequest":"../../errors.js","loc":"176:19-45"},{"moduleId":151,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-fetcher.js","module":"./src/package-fetcher.js","moduleName":"./src/package-fetcher.js","type":"cjs require","userRequest":"./errors.js","loc":"100:19-41"},{"moduleId":156,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\file-resolver.js","module":"./src/resolvers/exotics/file-resolver.js","moduleName":"./src/resolvers/exotics/file-resolver.js","type":"cjs require","userRequest":"../../errors.js","loc":"35:19-45"},{"moduleId":157,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\gist-resolver.js","module":"./src/resolvers/exotics/gist-resolver.js","moduleName":"./src/resolvers/exotics/gist-resolver.js","type":"cjs require","userRequest":"../../errors.js","loc":"11:19-45"},{"moduleId":158,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\registries\\npm-resolver.js","module":"./src/resolvers/registries/npm-resolver.js","moduleName":"./src/resolvers/registries/npm-resolver.js","type":"cjs require","userRequest":"../../errors.js","loc":"16:19-45"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"../errors.js","loc":"58:19-42"},{"moduleId":250,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\check.js","module":"./src/cli/commands/check.js","moduleName":"./src/cli/commands/check.js","type":"cjs require","userRequest":"../../errors.js","loc":"450:19-45"},{"moduleId":251,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\link.js","module":"./src/cli/commands/link.js","moduleName":"./src/cli/commands/link.js","type":"cjs require","userRequest":"../../errors.js","loc":"120:19-45"},{"moduleId":253,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\remove.js","module":"./src/cli/commands/remove.js","moduleName":"./src/cli/commands/remove.js","type":"cjs require","userRequest":"../../errors.js","loc":"176:19-45"},{"moduleId":254,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\tag.js","module":"./src/cli/commands/tag.js","moduleName":"./src/cli/commands/tag.js","type":"cjs require","userRequest":"../../errors.js","loc":"124:19-45"},{"moduleId":256,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\version.js","module":"./src/cli/commands/version.js","moduleName":"./src/cli/commands/version.js","type":"cjs require","userRequest":"../../errors.js","loc":"212:19-45"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"../errors.js","loc":"23:19-42"},{"moduleId":258,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-compatibility.js","module":"./src/package-compatibility.js","moduleName":"./src/package-compatibility.js","type":"cjs require","userRequest":"./errors.js","loc":"13:19-41"},{"moduleId":272,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\request-manager.js","module":"./src/util/request-manager.js","moduleName":"./src/util/request-manager.js","type":"cjs require","userRequest":"../errors.js","loc":"40:19-42"},{"moduleId":359,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\_useless.js","module":"./src/cli/commands/_useless.js","moduleName":"./src/cli/commands/_useless.js","type":"cjs require","userRequest":"../../errors.js","loc":"21:19-45"},{"moduleId":364,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\create.js","module":"./src/cli/commands/create.js","moduleName":"./src/cli/commands/create.js","type":"cjs require","userRequest":"../../errors.js","loc":"46:19-45"},{"moduleId":365,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\exec.js","module":"./src/cli/commands/exec.js","moduleName":"./src/cli/commands/exec.js","type":"cjs require","userRequest":"../../errors.js","loc":"39:19-45"},{"moduleId":366,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\generate-lock-entry.js","module":"./src/cli/commands/generate-lock-entry.js","moduleName":"./src/cli/commands/generate-lock-entry.js","type":"cjs require","userRequest":"../../errors.js","loc":"54:19-45"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"../../errors.js","loc":"43:19-45"},{"moduleId":375,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\owner.js","module":"./src/cli/commands/owner.js","moduleName":"./src/cli/commands/owner.js","type":"cjs require","userRequest":"../../errors.js","loc":"133:19-45"},{"moduleId":376,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","module":"./src/cli/commands/publish.js","moduleName":"./src/cli/commands/publish.js","type":"cjs require","userRequest":"../../errors.js","loc":"179:19-45"},{"moduleId":377,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\run.js","module":"./src/cli/commands/run.js","moduleName":"./src/cli/commands/run.js","type":"cjs require","userRequest":"../../errors.js","loc":"212:19-45"},{"moduleId":379,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\unlink.js","module":"./src/cli/commands/unlink.js","moduleName":"./src/cli/commands/unlink.js","type":"cjs require","userRequest":"../../errors.js","loc":"86:19-45"},{"moduleId":381,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\why.js","module":"./src/cli/commands/why.js","moduleName":"./src/cli/commands/why.js","type":"cjs require","userRequest":"../../errors.js","loc":"299:19-45"},{"moduleId":382,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspace.js","module":"./src/cli/commands/workspace.js","moduleName":"./src/cli/commands/workspace.js","type":"cjs require","userRequest":"../../errors.js","loc":"68:19-45"},{"moduleId":383,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspaces.js","module":"./src/cli/commands/workspaces.js","moduleName":"./src/cli/commands/workspaces.js","type":"cjs require","userRequest":"../../errors.js","loc":"113:19-45"},{"moduleId":384,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","module":"./src/cli/index.js","moduleName":"./src/cli/index.js","type":"cjs require","userRequest":"../errors.js","loc":"152:19-42"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"../errors.js","loc":"16:19-42"},{"moduleId":405,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\registry-resolver.js","module":"./src/resolvers/exotics/registry-resolver.js","moduleName":"./src/resolvers/exotics/registry-resolver.js","type":"cjs require","userRequest":"../../errors.js","loc":"10:19-45"}],"usedExports":true,"providedExports":null,"depth":1,"source":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nclass MessageError extends Error {\n constructor(msg, code) {\n super(msg);\n this.code = code;\n }\n\n}\n\nexports.MessageError = MessageError;\nclass ProcessSpawnError extends MessageError {\n constructor(msg, code, process) {\n super(msg, code);\n this.process = process;\n }\n\n}\n\nexports.ProcessSpawnError = ProcessSpawnError;\nclass SecurityError extends MessageError {}\n\nexports.SecurityError = SecurityError;\nclass ProcessTermError extends MessageError {}\n\nexports.ProcessTermError = ProcessTermError;\nclass ResponseError extends Error {\n constructor(msg, responseCode) {\n super(msg);\n this.responseCode = responseCode;\n }\n\n}\nexports.ResponseError = ResponseError;"},{"id":4,"identifier":"external \"fs\"","name":"external \"fs\"","index":75,"index2":72,"size":42,"cacheable":false,"built":false,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","issuerId":384,"issuerName":"./src/cli/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":5,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\fs.js","module":"./src/util/fs.js","moduleName":"./src/util/fs.js","type":"cjs require","userRequest":"fs","loc":"1062:38-51"},{"moduleId":68,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\glob.js","module":"./~/glob/glob.js","moduleName":"./~/glob/glob.js","type":"cjs require","userRequest":"fs","loc":"43:9-22"},{"moduleId":85,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\yarn-version.js","module":"./src/util/yarn-version.js","moduleName":"./src/util/yarn-version.js","type":"cjs require","userRequest":"fs","loc":"54:39-52"},{"moduleId":106,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\fs.realpath\\index.js","module":"./~/fs.realpath/index.js","moduleName":"./~/fs.realpath/index.js","type":"cjs require","userRequest":"fs","loc":"8:9-22"},{"moduleId":108,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\mkdirp\\index.js","module":"./~/mkdirp/index.js","moduleName":"./~/mkdirp/index.js","type":"cjs require","userRequest":"fs","loc":"2:9-22"},{"moduleId":117,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\pack.js","module":"./src/cli/commands/pack.js","moduleName":"./src/cli/commands/pack.js","type":"cjs require","userRequest":"fs","loc":"186:12-25"},{"moduleId":138,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tar-fs\\index.js","module":"./~/tar-fs/index.js","moduleName":"./~/tar-fs/index.js","type":"cjs require","userRequest":"fs","loc":"5:9-22"},{"moduleId":159,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\fs-normalized.js","module":"./src/util/fs-normalized.js","moduleName":"./src/util/fs-normalized.js","type":"cjs require","userRequest":"fs","loc":"77:38-51"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"fs","loc":"52:15-28"},{"moduleId":212,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\fs.realpath\\old.js","module":"./~/fs.realpath/old.js","moduleName":"./~/fs.realpath/old.js","type":"cjs require","userRequest":"fs","loc":"24:9-22"},{"moduleId":213,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\sync.js","module":"./~/glob/sync.js","moduleName":"./~/glob/sync.js","type":"cjs require","userRequest":"fs","loc":"4:9-22"},{"moduleId":231,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rimraf\\rimraf.js","module":"./~/rimraf/rimraf.js","moduleName":"./~/rimraf/rimraf.js","type":"cjs require","userRequest":"fs","loc":"6:9-22"},{"moduleId":240,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\commander\\index.js","module":"./~/commander/index.js","moduleName":"./~/commander/index.js","type":"cjs require","userRequest":"fs","loc":"11:9-22"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"fs","loc":"64:11-24"},{"moduleId":272,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\request-manager.js","module":"./src/util/request-manager.js","moduleName":"./src/util/request-manager.js","type":"cjs require","userRequest":"fs","loc":"10:38-51"},{"moduleId":285,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\graceful-fs\\fs.js","module":"./~/graceful-fs/fs.js","moduleName":"./~/graceful-fs/fs.js","type":"cjs require","userRequest":"fs","loc":"3:9-22"},{"moduleId":286,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\graceful-fs\\graceful-fs.js","module":"./~/graceful-fs/graceful-fs.js","moduleName":"./~/graceful-fs/graceful-fs.js","type":"cjs require","userRequest":"fs","loc":"1:9-22"},{"moduleId":300,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\pump\\index.js","module":"./~/pump/index.js","moduleName":"./~/pump/index.js","type":"cjs require","userRequest":"fs","loc":"3:9-22"},{"moduleId":361,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\bin.js","module":"./src/cli/commands/bin.js","moduleName":"./src/cli/commands/bin.js","type":"cjs require","userRequest":"fs","loc":"18:11-24"},{"moduleId":376,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","module":"./src/cli/commands/publish.js","moduleName":"./src/cli/commands/publish.js","type":"cjs require","userRequest":"fs","loc":"220:12-25"},{"moduleId":384,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","module":"./src/cli/index.js","moduleName":"./src/cli/index.js","type":"cjs require","userRequest":"fs","loc":"86:38-51"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"fs","loc":"80:11-24"},{"moduleId":391,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-install-scripts.js","module":"./src/package-install-scripts.js","moduleName":"./src/package-install-scripts.js","type":"cjs require","userRequest":"fs","loc":"53:11-24"},{"moduleId":420,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\rc.js","module":"./src/util/rc.js","moduleName":"./src/util/rc.js","type":"cjs require","userRequest":"fs","loc":"11:15-28"},{"moduleId":429,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\chownr\\chownr.js","module":"./~/chownr/chownr.js","moduleName":"./~/chownr/chownr.js","type":"cjs require","userRequest":"fs","loc":"4:9-22"},{"moduleId":462,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\external-editor\\main\\index.js","module":"./~/external-editor/main/index.js","moduleName":"./~/external-editor/main/index.js","type":"cjs require","userRequest":"fs","loc":"13:7-20"},{"moduleId":468,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\form-data\\lib\\form_data.js","module":"./~/form-data/lib/form_data.js","moduleName":"./~/form-data/lib/form_data.js","type":"cjs require","userRequest":"fs","loc":"7:9-22"},{"moduleId":470,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\fs-constants\\index.js","module":"./~/fs-constants/index.js","moduleName":"./~/fs-constants/index.js","type":"cjs require","userRequest":"fs","loc":"1:17-30"},{"moduleId":475,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\graceful-readlink\\index.js","module":"./~/graceful-readlink/index.js","moduleName":"./~/graceful-readlink/index.js","type":"cjs require","userRequest":"fs","loc":"1:9-22"},{"moduleId":617,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request-capture-har\\request-capture-har.js","module":"./~/request-capture-har/request-capture-har.js","moduleName":"./~/request-capture-har/request-capture-har.js","type":"cjs require","userRequest":"fs","loc":"1:9-22"},{"moduleId":621,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\lib\\har.js","module":"./~/request/lib/har.js","moduleName":"./~/request/lib/har.js","type":"cjs require","userRequest":"fs","loc":"3:9-22"},{"moduleId":664,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tmp\\lib\\tmp.js","module":"./~/tmp/lib/tmp.js","moduleName":"./~/tmp/lib/tmp.js","type":"cjs require","userRequest":"fs","loc":"13:11-24"}],"usedExports":true,"providedExports":null,"depth":1},{"id":5,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\fs.js","name":"./src/util/fs.js","index":209,"index2":234,"size":39485,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","issuerId":12,"issuerName":"./src/lockfile/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":12,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","module":"./src/lockfile/index.js","moduleName":"./src/lockfile/index.js","type":"cjs require","userRequest":"../util/fs.js","loc":"69:39-63"},{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"202:39-66"},{"moduleId":52,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\npm-registry.js","module":"./src/registries/npm-registry.js","moduleName":"./src/registries/npm-registry.js","type":"cjs require","userRequest":"../util/fs.js","loc":"29:39-63"},{"moduleId":85,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\yarn-version.js","module":"./src/util/yarn-version.js","moduleName":"./src/util/yarn-version.js","type":"cjs require","userRequest":"./fs","loc":"48:15-30"},{"moduleId":86,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\global.js","module":"./src/cli/commands/global.js","moduleName":"./src/cli/commands/global.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"356:39-66"},{"moduleId":88,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-request.js","module":"./src/package-request.js","moduleName":"./src/package-request.js","type":"cjs require","userRequest":"./util/fs.js","loc":"82:39-62"},{"moduleId":92,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\execute-lifecycle-script.js","module":"./src/util/execute-lifecycle-script.js","moduleName":"./src/util/execute-lifecycle-script.js","type":"cjs require","userRequest":"./fs.js","loc":"350:15-33"},{"moduleId":114,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","module":"./src/config.js","moduleName":"./src/config.js","type":"cjs require","userRequest":"./util/fs.js","loc":"48:39-62"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"93:39-66"},{"moduleId":117,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\pack.js","module":"./src/cli/commands/pack.js","moduleName":"./src/cli/commands/pack.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"164:39-66"},{"moduleId":118,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\base-fetcher.js","module":"./src/fetchers/base-fetcher.js","moduleName":"./src/fetchers/base-fetcher.js","type":"cjs require","userRequest":"../util/fs.js","loc":"28:39-63"},{"moduleId":150,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\integrity-checker.js","module":"./src/integrity-checker.js","moduleName":"./src/integrity-checker.js","type":"cjs require","userRequest":"./util/fs.js","loc":"29:39-62"},{"moduleId":151,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-fetcher.js","module":"./src/package-fetcher.js","moduleName":"./src/package-fetcher.js","type":"cjs require","userRequest":"./util/fs.js","loc":"112:39-62"},{"moduleId":152,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-linker.js","module":"./src/package-linker.js","moduleName":"./src/package-linker.js","type":"cjs require","userRequest":"./util/fs.js","loc":"62:39-62"},{"moduleId":156,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\file-resolver.js","module":"./src/resolvers/exotics/file-resolver.js","moduleName":"./src/resolvers/exotics/file-resolver.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"53:39-66"},{"moduleId":158,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\registries\\npm-resolver.js","module":"./src/resolvers/registries/npm-resolver.js","moduleName":"./src/resolvers/registries/npm-resolver.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"46:39-66"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"./fs.js","loc":"82:40-58"},{"moduleId":249,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\autoclean.js","module":"./src/cli/commands/autoclean.js","moduleName":"./src/cli/commands/autoclean.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"214:39-66"},{"moduleId":250,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\check.js","module":"./src/cli/commands/check.js","moduleName":"./src/cli/commands/check.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"474:39-66"},{"moduleId":251,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\link.js","module":"./src/cli/commands/link.js","moduleName":"./src/cli/commands/link.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"132:39-66"},{"moduleId":253,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\remove.js","module":"./src/cli/commands/remove.js","moduleName":"./src/cli/commands/remove.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"188:39-66"},{"moduleId":256,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\version.js","module":"./src/cli/commands/version.js","moduleName":"./src/cli/commands/version.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"224:39-66"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"../util/fs.js","loc":"47:39-63"},{"moduleId":264,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\link-resolver.js","module":"./src/resolvers/exotics/link-resolver.js","moduleName":"./src/resolvers/exotics/link-resolver.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"29:39-66"},{"moduleId":362,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\cache.js","module":"./src/cli/commands/cache.js","moduleName":"./src/cli/commands/cache.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"152:39-66"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"151:39-66"},{"moduleId":370,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\init.js","module":"./src/cli/commands/init.js","moduleName":"./src/cli/commands/init.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"271:39-66"},{"moduleId":376,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","module":"./src/cli/commands/publish.js","moduleName":"./src/cli/commands/publish.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"191:39-66"},{"moduleId":377,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\run.js","module":"./src/cli/commands/run.js","moduleName":"./src/cli/commands/run.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"224:39-66"},{"moduleId":379,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\unlink.js","module":"./src/cli/commands/unlink.js","moduleName":"./src/cli/commands/unlink.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"92:39-66"},{"moduleId":381,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\why.js","module":"./src/cli/commands/why.js","moduleName":"./src/cli/commands/why.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"287:39-66"},{"moduleId":385,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\copy-fetcher.js","module":"./src/fetchers/copy-fetcher.js","moduleName":"./src/fetchers/copy-fetcher.js","type":"cjs require","userRequest":"../util/fs.js","loc":"22:39-63"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"../util/fs.js","loc":"34:39-63"},{"moduleId":391,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-install-scripts.js","module":"./src/package-install-scripts.js","moduleName":"./src/package-install-scripts.js","type":"cjs require","userRequest":"./util/fs.js","loc":"34:39-62"},{"moduleId":393,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\yarn-registry.js","module":"./src/registries/yarn-registry.js","moduleName":"./src/registries/yarn-registry.js","type":"cjs require","userRequest":"../util/fs.js","loc":"35:39-63"},{"moduleId":406,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\tarball-resolver.js","module":"./src/resolvers/exotics/tarball-resolver.js","moduleName":"./src/resolvers/exotics/tarball-resolver.js","type":"cjs require","userRequest":"../../util/fs.js","loc":"52:39-66"},{"moduleId":414,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\fix.js","module":"./src/util/normalize-manifest/fix.js","moduleName":"./src/util/normalize-manifest/fix.js","type":"cjs require","userRequest":"../fs.js","loc":"40:39-58"}],"usedExports":true,"providedExports":null,"depth":1,"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFirstSuitableFolder = exports.readFirstAvailableStream = exports.makeTempDir = exports.hardlinksWork = exports.writeFilePreservingEol = exports.getFileSizeOnDisk = exports.walk = exports.symlink = exports.find = exports.readJsonAndFile = exports.readJson = exports.readFileAny = exports.hardlinkBulk = exports.copyBulk = exports.unlink = exports.glob = exports.link = exports.chmod = exports.lstat = exports.exists = exports.mkdirp = exports.stat = exports.access = exports.rename = exports.readdir = exports.realpath = exports.readlink = exports.writeFile = exports.open = exports.readFileBuffer = exports.lockQueue = exports.constants = undefined;\n\nvar _asyncToGenerator2;\n\nfunction _load_asyncToGenerator() {\n return _asyncToGenerator2 = _interopRequireDefault(require('babel-runtime/helpers/asyncToGenerator'));\n}\n\nlet buildActionsForCopy = (() => {\n var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) {\n\n //\n let build = (() => {\n var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) {\n const src = data.src,\n dest = data.dest,\n type = data.type;\n\n const onFresh = data.onFresh || noop;\n const onDone = data.onDone || noop;\n\n // TODO https://github.com/yarnpkg/yarn/issues/3751\n // related to bundled dependencies handling\n if (files.has(dest.toLowerCase())) {\n reporter.verbose(`The case-insensitive file ${dest} shouldn't be copied twice in one bulk copy`);\n } else {\n files.add(dest.toLowerCase());\n }\n\n if (type === 'symlink') {\n yield mkdirp((_path || _load_path()).default.dirname(dest));\n onFresh();\n actions.symlink.push({\n dest,\n linkname: src\n });\n onDone();\n return;\n }\n\n if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) {\n // ignored file\n return;\n }\n\n const srcStat = yield lstat(src);\n let srcFiles;\n\n if (srcStat.isDirectory()) {\n srcFiles = yield readdir(src);\n }\n\n let destStat;\n try {\n // try accessing the destination\n destStat = yield lstat(dest);\n } catch (e) {\n // proceed if destination doesn't exist, otherwise error\n if (e.code !== 'ENOENT') {\n throw e;\n }\n }\n\n // if destination exists\n if (destStat) {\n const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink();\n const bothFolders = srcStat.isDirectory() && destStat.isDirectory();\n const bothFiles = srcStat.isFile() && destStat.isFile();\n\n // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving\n // us modes that aren't valid. investigate this, it's generally safe to proceed.\n\n /* if (srcStat.mode !== destStat.mode) {\n try {\n await access(dest, srcStat.mode);\n } catch (err) {}\n } */\n\n if (bothFiles && artifactFiles.has(dest)) {\n // this file gets changed during build, likely by a custom install script. Don't bother checking it.\n onDone();\n reporter.verbose(reporter.lang('verboseFileSkipArtifact', src));\n return;\n }\n\n if (bothFiles && srcStat.size === destStat.size && (0, (_fsNormalized || _load_fsNormalized()).fileDatesEqual)(srcStat.mtime, destStat.mtime)) {\n // we can safely assume this is the same file\n onDone();\n reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.size, +srcStat.mtime));\n return;\n }\n\n if (bothSymlinks) {\n const srcReallink = yield readlink(src);\n if (srcReallink === (yield readlink(dest))) {\n // if both symlinks are the same then we can continue on\n onDone();\n reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink));\n return;\n }\n }\n\n if (bothFolders) {\n // mark files that aren't in this folder as possibly extraneous\n const destFiles = yield readdir(dest);\n invariant(srcFiles, 'src files not initialised');\n\n for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {\n var _ref6;\n\n if (_isArray4) {\n if (_i4 >= _iterator4.length) break;\n _ref6 = _iterator4[_i4++];\n } else {\n _i4 = _iterator4.next();\n if (_i4.done) break;\n _ref6 = _i4.value;\n }\n\n const file = _ref6;\n\n if (srcFiles.indexOf(file) < 0) {\n const loc = (_path || _load_path()).default.join(dest, file);\n possibleExtraneous.add(loc);\n\n if ((yield lstat(loc)).isDirectory()) {\n for (var _iterator5 = yield readdir(loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {\n var _ref7;\n\n if (_isArray5) {\n if (_i5 >= _iterator5.length) break;\n _ref7 = _iterator5[_i5++];\n } else {\n _i5 = _iterator5.next();\n if (_i5.done) break;\n _ref7 = _i5.value;\n }\n\n const file = _ref7;\n\n possibleExtraneous.add((_path || _load_path()).default.join(loc, file));\n }\n }\n }\n }\n }\n }\n\n if (destStat && destStat.isSymbolicLink()) {\n yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest);\n destStat = null;\n }\n\n if (srcStat.isSymbolicLink()) {\n onFresh();\n const linkname = yield readlink(src);\n actions.symlink.push({\n dest,\n linkname\n });\n onDone();\n } else if (srcStat.isDirectory()) {\n if (!destStat) {\n reporter.verbose(reporter.lang('verboseFileFolder', dest));\n yield mkdirp(dest);\n }\n\n const destParts = dest.split((_path || _load_path()).default.sep);\n while (destParts.length) {\n files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase());\n destParts.pop();\n }\n\n // push all files to queue\n invariant(srcFiles, 'src files not initialised');\n let remaining = srcFiles.length;\n if (!remaining) {\n onDone();\n }\n for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {\n var _ref8;\n\n if (_isArray6) {\n if (_i6 >= _iterator6.length) break;\n _ref8 = _iterator6[_i6++];\n } else {\n _i6 = _iterator6.next();\n if (_i6.done) break;\n _ref8 = _i6.value;\n }\n\n const file = _ref8;\n\n queue.push({\n dest: (_path || _load_path()).default.join(dest, file),\n onFresh,\n onDone: function (_onDone) {\n function onDone() {\n return _onDone.apply(this, arguments);\n }\n\n onDone.toString = function () {\n return _onDone.toString();\n };\n\n return onDone;\n }(function () {\n if (--remaining === 0) {\n onDone();\n }\n }),\n src: (_path || _load_path()).default.join(src, file)\n });\n }\n } else if (srcStat.isFile()) {\n onFresh();\n actions.file.push({\n src,\n dest,\n atime: srcStat.atime,\n mtime: srcStat.mtime,\n mode: srcStat.mode\n });\n onDone();\n } else {\n throw new Error(`unsure how to copy this: ${src}`);\n }\n });\n\n return function build(_x5) {\n return _ref5.apply(this, arguments);\n };\n })();\n\n const artifactFiles = new Set(events.artifactFiles || []);\n const files = new Set();\n\n // initialise events\n for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref2;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref2 = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref2 = _i.value;\n }\n\n const item = _ref2;\n\n const onDone = item.onDone;\n item.onDone = function () {\n events.onProgress(item.dest);\n if (onDone) {\n onDone();\n }\n };\n }\n events.onStart(queue.length);\n\n // start building actions\n const actions = {\n file: [],\n symlink: [],\n link: []\n };\n\n // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items\n // at a time due to the requirement to push items onto the queue\n while (queue.length) {\n const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS);\n yield Promise.all(items.map(build));\n }\n\n // simulate the existence of some files to prevent considering them extraneous\n for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {\n var _ref3;\n\n if (_isArray2) {\n if (_i2 >= _iterator2.length) break;\n _ref3 = _iterator2[_i2++];\n } else {\n _i2 = _iterator2.next();\n if (_i2.done) break;\n _ref3 = _i2.value;\n }\n\n const file = _ref3;\n\n if (possibleExtraneous.has(file)) {\n reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file));\n possibleExtraneous.delete(file);\n }\n }\n\n for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {\n var _ref4;\n\n if (_isArray3) {\n if (_i3 >= _iterator3.length) break;\n _ref4 = _iterator3[_i3++];\n } else {\n _i3 = _iterator3.next();\n if (_i3.done) break;\n _ref4 = _i3.value;\n }\n\n const loc = _ref4;\n\n if (files.has(loc.toLowerCase())) {\n possibleExtraneous.delete(loc);\n }\n }\n\n return actions;\n });\n\n return function buildActionsForCopy(_x, _x2, _x3, _x4) {\n return _ref.apply(this, arguments);\n };\n})();\n\nlet buildActionsForHardlink = (() => {\n var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) {\n\n //\n let build = (() => {\n var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) {\n const src = data.src,\n dest = data.dest;\n\n const onFresh = data.onFresh || noop;\n const onDone = data.onDone || noop;\n if (files.has(dest.toLowerCase())) {\n // Fixes issue https://github.com/yarnpkg/yarn/issues/2734\n // When bulk hardlinking we have A -> B structure that we want to hardlink to A1 -> B1,\n // package-linker passes that modules A1 and B1 need to be hardlinked,\n // the recursive linking algorithm of A1 ends up scheduling files in B1 to be linked twice which will case\n // an exception.\n onDone();\n return;\n }\n files.add(dest.toLowerCase());\n\n if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) {\n // ignored file\n return;\n }\n\n const srcStat = yield lstat(src);\n let srcFiles;\n\n if (srcStat.isDirectory()) {\n srcFiles = yield readdir(src);\n }\n\n const destExists = yield exists(dest);\n if (destExists) {\n const destStat = yield lstat(dest);\n\n const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink();\n const bothFolders = srcStat.isDirectory() && destStat.isDirectory();\n const bothFiles = srcStat.isFile() && destStat.isFile();\n\n if (srcStat.mode !== destStat.mode) {\n try {\n yield access(dest, srcStat.mode);\n } catch (err) {\n // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving\n // us modes that aren't valid. investigate this, it's generally safe to proceed.\n reporter.verbose(err);\n }\n }\n\n if (bothFiles && artifactFiles.has(dest)) {\n // this file gets changed during build, likely by a custom install script. Don't bother checking it.\n onDone();\n reporter.verbose(reporter.lang('verboseFileSkipArtifact', src));\n return;\n }\n\n // correct hardlink\n if (bothFiles && srcStat.ino !== null && srcStat.ino === destStat.ino) {\n onDone();\n reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.ino));\n return;\n }\n\n if (bothSymlinks) {\n const srcReallink = yield readlink(src);\n if (srcReallink === (yield readlink(dest))) {\n // if both symlinks are the same then we can continue on\n onDone();\n reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink));\n return;\n }\n }\n\n if (bothFolders) {\n // mark files that aren't in this folder as possibly extraneous\n const destFiles = yield readdir(dest);\n invariant(srcFiles, 'src files not initialised');\n\n for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) {\n var _ref14;\n\n if (_isArray10) {\n if (_i10 >= _iterator10.length) break;\n _ref14 = _iterator10[_i10++];\n } else {\n _i10 = _iterator10.next();\n if (_i10.done) break;\n _ref14 = _i10.value;\n }\n\n const file = _ref14;\n\n if (srcFiles.indexOf(file) < 0) {\n const loc = (_path || _load_path()).default.join(dest, file);\n possibleExtraneous.add(loc);\n\n if ((yield lstat(loc)).isDirectory()) {\n for (var _iterator11 = yield readdir(loc), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) {\n var _ref15;\n\n if (_isArray11) {\n if (_i11 >= _iterator11.length) break;\n _ref15 = _iterator11[_i11++];\n } else {\n _i11 = _iterator11.next();\n if (_i11.done) break;\n _ref15 = _i11.value;\n }\n\n const file = _ref15;\n\n possibleExtraneous.add((_path || _load_path()).default.join(loc, file));\n }\n }\n }\n }\n }\n }\n\n if (srcStat.isSymbolicLink()) {\n onFresh();\n const linkname = yield readlink(src);\n actions.symlink.push({\n dest,\n linkname\n });\n onDone();\n } else if (srcStat.isDirectory()) {\n reporter.verbose(reporter.lang('verboseFileFolder', dest));\n yield mkdirp(dest);\n\n const destParts = dest.split((_path || _load_path()).default.sep);\n while (destParts.length) {\n files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase());\n destParts.pop();\n }\n\n // push all files to queue\n invariant(srcFiles, 'src files not initialised');\n let remaining = srcFiles.length;\n if (!remaining) {\n onDone();\n }\n for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) {\n var _ref16;\n\n if (_isArray12) {\n if (_i12 >= _iterator12.length) break;\n _ref16 = _iterator12[_i12++];\n } else {\n _i12 = _iterator12.next();\n if (_i12.done) break;\n _ref16 = _i12.value;\n }\n\n const file = _ref16;\n\n queue.push({\n onFresh,\n src: (_path || _load_path()).default.join(src, file),\n dest: (_path || _load_path()).default.join(dest, file),\n onDone: function (_onDone2) {\n function onDone() {\n return _onDone2.apply(this, arguments);\n }\n\n onDone.toString = function () {\n return _onDone2.toString();\n };\n\n return onDone;\n }(function () {\n if (--remaining === 0) {\n onDone();\n }\n })\n });\n }\n } else if (srcStat.isFile()) {\n onFresh();\n actions.link.push({\n src,\n dest,\n removeDest: destExists\n });\n onDone();\n } else {\n throw new Error(`unsure how to copy this: ${src}`);\n }\n });\n\n return function build(_x10) {\n return _ref13.apply(this, arguments);\n };\n })();\n\n const artifactFiles = new Set(events.artifactFiles || []);\n const files = new Set();\n\n // initialise events\n for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {\n var _ref10;\n\n if (_isArray7) {\n if (_i7 >= _iterator7.length) break;\n _ref10 = _iterator7[_i7++];\n } else {\n _i7 = _iterator7.next();\n if (_i7.done) break;\n _ref10 = _i7.value;\n }\n\n const item = _ref10;\n\n const onDone = item.onDone || noop;\n item.onDone = function () {\n events.onProgress(item.dest);\n onDone();\n };\n }\n events.onStart(queue.length);\n\n // start building actions\n const actions = {\n file: [],\n symlink: [],\n link: []\n };\n\n // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items\n // at a time due to the requirement to push items onto the queue\n while (queue.length) {\n const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS);\n yield Promise.all(items.map(build));\n }\n\n // simulate the existence of some files to prevent considering them extraneous\n for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) {\n var _ref11;\n\n if (_isArray8) {\n if (_i8 >= _iterator8.length) break;\n _ref11 = _iterator8[_i8++];\n } else {\n _i8 = _iterator8.next();\n if (_i8.done) break;\n _ref11 = _i8.value;\n }\n\n const file = _ref11;\n\n if (possibleExtraneous.has(file)) {\n reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file));\n possibleExtraneous.delete(file);\n }\n }\n\n for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) {\n var _ref12;\n\n if (_isArray9) {\n if (_i9 >= _iterator9.length) break;\n _ref12 = _iterator9[_i9++];\n } else {\n _i9 = _iterator9.next();\n if (_i9.done) break;\n _ref12 = _i9.value;\n }\n\n const loc = _ref12;\n\n if (files.has(loc.toLowerCase())) {\n possibleExtraneous.delete(loc);\n }\n }\n\n return actions;\n });\n\n return function buildActionsForHardlink(_x6, _x7, _x8, _x9) {\n return _ref9.apply(this, arguments);\n };\n})();\n\nlet copyBulk = exports.copyBulk = (() => {\n var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) {\n const events = {\n onStart: _events && _events.onStart || noop,\n onProgress: _events && _events.onProgress || noop,\n possibleExtraneous: _events ? _events.possibleExtraneous : new Set(),\n ignoreBasenames: _events && _events.ignoreBasenames || [],\n artifactFiles: _events && _events.artifactFiles || []\n };\n\n const actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter);\n events.onStart(actions.file.length + actions.symlink.length + actions.link.length);\n\n const fileActions = actions.file;\n\n const currentlyWriting = new Map();\n\n yield (_promise || _load_promise()).queue(fileActions, (() => {\n var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) {\n let writePromise;\n while (writePromise = currentlyWriting.get(data.dest)) {\n yield writePromise;\n }\n\n reporter.verbose(reporter.lang('verboseFileCopy', data.src, data.dest));\n const copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function () {\n return currentlyWriting.delete(data.dest);\n });\n currentlyWriting.set(data.dest, copier);\n events.onProgress(data.dest);\n return copier;\n });\n\n return function (_x14) {\n return _ref18.apply(this, arguments);\n };\n })(), CONCURRENT_QUEUE_ITEMS);\n\n // we need to copy symlinks last as they could reference files we were copying\n const symlinkActions = actions.symlink;\n yield (_promise || _load_promise()).queue(symlinkActions, function (data) {\n const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname);\n reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname));\n return symlink(linkname, data.dest);\n });\n });\n\n return function copyBulk(_x11, _x12, _x13) {\n return _ref17.apply(this, arguments);\n };\n})();\n\nlet hardlinkBulk = exports.hardlinkBulk = (() => {\n var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) {\n const events = {\n onStart: _events && _events.onStart || noop,\n onProgress: _events && _events.onProgress || noop,\n possibleExtraneous: _events ? _events.possibleExtraneous : new Set(),\n artifactFiles: _events && _events.artifactFiles || [],\n ignoreBasenames: []\n };\n\n const actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter);\n events.onStart(actions.file.length + actions.symlink.length + actions.link.length);\n\n const fileActions = actions.link;\n\n yield (_promise || _load_promise()).queue(fileActions, (() => {\n var _ref20 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) {\n reporter.verbose(reporter.lang('verboseFileLink', data.src, data.dest));\n if (data.removeDest) {\n yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(data.dest);\n }\n yield link(data.src, data.dest);\n });\n\n return function (_x18) {\n return _ref20.apply(this, arguments);\n };\n })(), CONCURRENT_QUEUE_ITEMS);\n\n // we need to copy symlinks last as they could reference files we were copying\n const symlinkActions = actions.symlink;\n yield (_promise || _load_promise()).queue(symlinkActions, function (data) {\n const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname);\n reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname));\n return symlink(linkname, data.dest);\n });\n });\n\n return function hardlinkBulk(_x15, _x16, _x17) {\n return _ref19.apply(this, arguments);\n };\n})();\n\nlet readFileAny = exports.readFileAny = (() => {\n var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (files) {\n for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) {\n var _ref22;\n\n if (_isArray13) {\n if (_i13 >= _iterator13.length) break;\n _ref22 = _iterator13[_i13++];\n } else {\n _i13 = _iterator13.next();\n if (_i13.done) break;\n _ref22 = _i13.value;\n }\n\n const file = _ref22;\n\n if (yield exists(file)) {\n return readFile(file);\n }\n }\n return null;\n });\n\n return function readFileAny(_x19) {\n return _ref21.apply(this, arguments);\n };\n})();\n\nlet readJson = exports.readJson = (() => {\n var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {\n return (yield readJsonAndFile(loc)).object;\n });\n\n return function readJson(_x20) {\n return _ref23.apply(this, arguments);\n };\n})();\n\nlet readJsonAndFile = exports.readJsonAndFile = (() => {\n var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {\n const file = yield readFile(loc);\n try {\n return {\n object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM(file))),\n content: file\n };\n } catch (err) {\n err.message = `${loc}: ${err.message}`;\n throw err;\n }\n });\n\n return function readJsonAndFile(_x21) {\n return _ref24.apply(this, arguments);\n };\n})();\n\nlet find = exports.find = (() => {\n var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) {\n const parts = dir.split((_path || _load_path()).default.sep);\n\n while (parts.length) {\n const loc = parts.concat(filename).join((_path || _load_path()).default.sep);\n\n if (yield exists(loc)) {\n return loc;\n } else {\n parts.pop();\n }\n }\n\n return false;\n });\n\n return function find(_x22, _x23) {\n return _ref25.apply(this, arguments);\n };\n})();\n\nlet symlink = exports.symlink = (() => {\n var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) {\n try {\n const stats = yield lstat(dest);\n if (stats.isSymbolicLink()) {\n const resolved = yield realpath(dest);\n if (resolved === src) {\n return;\n }\n }\n } catch (err) {\n if (err.code !== 'ENOENT') {\n throw err;\n }\n }\n // We use rimraf for unlink which never throws an ENOENT on missing target\n yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest);\n\n if (process.platform === 'win32') {\n // use directory junctions if possible on win32, this requires absolute paths\n yield fsSymlink(src, dest, 'junction');\n } else {\n // use relative paths otherwise which will be retained if the directory is moved\n let relative;\n try {\n relative = (_path || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src));\n } catch (err) {\n if (err.code !== 'ENOENT') {\n throw err;\n }\n relative = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src);\n }\n // When path.relative returns an empty string for the current directory, we should instead use\n // '.', which is a valid fs.symlink target.\n yield fsSymlink(relative || '.', dest);\n }\n });\n\n return function symlink(_x24, _x25) {\n return _ref26.apply(this, arguments);\n };\n})();\n\nlet walk = exports.walk = (() => {\n var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) {\n let files = [];\n\n let filenames = yield readdir(dir);\n if (ignoreBasenames.size) {\n filenames = filenames.filter(function (name) {\n return !ignoreBasenames.has(name);\n });\n }\n\n for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) {\n var _ref28;\n\n if (_isArray14) {\n if (_i14 >= _iterator14.length) break;\n _ref28 = _iterator14[_i14++];\n } else {\n _i14 = _iterator14.next();\n if (_i14.done) break;\n _ref28 = _i14.value;\n }\n\n const name = _ref28;\n\n const relative = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name;\n const loc = (_path || _load_path()).default.join(dir, name);\n const stat = yield lstat(loc);\n\n files.push({\n relative,\n basename: name,\n absolute: loc,\n mtime: +stat.mtime\n });\n\n if (stat.isDirectory()) {\n files = files.concat((yield walk(loc, relative, ignoreBasenames)));\n }\n }\n\n return files;\n });\n\n return function walk(_x26, _x27) {\n return _ref27.apply(this, arguments);\n };\n})();\n\nlet getFileSizeOnDisk = exports.getFileSizeOnDisk = (() => {\n var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {\n const stat = yield lstat(loc);\n const size = stat.size,\n blockSize = stat.blksize;\n\n\n return Math.ceil(size / blockSize) * blockSize;\n });\n\n return function getFileSizeOnDisk(_x28) {\n return _ref29.apply(this, arguments);\n };\n})();\n\nlet getEolFromFile = (() => {\n var _ref30 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path) {\n if (!(yield exists(path))) {\n return undefined;\n }\n\n const buffer = yield readFileBuffer(path);\n\n for (let i = 0; i < buffer.length; ++i) {\n if (buffer[i] === cr) {\n return '\\r\\n';\n }\n if (buffer[i] === lf) {\n return '\\n';\n }\n }\n return undefined;\n });\n\n return function getEolFromFile(_x29) {\n return _ref30.apply(this, arguments);\n };\n})();\n\nlet writeFilePreservingEol = exports.writeFilePreservingEol = (() => {\n var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path, data) {\n const eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL;\n if (eol !== '\\n') {\n data = data.replace(/\\n/g, eol);\n }\n yield writeFile(path, data);\n });\n\n return function writeFilePreservingEol(_x30, _x31) {\n return _ref31.apply(this, arguments);\n };\n})();\n\nlet hardlinksWork = exports.hardlinksWork = (() => {\n var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) {\n const filename = 'test-file' + Math.random();\n const file = (_path || _load_path()).default.join(dir, filename);\n const fileLink = (_path || _load_path()).default.join(dir, filename + '-link');\n try {\n yield writeFile(file, 'test');\n yield link(file, fileLink);\n } catch (err) {\n return false;\n } finally {\n yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(file);\n yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(fileLink);\n }\n return true;\n });\n\n return function hardlinksWork(_x32) {\n return _ref32.apply(this, arguments);\n };\n})();\n\n// not a strict polyfill for Node's fs.mkdtemp\n\n\nlet makeTempDir = exports.makeTempDir = (() => {\n var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) {\n const dir = (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`);\n yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir);\n yield mkdirp(dir);\n return dir;\n });\n\n return function makeTempDir(_x33) {\n return _ref33.apply(this, arguments);\n };\n})();\n\nlet readFirstAvailableStream = exports.readFirstAvailableStream = (() => {\n var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) {\n let stream;\n const triedPaths = [];\n for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) {\n var _ref35;\n\n if (_isArray15) {\n if (_i15 >= _iterator15.length) break;\n _ref35 = _iterator15[_i15++];\n } else {\n _i15 = _iterator15.next();\n if (_i15.done) break;\n _ref35 = _i15.value;\n }\n\n const tarballPath = _ref35;\n\n if (tarballPath) {\n try {\n const fd = yield open(tarballPath, 'r');\n stream = (_fs || _load_fs()).default.createReadStream('', { fd });\n break;\n } catch (err) {\n // Try the next one\n triedPaths.push(tarballPath);\n }\n }\n }\n return { stream, triedPaths };\n });\n\n return function readFirstAvailableStream(_x34) {\n return _ref34.apply(this, arguments);\n };\n})();\n\nlet getFirstSuitableFolder = exports.getFirstSuitableFolder = (() => {\n var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths, mode = constants.W_OK | constants.X_OK) {\n const result = {\n skipped: [],\n folder: null\n };\n\n for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) {\n var _ref37;\n\n if (_isArray16) {\n if (_i16 >= _iterator16.length) break;\n _ref37 = _iterator16[_i16++];\n } else {\n _i16 = _iterator16.next();\n if (_i16.done) break;\n _ref37 = _i16.value;\n }\n\n const folder = _ref37;\n\n try {\n yield mkdirp(folder);\n yield access(folder, mode);\n\n result.folder = folder;\n\n return result;\n } catch (error) {\n result.skipped.push({\n error,\n folder\n });\n }\n }\n return result;\n });\n\n return function getFirstSuitableFolder(_x35) {\n return _ref36.apply(this, arguments);\n };\n})();\n\nexports.copy = copy;\nexports.readFile = readFile;\nexports.readFileRaw = readFileRaw;\nexports.normalizeOS = normalizeOS;\n\nvar _fs;\n\nfunction _load_fs() {\n return _fs = _interopRequireDefault(require('fs'));\n}\n\nvar _glob;\n\nfunction _load_glob() {\n return _glob = _interopRequireDefault(require('glob'));\n}\n\nvar _os;\n\nfunction _load_os() {\n return _os = _interopRequireDefault(require('os'));\n}\n\nvar _path;\n\nfunction _load_path() {\n return _path = _interopRequireDefault(require('path'));\n}\n\nvar _blockingQueue;\n\nfunction _load_blockingQueue() {\n return _blockingQueue = _interopRequireDefault(require('./blocking-queue.js'));\n}\n\nvar _promise;\n\nfunction _load_promise() {\n return _promise = _interopRequireWildcard(require('./promise.js'));\n}\n\nvar _promise2;\n\nfunction _load_promise2() {\n return _promise2 = require('./promise.js');\n}\n\nvar _map;\n\nfunction _load_map() {\n return _map = _interopRequireDefault(require('./map.js'));\n}\n\nvar _fsNormalized;\n\nfunction _load_fsNormalized() {\n return _fsNormalized = require('./fs-normalized.js');\n}\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst constants = exports.constants = typeof (_fs || _load_fs()).default.constants !== 'undefined' ? (_fs || _load_fs()).default.constants : {\n R_OK: (_fs || _load_fs()).default.R_OK,\n W_OK: (_fs || _load_fs()).default.W_OK,\n X_OK: (_fs || _load_fs()).default.X_OK\n};\n\nconst lockQueue = exports.lockQueue = new (_blockingQueue || _load_blockingQueue()).default('fs lock');\n\nconst readFileBuffer = exports.readFileBuffer = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readFile);\nconst open = exports.open = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.open);\nconst writeFile = exports.writeFile = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.writeFile);\nconst readlink = exports.readlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readlink);\nconst realpath = exports.realpath = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.realpath);\nconst readdir = exports.readdir = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readdir);\nconst rename = exports.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename);\nconst access = exports.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access);\nconst stat = exports.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat);\nconst mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(require('mkdirp'));\nconst exists = exports.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true);\nconst lstat = exports.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat);\nconst chmod = exports.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod);\nconst link = exports.link = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.link);\nconst glob = exports.glob = (0, (_promise2 || _load_promise2()).promisify)((_glob || _load_glob()).default);\nexports.unlink = (_fsNormalized || _load_fsNormalized()).unlink;\n\n// fs.copyFile uses the native file copying instructions on the system, performing much better\n// than any JS-based solution and consumes fewer resources. Repeated testing to fine tune the\n// concurrency level revealed 128 as the sweet spot on a quad-core, 16 CPU Intel system with SSD.\n\nconst CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4;\n\nconst fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink);\nconst invariant = require('invariant');\nconst stripBOM = require('strip-bom');\n\nconst noop = () => {};\n\nfunction copy(src, dest, reporter) {\n return copyBulk([{ src, dest }], reporter);\n}\n\nfunction _readFile(loc, encoding) {\n return new Promise((resolve, reject) => {\n (_fs || _load_fs()).default.readFile(loc, encoding, function (err, content) {\n if (err) {\n reject(err);\n } else {\n resolve(content);\n }\n });\n });\n}\n\nfunction readFile(loc) {\n return _readFile(loc, 'utf8').then(normalizeOS);\n}\n\nfunction readFileRaw(loc) {\n return _readFile(loc, 'binary');\n}\n\nfunction normalizeOS(body) {\n return body.replace(/\\r\\n/g, '\\n');\n}\n\nconst cr = '\\r'.charCodeAt(0);\nconst lf = '\\n'.charCodeAt(0);"},{"id":6,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\constants.js","name":"./src/constants.js","index":203,"index2":204,"size":4863,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","issuerId":12,"issuerName":"./src/lockfile/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":12,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","module":"./src/lockfile/index.js","moduleName":"./src/lockfile/index.js","type":"cjs require","userRequest":"../constants.js","loc":"63:22-48"},{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"../../constants.js","loc":"190:46-75"},{"moduleId":40,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\child.js","module":"./src/util/child.js","moduleName":"./src/util/child.js","type":"cjs require","userRequest":"../constants.js","loc":"15:46-72"},{"moduleId":52,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\npm-registry.js","module":"./src/registries/npm-registry.js","moduleName":"./src/registries/npm-registry.js","type":"cjs require","userRequest":"../constants.js","loc":"23:22-48"},{"moduleId":74,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\parse.js","module":"./src/lockfile/parse.js","moduleName":"./src/lockfile/parse.js","type":"cjs require","userRequest":"../constants.js","loc":"33:22-48"},{"moduleId":86,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\global.js","module":"./src/cli/commands/global.js","moduleName":"./src/cli/commands/global.js","type":"cjs require","userRequest":"../../constants.js","loc":"350:22-51"},{"moduleId":88,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-request.js","module":"./src/package-request.js","moduleName":"./src/package-request.js","type":"cjs require","userRequest":"./constants.js","loc":"64:46-71"},{"moduleId":92,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\execute-lifecycle-script.js","module":"./src/util/execute-lifecycle-script.js","moduleName":"./src/util/execute-lifecycle-script.js","type":"cjs require","userRequest":"../constants.js","loc":"338:46-72"},{"moduleId":114,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","module":"./src/config.js","moduleName":"./src/config.js","type":"cjs require","userRequest":"./constants.js","loc":"54:46-71"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"../../constants.js","loc":"87:46-75"},{"moduleId":118,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\base-fetcher.js","module":"./src/fetchers/base-fetcher.js","moduleName":"./src/fetchers/base-fetcher.js","type":"cjs require","userRequest":"../constants.js","loc":"22:46-72"},{"moduleId":145,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\stringify.js","module":"./src/lockfile/stringify.js","moduleName":"./src/lockfile/stringify.js","type":"cjs require","userRequest":"../constants.js","loc":"17:22-48"},{"moduleId":150,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\integrity-checker.js","module":"./src/integrity-checker.js","moduleName":"./src/integrity-checker.js","type":"cjs require","userRequest":"./constants.js","loc":"23:46-71"},{"moduleId":152,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-linker.js","module":"./src/package-linker.js","moduleName":"./src/package-linker.js","type":"cjs require","userRequest":"./constants.js","loc":"44:46-71"},{"moduleId":158,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\registries\\npm-resolver.js","module":"./src/resolvers/registries/npm-resolver.js","moduleName":"./src/resolvers/registries/npm-resolver.js","type":"cjs require","userRequest":"../../constants.js","loc":"52:22-51"},{"moduleId":238,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\index.js","module":"./src/cli/commands/index.js","moduleName":"./src/cli/commands/index.js","type":"cjs require","userRequest":"../../constants.js","loc":"10:46-75"},{"moduleId":249,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\autoclean.js","module":"./src/cli/commands/autoclean.js","moduleName":"./src/cli/commands/autoclean.js","type":"cjs require","userRequest":"../../constants.js","loc":"208:22-51"},{"moduleId":253,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\remove.js","module":"./src/cli/commands/remove.js","moduleName":"./src/cli/commands/remove.js","type":"cjs require","userRequest":"../../constants.js","loc":"194:46-75"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"../constants.js","loc":"29:46-72"},{"moduleId":266,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\color-for-versions.js","module":"./src/util/color-for-versions.js","moduleName":"./src/util/color-for-versions.js","type":"cjs require","userRequest":"../constants.js","loc":"32:22-48"},{"moduleId":272,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\request-manager.js","module":"./src/util/request-manager.js","moduleName":"./src/util/request-manager.js","type":"cjs require","userRequest":"../constants.js","loc":"52:46-72"},{"moduleId":367,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\help.js","module":"./src/cli/commands/help.js","moduleName":"./src/cli/commands/help.js","type":"cjs require","userRequest":"../../constants.js","loc":"19:46-75"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"../../constants.js","loc":"163:22-51"},{"moduleId":373,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\node.js","module":"./src/cli/commands/node.js","moduleName":"./src/cli/commands/node.js","type":"cjs require","userRequest":"../../constants","loc":"43:22-48"},{"moduleId":381,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\why.js","module":"./src/cli/commands/why.js","moduleName":"./src/cli/commands/why.js","type":"cjs require","userRequest":"../../constants.js","loc":"281:22-51"},{"moduleId":382,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspace.js","module":"./src/cli/commands/workspace.js","moduleName":"./src/cli/commands/workspace.js","type":"cjs require","userRequest":"../../constants","loc":"80:22-48"},{"moduleId":383,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspaces.js","module":"./src/cli/commands/workspaces.js","moduleName":"./src/cli/commands/workspaces.js","type":"cjs require","userRequest":"../../constants.js","loc":"125:22-51"},{"moduleId":384,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","module":"./src/cli/index.js","moduleName":"./src/cli/index.js","type":"cjs require","userRequest":"../constants.js","loc":"140:46-72"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"../constants.js","loc":"40:46-72"},{"moduleId":393,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\yarn-registry.js","module":"./src/registries/yarn-registry.js","moduleName":"./src/registries/yarn-registry.js","type":"cjs require","userRequest":"../constants.js","loc":"17:22-48"},{"moduleId":414,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\fix.js","module":"./src/util/normalize-manifest/fix.js","moduleName":"./src/util/normalize-manifest/fix.js","type":"cjs require","userRequest":"../../constants","loc":"16:22-48"},{"moduleId":417,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\resolve-relative.js","module":"./src/util/normalize-manifest/resolve-relative.js","moduleName":"./src/util/normalize-manifest/resolve-relative.js","type":"cjs require","userRequest":"../../constants.js","loc":"86:22-51"},{"moduleId":420,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\rc.js","module":"./src/util/rc.js","moduleName":"./src/util/rc.js","type":"cjs require","userRequest":"../constants","loc":"23:22-45"}],"usedExports":true,"providedExports":null,"depth":1,"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getPathKey = getPathKey;\nconst os = require('os');\nconst path = require('path');\nconst userHome = require('./util/user-home-dir').default;\n\nvar _require = require('./util/user-dirs');\n\nconst getCacheDir = _require.getCacheDir,\n getConfigDir = _require.getConfigDir,\n getDataDir = _require.getDataDir;\n\nconst isWebpackBundle = require('is-webpack-bundle');\n\nconst DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies'];\nconst RESOLUTIONS = exports.RESOLUTIONS = 'resolutions';\nconst MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS, ...DEPENDENCY_TYPES];\n\nconst SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0';\n\nconst YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com';\n\nconst YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/';\nconst YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh';\nconst YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi';\n\nconst SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version';\n\n// cache version, bump whenever we make backwards incompatible changes\nconst CACHE_VERSION = exports.CACHE_VERSION = 1;\n\n// lockfile version, bump whenever we make backwards incompatible changes\nconst LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1;\n\n// max amount of network requests to perform concurrently\nconst NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8;\n\n// HTTP timeout used when downloading packages\nconst NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds\n\n// max amount of child processes to execute concurrently\nconst CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5;\n\nconst REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid'];\n\nfunction getPreferredCacheDirectories() {\n const preferredCacheDirectories = [getCacheDir()];\n\n if (process.getuid) {\n // $FlowFixMe: process.getuid exists, dammit\n preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`));\n }\n\n preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`));\n\n return preferredCacheDirectories;\n}\n\nconst PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories();\nconst CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir();\nconst DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir();\nconst LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link');\nconst GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global');\n\nconst NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath;\nconst YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath();\n\n// Webpack needs to be configured with node.__dirname/__filename = false\nfunction getYarnBinPath() {\n if (isWebpackBundle) {\n return __filename;\n } else {\n return path.join(__dirname, '..', 'bin', 'yarn.js');\n }\n}\n\nconst NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules';\nconst NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json';\n\nconst POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`;\nconst FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn');\n\nconst META_FOLDER = exports.META_FOLDER = '.yarn-meta';\nconst INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity';\nconst LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock';\nconst METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json';\nconst TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz';\nconst CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean';\n\nconst NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json';\n\nconst DEFAULT_INDENT = exports.DEFAULT_INDENT = ' ';\nconst SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997;\nconst SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance';\n\nconst ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env);\n\nfunction getPathKey(platform, env) {\n let pathKey = 'PATH';\n\n // windows calls its path \"Path\" usually, but this is not guaranteed.\n if (platform === 'win32') {\n pathKey = 'Path';\n\n for (const key in env) {\n if (key.toLowerCase() === 'path') {\n pathKey = key;\n }\n }\n }\n\n return pathKey;\n}\n\nconst VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = {\n major: 'red',\n premajor: 'red',\n minor: 'yellow',\n preminor: 'yellow',\n patch: 'green',\n prepatch: 'green',\n prerelease: 'red',\n unchanged: 'white',\n unknown: 'red'\n};"},{"id":7,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\invariant\\invariant.js","name":"./~/invariant/invariant.js","index":76,"index2":75,"size":1542,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","issuerId":12,"issuerName":"./src/lockfile/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":5,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\fs.js","module":"./src/util/fs.js","moduleName":"./src/util/fs.js","type":"cjs require","userRequest":"invariant","loc":"1149:18-38"},{"moduleId":12,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","module":"./src/lockfile/index.js","moduleName":"./src/lockfile/index.js","type":"cjs require","userRequest":"invariant","loc":"76:18-38"},{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"invariant","loc":"242:18-38"},{"moduleId":74,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\parse.js","module":"./src/lockfile/parse.js","moduleName":"./src/lockfile/parse.js","type":"cjs require","userRequest":"invariant","loc":"21:45-65"},{"moduleId":88,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-request.js","module":"./src/package-request.js","moduleName":"./src/package-request.js","type":"cjs require","userRequest":"invariant","loc":"22:45-65"},{"moduleId":114,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","module":"./src/config.js","moduleName":"./src/config.js","type":"cjs require","userRequest":"invariant","loc":"93:18-38"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"invariant","loc":"99:45-65"},{"moduleId":150,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\integrity-checker.js","module":"./src/integrity-checker.js","moduleName":"./src/integrity-checker.js","type":"cjs require","userRequest":"invariant","loc":"54:18-38"},{"moduleId":152,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-linker.js","module":"./src/package-linker.js","moduleName":"./src/package-linker.js","type":"cjs require","userRequest":"invariant","loc":"87:18-38"},{"moduleId":156,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\file-resolver.js","module":"./src/resolvers/exotics/file-resolver.js","moduleName":"./src/resolvers/exotics/file-resolver.js","type":"cjs require","userRequest":"invariant","loc":"23:45-65"},{"moduleId":158,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\registries\\npm-resolver.js","module":"./src/resolvers/registries/npm-resolver.js","moduleName":"./src/resolvers/registries/npm-resolver.js","type":"cjs require","userRequest":"invariant","loc":"67:18-38"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"invariant","loc":"22:45-65"},{"moduleId":251,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\link.js","module":"./src/cli/commands/link.js","moduleName":"./src/cli/commands/link.js","type":"cjs require","userRequest":"invariant","loc":"145:18-38"},{"moduleId":252,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\list.js","module":"./src/cli/commands/list.js","moduleName":"./src/cli/commands/list.js","type":"cjs require","userRequest":"invariant","loc":"268:18-38"},{"moduleId":256,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\version.js","module":"./src/cli/commands/version.js","moduleName":"./src/cli/commands/version.js","type":"cjs require","userRequest":"invariant","loc":"237:18-38"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"invariant","loc":"67:18-38"},{"moduleId":258,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-compatibility.js","module":"./src/package-compatibility.js","moduleName":"./src/package-compatibility.js","type":"cjs require","userRequest":"invariant","loc":"42:18-38"},{"moduleId":260,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-resolver.js","module":"./src/package-resolver.js","moduleName":"./src/package-resolver.js","type":"cjs require","userRequest":"invariant","loc":"75:18-38"},{"moduleId":272,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\request-manager.js","module":"./src/util/request-manager.js","moduleName":"./src/util/request-manager.js","type":"cjs require","userRequest":"invariant","loc":"28:45-65"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"invariant","loc":"178:18-38"},{"moduleId":371,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\licenses.js","module":"./src/cli/commands/licenses.js","moduleName":"./src/cli/commands/licenses.js","type":"cjs require","userRequest":"invariant","loc":"185:18-38"},{"moduleId":376,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","module":"./src/cli/commands/publish.js","moduleName":"./src/cli/commands/publish.js","type":"cjs require","userRequest":"invariant","loc":"216:18-38"},{"moduleId":381,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\why.js","module":"./src/cli/commands/why.js","moduleName":"./src/cli/commands/why.js","type":"cjs require","userRequest":"invariant","loc":"308:18-38"},{"moduleId":382,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspace.js","module":"./src/cli/commands/workspace.js","moduleName":"./src/cli/commands/workspace.js","type":"cjs require","userRequest":"invariant","loc":"87:18-38"},{"moduleId":383,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspaces.js","module":"./src/cli/commands/workspaces.js","moduleName":"./src/cli/commands/workspaces.js","type":"cjs require","userRequest":"invariant","loc":"130:18-38"},{"moduleId":384,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","module":"./src/cli/index.js","moduleName":"./src/cli/index.js","type":"cjs require","userRequest":"invariant","loc":"92:45-65"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"invariant","loc":"82:18-38"},{"moduleId":390,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-hoister.js","module":"./src/package-hoister.js","moduleName":"./src/package-hoister.js","type":"cjs require","userRequest":"invariant","loc":"40:18-38"},{"moduleId":391,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-install-scripts.js","module":"./src/package-install-scripts.js","moduleName":"./src/package-install-scripts.js","type":"cjs require","userRequest":"invariant","loc":"55:18-38"},{"moduleId":402,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\contextual\\workspace-resolver.js","module":"./src/resolvers/contextual/workspace-resolver.js","moduleName":"./src/resolvers/contextual/workspace-resolver.js","type":"cjs require","userRequest":"invariant","loc":"33:18-38"},{"moduleId":406,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\tarball-resolver.js","module":"./src/resolvers/exotics/tarball-resolver.js","moduleName":"./src/resolvers/exotics/tarball-resolver.js","type":"cjs require","userRequest":"invariant","loc":"59:18-38"},{"moduleId":417,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\resolve-relative.js","module":"./src/util/normalize-manifest/resolve-relative.js","moduleName":"./src/util/normalize-manifest/resolve-relative.js","type":"cjs require","userRequest":"invariant","loc":"104:45-65"}],"usedExports":true,"providedExports":null,"depth":1,"source":"/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar NODE_ENV = process.env.NODE_ENV;\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n"},{"id":8,"identifier":"external \"crypto\"","name":"external \"crypto\"","index":181,"index2":174,"size":42,"cacheable":false,"built":false,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","issuerId":376,"issuerName":"./src/cli/commands/publish.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":19,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\utils.js","module":"./~/sshpk/lib/utils.js","moduleName":"./~/sshpk/lib/utils.js","type":"cjs require","userRequest":"crypto","loc":"18:13-30"},{"moduleId":22,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\key.js","module":"./~/sshpk/lib/key.js","moduleName":"./~/sshpk/lib/key.js","type":"cjs require","userRequest":"crypto","loc":"7:13-30"},{"moduleId":23,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\private-key.js","module":"./~/sshpk/lib/private-key.js","moduleName":"./~/sshpk/lib/private-key.js","type":"cjs require","userRequest":"crypto","loc":"7:13-30"},{"moduleId":49,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\signature.js","module":"./~/sshpk/lib/signature.js","moduleName":"./~/sshpk/lib/signature.js","type":"cjs require","userRequest":"crypto","loc":"7:13-30"},{"moduleId":57,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pem.js","module":"./~/sshpk/lib/formats/pem.js","moduleName":"./~/sshpk/lib/formats/pem.js","type":"cjs require","userRequest":"crypto","loc":"10:13-30"},{"moduleId":91,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\crypto.js","module":"./src/util/crypto.js","moduleName":"./src/util/crypto.js","type":"cjs require","userRequest":"crypto","loc":"7:15-32"},{"moduleId":109,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\certificate.js","module":"./~/sshpk/lib/certificate.js","moduleName":"./~/sshpk/lib/certificate.js","type":"cjs require","userRequest":"crypto","loc":"7:13-30"},{"moduleId":110,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\fingerprint.js","module":"./~/sshpk/lib/fingerprint.js","moduleName":"./~/sshpk/lib/fingerprint.js","type":"cjs require","userRequest":"crypto","loc":"7:13-30"},{"moduleId":112,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\identity.js","module":"./~/sshpk/lib/identity.js","moduleName":"./~/sshpk/lib/identity.js","type":"cjs require","userRequest":"crypto","loc":"7:13-30"},{"moduleId":130,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\jodid25519\\lib\\core.js","module":"./~/jodid25519/lib/core.js","moduleName":"./~/jodid25519/lib/core.js","type":"cjs require","userRequest":"crypto","loc":"17:13-30"},{"moduleId":136,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh-private.js","module":"./~/sshpk/lib/formats/ssh-private.js","moduleName":"./~/sshpk/lib/formats/ssh-private.js","type":"cjs require","userRequest":"crypto","loc":"13:13-30"},{"moduleId":139,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tweetnacl\\nacl-fast.js","module":"./~/tweetnacl/nacl-fast.js","moduleName":"./~/tweetnacl/nacl-fast.js","type":"cjs require","userRequest":"crypto","loc":"2377:13-30"},{"moduleId":229,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\lib\\helpers.js","module":"./~/request/lib/helpers.js","moduleName":"./~/request/lib/helpers.js","type":"cjs require","userRequest":"crypto","loc":"4:13-30"},{"moduleId":281,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\ecc-jsbn\\index.js","module":"./~/ecc-jsbn/index.js","moduleName":"./~/ecc-jsbn/index.js","type":"cjs require","userRequest":"crypto","loc":"1:13-30"},{"moduleId":312,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\node_modules\\uuid\\lib\\rng.js","module":"./~/request/~/uuid/lib/rng.js","moduleName":"./~/request/~/uuid/lib/rng.js","type":"cjs require","userRequest":"crypto","loc":"4:9-26"},{"moduleId":319,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\dhe.js","module":"./~/sshpk/lib/dhe.js","moduleName":"./~/sshpk/lib/dhe.js","type":"cjs require","userRequest":"crypto","loc":"10:13-30"},{"moduleId":333,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\uuid\\lib\\rng.js","module":"./~/uuid/lib/rng.js","moduleName":"./~/uuid/lib/rng.js","type":"cjs require","userRequest":"crypto","loc":"4:9-26"},{"moduleId":356,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\aws-sign2\\index.js","module":"./~/aws-sign2/index.js","moduleName":"./~/aws-sign2/index.js","type":"cjs require","userRequest":"crypto","loc":"22:13-30"},{"moduleId":357,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\aws4\\aws4.js","module":"./~/aws4/aws4.js","moduleName":"./~/aws4/aws4.js","type":"cjs require","userRequest":"crypto","loc":"4:13-30"},{"moduleId":376,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","module":"./src/cli/commands/publish.js","moduleName":"./src/cli/commands/publish.js","type":"cjs require","userRequest":"crypto","loc":"218:15-32"},{"moduleId":532,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\signer.js","module":"./~/http-signature/lib/signer.js","moduleName":"./~/http-signature/lib/signer.js","type":"cjs require","userRequest":"crypto","loc":"4:13-30"},{"moduleId":533,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\verify.js","module":"./~/http-signature/lib/verify.js","moduleName":"./~/http-signature/lib/verify.js","type":"cjs require","userRequest":"crypto","loc":"4:13-30"},{"moduleId":566,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\jodid25519\\lib\\eddsa.js","module":"./~/jodid25519/lib/eddsa.js","moduleName":"./~/jodid25519/lib/eddsa.js","type":"cjs require","userRequest":"crypto","loc":"21:13-30"},{"moduleId":590,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\oauth-sign\\index.js","module":"./~/oauth-sign/index.js","moduleName":"./~/oauth-sign/index.js","type":"cjs require","userRequest":"crypto","loc":"1:13-30"},{"moduleId":622,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\lib\\hawk.js","module":"./~/request/lib/hawk.js","moduleName":"./~/request/lib/hawk.js","type":"cjs require","userRequest":"crypto","loc":"3:13-30"},{"moduleId":624,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\lib\\oauth.js","module":"./~/request/lib/oauth.js","moduleName":"./~/request/lib/oauth.js","type":"cjs require","userRequest":"crypto","loc":"8:13-30"},{"moduleId":654,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\openssh-cert.js","module":"./~/sshpk/lib/formats/openssh-cert.js","moduleName":"./~/sshpk/lib/formats/openssh-cert.js","type":"cjs require","userRequest":"crypto","loc":"17:13-30"},{"moduleId":664,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tmp\\lib\\tmp.js","module":"./~/tmp/lib/tmp.js","moduleName":"./~/tmp/lib/tmp.js","type":"cjs require","userRequest":"crypto","loc":"15:11-28"}],"usedExports":true,"providedExports":null,"depth":3},{"id":9,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\assert-plus\\assert.js","name":"./~/assert-plus/assert.js","index":462,"index2":448,"size":5454,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\verify.js","issuerId":533,"issuerName":"./~/http-signature/lib/verify.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":19,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\utils.js","module":"./~/sshpk/lib/utils.js","moduleName":"./~/sshpk/lib/utils.js","type":"cjs require","userRequest":"assert-plus","loc":"16:13-35"},{"moduleId":22,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\key.js","module":"./~/sshpk/lib/key.js","moduleName":"./~/sshpk/lib/key.js","type":"cjs require","userRequest":"assert-plus","loc":"5:13-35"},{"moduleId":23,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\private-key.js","module":"./~/sshpk/lib/private-key.js","moduleName":"./~/sshpk/lib/private-key.js","type":"cjs require","userRequest":"assert-plus","loc":"5:13-35"},{"moduleId":48,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\errors.js","module":"./~/sshpk/lib/errors.js","moduleName":"./~/sshpk/lib/errors.js","type":"cjs require","userRequest":"assert-plus","loc":"3:13-35"},{"moduleId":49,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\signature.js","module":"./~/sshpk/lib/signature.js","moduleName":"./~/sshpk/lib/signature.js","type":"cjs require","userRequest":"assert-plus","loc":"5:13-35"},{"moduleId":57,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pem.js","module":"./~/sshpk/lib/formats/pem.js","moduleName":"./~/sshpk/lib/formats/pem.js","type":"cjs require","userRequest":"assert-plus","loc":"8:13-35"},{"moduleId":72,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\rfc4253.js","module":"./~/sshpk/lib/formats/rfc4253.js","moduleName":"./~/sshpk/lib/formats/rfc4253.js","type":"cjs require","userRequest":"assert-plus","loc":"16:13-35"},{"moduleId":109,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\certificate.js","module":"./~/sshpk/lib/certificate.js","moduleName":"./~/sshpk/lib/certificate.js","type":"cjs require","userRequest":"assert-plus","loc":"5:13-35"},{"moduleId":110,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\fingerprint.js","module":"./~/sshpk/lib/fingerprint.js","moduleName":"./~/sshpk/lib/fingerprint.js","type":"cjs require","userRequest":"assert-plus","loc":"5:13-35"},{"moduleId":111,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs8.js","module":"./~/sshpk/lib/formats/pkcs8.js","moduleName":"./~/sshpk/lib/formats/pkcs8.js","type":"cjs require","userRequest":"assert-plus","loc":"13:13-35"},{"moduleId":112,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\identity.js","module":"./~/sshpk/lib/identity.js","moduleName":"./~/sshpk/lib/identity.js","type":"cjs require","userRequest":"assert-plus","loc":"5:13-35"},{"moduleId":125,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\utils.js","module":"./~/http-signature/lib/utils.js","moduleName":"./~/http-signature/lib/utils.js","type":"cjs require","userRequest":"assert-plus","loc":"3:13-35"},{"moduleId":136,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh-private.js","module":"./~/sshpk/lib/formats/ssh-private.js","moduleName":"./~/sshpk/lib/formats/ssh-private.js","type":"cjs require","userRequest":"assert-plus","loc":"9:13-35"},{"moduleId":137,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\ssh-buffer.js","module":"./~/sshpk/lib/ssh-buffer.js","moduleName":"./~/sshpk/lib/ssh-buffer.js","type":"cjs require","userRequest":"assert-plus","loc":"5:13-35"},{"moduleId":232,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs1.js","module":"./~/sshpk/lib/formats/pkcs1.js","moduleName":"./~/sshpk/lib/formats/pkcs1.js","type":"cjs require","userRequest":"assert-plus","loc":"10:13-35"},{"moduleId":319,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\dhe.js","module":"./~/sshpk/lib/dhe.js","moduleName":"./~/sshpk/lib/dhe.js","type":"cjs require","userRequest":"assert-plus","loc":"9:13-35"},{"moduleId":320,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\ed-compat.js","module":"./~/sshpk/lib/ed-compat.js","moduleName":"./~/sshpk/lib/ed-compat.js","type":"cjs require","userRequest":"assert-plus","loc":"11:13-35"},{"moduleId":321,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\auto.js","module":"./~/sshpk/lib/formats/auto.js","moduleName":"./~/sshpk/lib/formats/auto.js","type":"cjs require","userRequest":"assert-plus","loc":"8:13-35"},{"moduleId":322,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh.js","module":"./~/sshpk/lib/formats/ssh.js","moduleName":"./~/sshpk/lib/formats/ssh.js","type":"cjs require","userRequest":"assert-plus","loc":"8:13-35"},{"moduleId":323,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509.js","module":"./~/sshpk/lib/formats/x509.js","moduleName":"./~/sshpk/lib/formats/x509.js","type":"cjs require","userRequest":"assert-plus","loc":"11:13-35"},{"moduleId":531,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\parser.js","module":"./~/http-signature/lib/parser.js","moduleName":"./~/http-signature/lib/parser.js","type":"cjs require","userRequest":"assert-plus","loc":"3:13-35"},{"moduleId":532,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\signer.js","module":"./~/http-signature/lib/signer.js","moduleName":"./~/http-signature/lib/signer.js","type":"cjs require","userRequest":"assert-plus","loc":"3:13-35"},{"moduleId":533,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\http-signature\\lib\\verify.js","module":"./~/http-signature/lib/verify.js","moduleName":"./~/http-signature/lib/verify.js","type":"cjs require","userRequest":"assert-plus","loc":"3:13-35"},{"moduleId":570,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\jsprim\\lib\\jsprim.js","module":"./~/jsprim/lib/jsprim.js","moduleName":"./~/jsprim/lib/jsprim.js","type":"cjs require","userRequest":"assert-plus","loc":"5:17-39"},{"moduleId":654,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\openssh-cert.js","module":"./~/sshpk/lib/formats/openssh-cert.js","moduleName":"./~/sshpk/lib/formats/openssh-cert.js","type":"cjs require","userRequest":"assert-plus","loc":"15:13-35"},{"moduleId":655,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509-pem.js","module":"./~/sshpk/lib/formats/x509-pem.js","moduleName":"./~/sshpk/lib/formats/x509-pem.js","type":"cjs require","userRequest":"assert-plus","loc":"12:13-35"}],"usedExports":true,"providedExports":null,"depth":7,"source":"// Copyright (c) 2012, Mark Cavage. All rights reserved.\n// Copyright 2015 Joyent, Inc.\n\nvar assert = require('assert');\nvar Stream = require('stream').Stream;\nvar util = require('util');\n\n\n///--- Globals\n\n/* JSSTYLED */\nvar UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;\n\n\n///--- Internal\n\nfunction _capitalize(str) {\n return (str.charAt(0).toUpperCase() + str.slice(1));\n}\n\nfunction _toss(name, expected, oper, arg, actual) {\n throw new assert.AssertionError({\n message: util.format('%s (%s) is required', name, expected),\n actual: (actual === undefined) ? typeof (arg) : actual(arg),\n expected: expected,\n operator: oper || '===',\n stackStartFunction: _toss.caller\n });\n}\n\nfunction _getClass(arg) {\n return (Object.prototype.toString.call(arg).slice(8, -1));\n}\n\nfunction noop() {\n // Why even bother with asserts?\n}\n\n\n///--- Exports\n\nvar types = {\n bool: {\n check: function (arg) { return typeof (arg) === 'boolean'; }\n },\n func: {\n check: function (arg) { return typeof (arg) === 'function'; }\n },\n string: {\n check: function (arg) { return typeof (arg) === 'string'; }\n },\n object: {\n check: function (arg) {\n return typeof (arg) === 'object' && arg !== null;\n }\n },\n number: {\n check: function (arg) {\n return typeof (arg) === 'number' && !isNaN(arg);\n }\n },\n finite: {\n check: function (arg) {\n return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);\n }\n },\n buffer: {\n check: function (arg) { return Buffer.isBuffer(arg); },\n operator: 'Buffer.isBuffer'\n },\n array: {\n check: function (arg) { return Array.isArray(arg); },\n operator: 'Array.isArray'\n },\n stream: {\n check: function (arg) { return arg instanceof Stream; },\n operator: 'instanceof',\n actual: _getClass\n },\n date: {\n check: function (arg) { return arg instanceof Date; },\n operator: 'instanceof',\n actual: _getClass\n },\n regexp: {\n check: function (arg) { return arg instanceof RegExp; },\n operator: 'instanceof',\n actual: _getClass\n },\n uuid: {\n check: function (arg) {\n return typeof (arg) === 'string' && UUID_REGEXP.test(arg);\n },\n operator: 'isUUID'\n }\n};\n\nfunction _setExports(ndebug) {\n var keys = Object.keys(types);\n var out;\n\n /* re-export standard assert */\n if (process.env.NODE_NDEBUG) {\n out = noop;\n } else {\n out = function (arg, msg) {\n if (!arg) {\n _toss(msg, 'true', arg);\n }\n };\n }\n\n /* standard checks */\n keys.forEach(function (k) {\n if (ndebug) {\n out[k] = noop;\n return;\n }\n var type = types[k];\n out[k] = function (arg, msg) {\n if (!type.check(arg)) {\n _toss(msg, k, type.operator, arg, type.actual);\n }\n };\n });\n\n /* optional checks */\n keys.forEach(function (k) {\n var name = 'optional' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n out[name] = function (arg, msg) {\n if (arg === undefined || arg === null) {\n return;\n }\n if (!type.check(arg)) {\n _toss(msg, k, type.operator, arg, type.actual);\n }\n };\n });\n\n /* arrayOf checks */\n keys.forEach(function (k) {\n var name = 'arrayOf' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n var expected = '[' + k + ']';\n out[name] = function (arg, msg) {\n if (!Array.isArray(arg)) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n var i;\n for (i = 0; i < arg.length; i++) {\n if (!type.check(arg[i])) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n }\n };\n });\n\n /* optionalArrayOf checks */\n keys.forEach(function (k) {\n var name = 'optionalArrayOf' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n var expected = '[' + k + ']';\n out[name] = function (arg, msg) {\n if (arg === undefined || arg === null) {\n return;\n }\n if (!Array.isArray(arg)) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n var i;\n for (i = 0; i < arg.length; i++) {\n if (!type.check(arg[i])) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n }\n };\n });\n\n /* re-export built-in assertions */\n Object.keys(assert).forEach(function (k) {\n if (k === 'AssertionError') {\n out[k] = assert[k];\n return;\n }\n if (ndebug) {\n out[k] = noop;\n return;\n }\n out[k] = assert[k];\n });\n\n /* export ourselves (for unit tests _only_) */\n out._setExports = _setExports;\n\n return out;\n}\n\nmodule.exports = _setExports(process.env.NODE_NDEBUG);\n"},{"id":10,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\misc.js","name":"./src/util/misc.js","index":122,"index2":120,"size":1909,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","issuerId":12,"issuerName":"./src/lockfile/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":12,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","module":"./src/lockfile/index.js","moduleName":"./src/lockfile/index.js","type":"cjs require","userRequest":"../util/misc.js","loc":"45:17-43"},{"moduleId":41,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\_build-sub-commands.js","module":"./src/cli/commands/_build-sub-commands.js","moduleName":"./src/cli/commands/_build-sub-commands.js","type":"cjs require","userRequest":"../../util/misc.js","loc":"78:17-46"},{"moduleId":52,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\npm-registry.js","module":"./src/registries/npm-registry.js","moduleName":"./src/registries/npm-registry.js","type":"cjs require","userRequest":"../util/misc","loc":"53:17-40"},{"moduleId":90,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\git-resolver.js","module":"./src/resolvers/exotics/git-resolver.js","moduleName":"./src/resolvers/exotics/git-resolver.js","type":"cjs require","userRequest":"../../util/misc.js","loc":"22:41-70"},{"moduleId":145,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\stringify.js","module":"./src/lockfile/stringify.js","moduleName":"./src/lockfile/stringify.js","type":"cjs require","userRequest":"../util/misc.js","loc":"11:17-43"},{"moduleId":150,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\integrity-checker.js","module":"./src/integrity-checker.js","moduleName":"./src/integrity-checker.js","type":"cjs require","userRequest":"./util/misc.js","loc":"35:17-42"},{"moduleId":152,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-linker.js","module":"./src/package-linker.js","moduleName":"./src/package-linker.js","type":"cjs require","userRequest":"./util/misc.js","loc":"56:17-42"},{"moduleId":156,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\file-resolver.js","module":"./src/resolvers/exotics/file-resolver.js","moduleName":"./src/resolvers/exotics/file-resolver.js","type":"cjs require","userRequest":"../../util/misc.js","loc":"47:41-70"},{"moduleId":157,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\gist-resolver.js","module":"./src/resolvers/exotics/gist-resolver.js","moduleName":"./src/resolvers/exotics/gist-resolver.js","type":"cjs require","userRequest":"../../util/misc.js","loc":"29:41-70"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"./misc.js","loc":"94:17-37"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"../util/misc.js","loc":"53:17-43"},{"moduleId":258,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-compatibility.js","module":"./src/package-compatibility.js","moduleName":"./src/package-compatibility.js","type":"cjs require","userRequest":"./util/misc.js","loc":"25:17-42"},{"moduleId":259,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-reference.js","module":"./src/package-reference.js","moduleName":"./src/package-reference.js","type":"cjs require","userRequest":"./util/misc.js","loc":"10:17-42"},{"moduleId":264,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\link-resolver.js","module":"./src/resolvers/exotics/link-resolver.js","moduleName":"./src/resolvers/exotics/link-resolver.js","type":"cjs require","userRequest":"../../util/misc.js","loc":"23:41-70"},{"moduleId":268,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\filter.js","module":"./src/util/filter.js","moduleName":"./src/util/filter.js","type":"cjs require","userRequest":"./misc.js","loc":"14:17-37"},{"moduleId":367,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\help.js","module":"./src/cli/commands/help.js","moduleName":"./src/cli/commands/help.js","type":"cjs require","userRequest":"../../util/misc.js","loc":"25:17-46"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"../../util/misc.js","loc":"157:41-70"},{"moduleId":390,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-hoister.js","module":"./src/package-hoister.js","moduleName":"./src/package-hoister.js","type":"cjs require","userRequest":"./util/misc.js","loc":"23:17-42"},{"moduleId":392,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\base-registry.js","module":"./src/registries/base-registry.js","moduleName":"./src/registries/base-registry.js","type":"cjs require","userRequest":"../util/misc.js","loc":"22:17-43"},{"moduleId":395,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\reporters\\console\\console-reporter.js","module":"./src/reporters/console/console-reporter.js","moduleName":"./src/reporters/console/console-reporter.js","type":"cjs require","userRequest":"../../util/misc.js","loc":"40:17-46"},{"moduleId":410,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git\\git-ref-resolver.js","module":"./src/util/git/git-ref-resolver.js","moduleName":"./src/util/git/git-ref-resolver.js","type":"cjs require","userRequest":"../misc.js","loc":"17:17-38"}],"usedExports":true,"providedExports":null,"depth":1,"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sortAlpha = sortAlpha;\nexports.entries = entries;\nexports.removePrefix = removePrefix;\nexports.removeSuffix = removeSuffix;\nexports.addSuffix = addSuffix;\nexports.hyphenate = hyphenate;\nexports.camelCase = camelCase;\nexports.compareSortedArrays = compareSortedArrays;\nexports.sleep = sleep;\nconst _camelCase = require('camelcase');\n\nfunction sortAlpha(a, b) {\n // sort alphabetically in a deterministic way\n const shortLen = Math.min(a.length, b.length);\n for (let i = 0; i < shortLen; i++) {\n const aChar = a.charCodeAt(i);\n const bChar = b.charCodeAt(i);\n if (aChar !== bChar) {\n return aChar - bChar;\n }\n }\n return a.length - b.length;\n}\n\nfunction entries(obj) {\n const entries = [];\n if (obj) {\n for (const key in obj) {\n entries.push([key, obj[key]]);\n }\n }\n return entries;\n}\n\nfunction removePrefix(pattern, prefix) {\n if (pattern.startsWith(prefix)) {\n pattern = pattern.slice(prefix.length);\n }\n\n return pattern;\n}\n\nfunction removeSuffix(pattern, suffix) {\n if (pattern.endsWith(suffix)) {\n return pattern.slice(0, -suffix.length);\n }\n\n return pattern;\n}\n\nfunction addSuffix(pattern, suffix) {\n if (!pattern.endsWith(suffix)) {\n return pattern + suffix;\n }\n\n return pattern;\n}\n\nfunction hyphenate(str) {\n return str.replace(/[A-Z]/g, match => {\n return '-' + match.charAt(0).toLowerCase();\n });\n}\n\nfunction camelCase(str) {\n if (/[A-Z]/.test(str)) {\n return null;\n } else {\n return _camelCase(str);\n }\n}\n\nfunction compareSortedArrays(array1, array2) {\n if (array1.length !== array2.length) {\n return false;\n }\n for (let i = 0, len = array1.length; i < len; i++) {\n if (array1[i] !== array2[i]) {\n return false;\n }\n }\n return true;\n}\n\nfunction sleep(ms) {\n return new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n}"},{"id":11,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_wks.js","name":"./~/core-js/library/modules/_wks.js","index":47,"index2":39,"size":368,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\web.dom.iterable.js","issuerId":204,"issuerName":"./~/core-js/library/modules/web.dom.iterable.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":64,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_set-to-string-tag.js","module":"./~/core-js/library/modules/_set-to-string-tag.js","moduleName":"./~/core-js/library/modules/_set-to-string-tag.js","type":"cjs require","userRequest":"./_wks","loc":"3:10-27"},{"moduleId":94,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_classof.js","module":"./~/core-js/library/modules/_classof.js","moduleName":"./~/core-js/library/modules/_classof.js","type":"cjs require","userRequest":"./_wks","loc":"3:10-27"},{"moduleId":97,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_iter-define.js","module":"./~/core-js/library/modules/_iter-define.js","moduleName":"./~/core-js/library/modules/_iter-define.js","type":"cjs require","userRequest":"./_wks","loc":"11:21-38"},{"moduleId":182,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_is-array-iter.js","module":"./~/core-js/library/modules/_is-array-iter.js","moduleName":"./~/core-js/library/modules/_is-array-iter.js","type":"cjs require","userRequest":"./_wks","loc":"3:17-34"},{"moduleId":184,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_iter-create.js","module":"./~/core-js/library/modules/_iter-create.js","moduleName":"./~/core-js/library/modules/_iter-create.js","type":"cjs require","userRequest":"./_wks","loc":"8:38-55"},{"moduleId":185,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_iter-detect.js","module":"./~/core-js/library/modules/_iter-detect.js","moduleName":"./~/core-js/library/modules/_iter-detect.js","type":"cjs require","userRequest":"./_wks","loc":"1:19-36"},{"moduleId":194,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_set-species.js","module":"./~/core-js/library/modules/_set-species.js","moduleName":"./~/core-js/library/modules/_set-species.js","type":"cjs require","userRequest":"./_wks","loc":"6:18-35"},{"moduleId":195,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_species-constructor.js","module":"./~/core-js/library/modules/_species-constructor.js","moduleName":"./~/core-js/library/modules/_species-constructor.js","type":"cjs require","userRequest":"./_wks","loc":"4:16-33"},{"moduleId":199,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\core.get-iterator-method.js","module":"./~/core-js/library/modules/core.get-iterator-method.js","moduleName":"./~/core-js/library/modules/core.get-iterator-method.js","type":"cjs require","userRequest":"./_wks","loc":"2:16-33"},{"moduleId":202,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\es6.promise.js","module":"./~/core-js/library/modules/es6.promise.js","moduleName":"./~/core-js/library/modules/es6.promise.js","type":"cjs require","userRequest":"./_wks","loc":"27:49-66"},{"moduleId":204,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\web.dom.iterable.js","module":"./~/core-js/library/modules/web.dom.iterable.js","moduleName":"./~/core-js/library/modules/web.dom.iterable.js","type":"cjs require","userRequest":"./_wks","loc":"5:20-37"}],"usedExports":true,"providedExports":null,"depth":5,"source":"var store = require('./_shared')('wks')\n , uid = require('./_uid')\n , Symbol = require('./_global').Symbol\n , USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function(name){\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;"},{"id":12,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\index.js","name":"./src/lockfile/index.js","index":259,"index2":260,"size":7067,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":null,"issuerId":null,"issuerName":null,"failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"../../lockfile","loc":"136:22-47"},{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"../../lockfile","loc":"130:44-69"},{"moduleId":86,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\global.js","module":"./src/cli/commands/global.js","moduleName":"./src/cli/commands/global.js","type":"cjs require","userRequest":"../../lockfile","loc":"308:44-69"},{"moduleId":88,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-request.js","module":"./src/package-request.js","moduleName":"./src/package-request.js","type":"cjs require","userRequest":"./lockfile","loc":"40:44-65"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"../../lockfile","loc":"45:44-69"},{"moduleId":149,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\upgrade.js","module":"./src/cli/commands/upgrade.js","moduleName":"./src/cli/commands/upgrade.js","type":"cjs require","userRequest":"../../lockfile","loc":"111:44-69"},{"moduleId":250,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\check.js","module":"./src/cli/commands/check.js","moduleName":"./src/cli/commands/check.js","type":"cjs require","userRequest":"../../lockfile","loc":"468:44-69"},{"moduleId":252,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\list.js","module":"./src/cli/commands/list.js","moduleName":"./src/cli/commands/list.js","type":"cjs require","userRequest":"../../lockfile","loc":"263:44-69"},{"moduleId":253,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\remove.js","module":"./src/cli/commands/remove.js","moduleName":"./src/cli/commands/remove.js","type":"cjs require","userRequest":"../../lockfile","loc":"158:44-69"},{"moduleId":255,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\upgrade-interactive.js","module":"./src/cli/commands/upgrade-interactive.js","moduleName":"./src/cli/commands/upgrade-interactive.js","type":"cjs require","userRequest":"../../lockfile","loc":"230:44-69"},{"moduleId":260,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-resolver.js","module":"./src/package-resolver.js","moduleName":"./src/package-resolver.js","type":"cjs require","userRequest":"./lockfile","loc":"46:44-65"},{"moduleId":338,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\rc.js","module":"./src/rc.js","moduleName":"./src/rc.js","type":"cjs require","userRequest":"./lockfile","loc":"24:21-42"},{"moduleId":366,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\generate-lock-entry.js","module":"./src/cli/commands/generate-lock-entry.js","moduleName":"./src/cli/commands/generate-lock-entry.js","type":"cjs require","userRequest":"../../lockfile","loc":"60:21-46"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"../../lockfile","loc":"133:44-69"},{"moduleId":371,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\licenses.js","module":"./src/cli/commands/licenses.js","moduleName":"./src/cli/commands/licenses.js","type":"cjs require","userRequest":"../../lockfile","loc":"174:44-69"},{"moduleId":374,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\outdated.js","module":"./src/cli/commands/outdated.js","moduleName":"./src/cli/commands/outdated.js","type":"cjs require","userRequest":"../../lockfile","loc":"84:44-69"},{"moduleId":381,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\why.js","module":"./src/cli/commands/why.js","moduleName":"./src/cli/commands/why.js","type":"cjs require","userRequest":"../../lockfile","loc":"293:44-69"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"../lockfile","loc":"58:44-66"},{"moduleId":393,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\yarn-registry.js","module":"./src/registries/yarn-registry.js","moduleName":"./src/registries/yarn-registry.js","type":"cjs require","userRequest":"../lockfile","loc":"29:21-43"}],"usedExports":true,"providedExports":null,"depth":0,"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.stringify = exports.parse = undefined;\n\nvar _asyncToGenerator2;\n\nfunction _load_asyncToGenerator() {\n return _asyncToGenerator2 = _interopRequireDefault(require('babel-runtime/helpers/asyncToGenerator'));\n}\n\nvar _parse;\n\nfunction _load_parse() {\n return _parse = require('./parse');\n}\n\nObject.defineProperty(exports, 'parse', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_parse || _load_parse()).default;\n }\n});\n\nvar _stringify;\n\nfunction _load_stringify() {\n return _stringify = require('./stringify');\n}\n\nObject.defineProperty(exports, 'stringify', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_stringify || _load_stringify()).default;\n }\n});\nexports.implodeEntry = implodeEntry;\nexports.explodeEntry = explodeEntry;\n\nvar _misc;\n\nfunction _load_misc() {\n return _misc = require('../util/misc.js');\n}\n\nvar _normalizePattern;\n\nfunction _load_normalizePattern() {\n return _normalizePattern = require('../util/normalize-pattern.js');\n}\n\nvar _parse2;\n\nfunction _load_parse2() {\n return _parse2 = _interopRequireDefault(require('./parse.js'));\n}\n\nvar _constants;\n\nfunction _load_constants() {\n return _constants = require('../constants.js');\n}\n\nvar _fs;\n\nfunction _load_fs() {\n return _fs = _interopRequireWildcard(require('../util/fs.js'));\n}\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst invariant = require('invariant');\n\nconst path = require('path');\n\nfunction getName(pattern) {\n return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name;\n}\n\nfunction blankObjectUndefined(obj) {\n return obj && Object.keys(obj).length ? obj : undefined;\n}\n\nfunction keyForRemote(remote) {\n return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null);\n}\n\nfunction implodeEntry(pattern, obj) {\n const inferredName = getName(pattern);\n return {\n name: inferredName === obj.name ? undefined : obj.name,\n version: obj.version,\n uid: obj.uid === obj.version ? undefined : obj.uid,\n resolved: obj.resolved,\n registry: obj.registry === 'npm' ? undefined : obj.registry,\n dependencies: blankObjectUndefined(obj.dependencies),\n optionalDependencies: blankObjectUndefined(obj.optionalDependencies),\n permissions: blankObjectUndefined(obj.permissions),\n prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants)\n };\n}\n\nfunction explodeEntry(pattern, obj) {\n obj.optionalDependencies = obj.optionalDependencies || {};\n obj.dependencies = obj.dependencies || {};\n obj.uid = obj.uid || obj.version;\n obj.permissions = obj.permissions || {};\n obj.registry = obj.registry || 'npm';\n obj.name = obj.name || getName(pattern);\n return obj;\n}\n\nclass Lockfile {\n constructor({ cache, source, parseResultType } = {}) {\n this.source = source || '';\n this.cache = cache;\n this.parseResultType = parseResultType;\n }\n\n // source string if the `cache` was parsed\n\n\n static fromDirectory(dir, reporter) {\n return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {\n // read the manifest in this directory\n const lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME);\n\n let lockfile;\n let rawLockfile = '';\n let parseResult;\n\n if (yield (_fs || _load_fs()).exists(lockfileLoc)) {\n rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc);\n parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc);\n\n if (reporter) {\n if (parseResult.type === 'merge') {\n reporter.info(reporter.lang('lockfileMerged'));\n } else if (parseResult.type === 'conflict') {\n reporter.warn(reporter.lang('lockfileConflict'));\n }\n }\n\n lockfile = parseResult.object;\n } else if (reporter) {\n reporter.info(reporter.lang('noLockfileFound'));\n }\n\n return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type });\n })();\n }\n\n getLocked(pattern) {\n const cache = this.cache;\n if (!cache) {\n return undefined;\n }\n\n const shrunk = pattern in cache && cache[pattern];\n\n if (typeof shrunk === 'string') {\n return this.getLocked(shrunk);\n } else if (shrunk) {\n explodeEntry(pattern, shrunk);\n return shrunk;\n }\n\n return undefined;\n }\n\n removePattern(pattern) {\n const cache = this.cache;\n if (!cache) {\n return;\n }\n delete cache[pattern];\n }\n\n getLockfile(patterns) {\n const lockfile = {};\n const seen = new Map();\n\n // order by name so that lockfile manifest is assigned to the first dependency with this manifest\n // the others that have the same remoteKey will just refer to the first\n // ordering allows for consistency in lockfile when it is serialized\n const sortedPatternsKeys = Object.keys(patterns).sort((_misc || _load_misc()).sortAlpha);\n\n for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n const pattern = _ref;\n\n const pkg = patterns[pattern];\n const remote = pkg._remote,\n ref = pkg._reference;\n\n invariant(ref, 'Package is missing a reference');\n invariant(remote, 'Package is missing a remote');\n\n const remoteKey = keyForRemote(remote);\n const seenPattern = remoteKey && seen.get(remoteKey);\n if (seenPattern) {\n // no point in duplicating it\n lockfile[pattern] = seenPattern;\n\n // if we're relying on our name being inferred and two of the patterns have\n // different inferred names then we need to set it\n if (!seenPattern.name && getName(pattern) !== pkg.name) {\n seenPattern.name = pkg.name;\n }\n continue;\n }\n const obj = implodeEntry(pattern, {\n name: pkg.name,\n version: pkg.version,\n uid: pkg._uid,\n resolved: remote.resolved,\n registry: remote.registry,\n dependencies: pkg.dependencies,\n peerDependencies: pkg.peerDependencies,\n optionalDependencies: pkg.optionalDependencies,\n permissions: ref.permissions,\n prebuiltVariants: pkg.prebuiltVariants\n });\n\n lockfile[pattern] = obj;\n\n if (remoteKey) {\n seen.set(remoteKey, obj);\n }\n }\n\n return lockfile;\n }\n}\nexports.default = Lockfile;"},{"id":13,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_global.js","name":"./~/core-js/library/modules/_global.js","index":13,"index2":6,"size":322,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\web.dom.iterable.js","issuerId":204,"issuerName":"./~/core-js/library/modules/web.dom.iterable.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":11,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_wks.js","module":"./~/core-js/library/modules/_wks.js","moduleName":"./~/core-js/library/modules/_wks.js","type":"cjs require","userRequest":"./_global","loc":"3:17-37"},{"moduleId":63,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_dom-create.js","module":"./~/core-js/library/modules/_dom-create.js","moduleName":"./~/core-js/library/modules/_dom-create.js","type":"cjs require","userRequest":"./_global","loc":"2:15-35"},{"moduleId":78,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_export.js","module":"./~/core-js/library/modules/_export.js","moduleName":"./~/core-js/library/modules/_export.js","type":"cjs require","userRequest":"./_global","loc":"1:16-36"},{"moduleId":96,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_html.js","module":"./~/core-js/library/modules/_html.js","moduleName":"./~/core-js/library/modules/_html.js","type":"cjs require","userRequest":"./_global","loc":"1:17-37"},{"moduleId":100,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_shared.js","module":"./~/core-js/library/modules/_shared.js","moduleName":"./~/core-js/library/modules/_shared.js","type":"cjs require","userRequest":"./_global","loc":"1:13-33"},{"moduleId":101,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_task.js","module":"./~/core-js/library/modules/_task.js","moduleName":"./~/core-js/library/modules/_task.js","type":"cjs require","userRequest":"./_global","loc":"5:25-45"},{"moduleId":187,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_microtask.js","module":"./~/core-js/library/modules/_microtask.js","moduleName":"./~/core-js/library/modules/_microtask.js","type":"cjs require","userRequest":"./_global","loc":"1:16-36"},{"moduleId":194,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\_set-species.js","module":"./~/core-js/library/modules/_set-species.js","moduleName":"./~/core-js/library/modules/_set-species.js","type":"cjs require","userRequest":"./_global","loc":"2:18-38"},{"moduleId":202,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\es6.promise.js","module":"./~/core-js/library/modules/es6.promise.js","moduleName":"./~/core-js/library/modules/es6.promise.js","type":"cjs require","userRequest":"./_global","loc":"3:25-45"},{"moduleId":204,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\core-js\\library\\modules\\web.dom.iterable.js","module":"./~/core-js/library/modules/web.dom.iterable.js","moduleName":"./~/core-js/library/modules/web.dom.iterable.js","type":"cjs require","userRequest":"./_global","loc":"2:20-40"}],"usedExports":true,"providedExports":null,"depth":5,"source":"// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef"},{"id":14,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\semver\\semver.js","name":"./~/semver/semver.js","index":97,"index2":96,"size":32966,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","issuerId":384,"issuerName":"./src/cli/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"semver","loc":"244:15-32"},{"moduleId":60,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\workspace-layout.js","module":"./src/workspace-layout.js","moduleName":"./src/workspace-layout.js","type":"cjs require","userRequest":"semver","loc":"13:15-32"},{"moduleId":88,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-request.js","module":"./src/package-request.js","moduleName":"./src/package-request.js","type":"cjs require","userRequest":"semver","loc":"28:42-59"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"semver","loc":"111:42-59"},{"moduleId":155,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolution-map.js","module":"./src/resolution-map.js","moduleName":"./src/resolution-map.js","type":"cjs require","userRequest":"semver","loc":"11:42-59"},{"moduleId":158,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\registries\\npm-resolver.js","module":"./src/resolvers/registries/npm-resolver.js","moduleName":"./src/resolvers/registries/npm-resolver.js","type":"cjs require","userRequest":"semver","loc":"69:15-32"},{"moduleId":165,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\semver.js","module":"./src/util/semver.js","moduleName":"./src/util/semver.js","type":"cjs require","userRequest":"semver","loc":"12:42-59"},{"moduleId":250,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\check.js","module":"./src/cli/commands/check.js","moduleName":"./src/cli/commands/check.js","type":"cjs require","userRequest":"semver","loc":"487:15-32"},{"moduleId":256,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\version.js","module":"./src/cli/commands/version.js","moduleName":"./src/cli/commands/version.js","type":"cjs require","userRequest":"semver","loc":"238:15-32"},{"moduleId":258,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-compatibility.js","module":"./src/package-compatibility.js","moduleName":"./src/package-compatibility.js","type":"cjs require","userRequest":"semver","loc":"44:15-32"},{"moduleId":260,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-resolver.js","module":"./src/package-resolver.js","moduleName":"./src/package-resolver.js","type":"cjs require","userRequest":"semver","loc":"77:15-32"},{"moduleId":266,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\color-for-versions.js","module":"./src/util/color-for-versions.js","moduleName":"./src/util/color-for-versions.js","type":"cjs require","userRequest":"semver","loc":"20:42-59"},{"moduleId":368,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\import.js","module":"./src/cli/commands/import.js","moduleName":"./src/cli/commands/import.js","type":"cjs require","userRequest":"semver","loc":"169:42-59"},{"moduleId":369,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\info.js","module":"./src/cli/commands/info.js","moduleName":"./src/cli/commands/info.js","type":"cjs require","userRequest":"semver","loc":"86:15-32"},{"moduleId":383,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\workspaces.js","module":"./src/cli/commands/workspaces.js","moduleName":"./src/cli/commands/workspaces.js","type":"cjs require","userRequest":"semver","loc":"132:15-32"},{"moduleId":384,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","module":"./src/cli/index.js","moduleName":"./src/cli/index.js","type":"cjs require","userRequest":"semver","loc":"116:42-59"},{"moduleId":389,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-constraint-resolver.js","module":"./src/package-constraint-resolver.js","moduleName":"./src/package-constraint-resolver.js","type":"cjs require","userRequest":"semver","loc":"6:15-32"},{"moduleId":410,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git\\git-ref-resolver.js","module":"./src/util/git/git-ref-resolver.js","moduleName":"./src/util/git/git-ref-resolver.js","type":"cjs require","userRequest":"semver","loc":"22:15-32"},{"moduleId":414,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\fix.js","module":"./src/util/normalize-manifest/fix.js","moduleName":"./src/util/normalize-manifest/fix.js","type":"cjs require","userRequest":"semver","loc":"47:15-32"}],"usedExports":true,"providedExports":null,"depth":1,"source":"exports = module.exports = SemVer;\n\n// The debug function is excluded entirely from the minified version.\n/* nomin */ var debug;\n/* nomin */ if (typeof process === 'object' &&\n /* nomin */ process.env &&\n /* nomin */ process.env.NODE_DEBUG &&\n /* nomin */ /\\bsemver\\b/i.test(process.env.NODE_DEBUG))\n /* nomin */ debug = function() {\n /* nomin */ var args = Array.prototype.slice.call(arguments, 0);\n /* nomin */ args.unshift('SEMVER');\n /* nomin */ console.log.apply(console, args);\n /* nomin */ };\n/* nomin */ else\n /* nomin */ debug = function() {};\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0';\n\nvar MAX_LENGTH = 256;\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;\n\n// The actual regexps go on exports.re\nvar re = exports.re = [];\nvar src = exports.src = [];\nvar R = 0;\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\nvar NUMERICIDENTIFIER = R++;\nsrc[NUMERICIDENTIFIER] = '0|[1-9]\\\\d*';\nvar NUMERICIDENTIFIERLOOSE = R++;\nsrc[NUMERICIDENTIFIERLOOSE] = '[0-9]+';\n\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\nvar NONNUMERICIDENTIFIER = R++;\nsrc[NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*';\n\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\nvar MAINVERSION = R++;\nsrc[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIER] + ')';\n\nvar MAINVERSIONLOOSE = R++;\nsrc[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIERLOOSE] + ')';\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\nvar PRERELEASEIDENTIFIER = R++;\nsrc[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +\n '|' + src[NONNUMERICIDENTIFIER] + ')';\n\nvar PRERELEASEIDENTIFIERLOOSE = R++;\nsrc[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +\n '|' + src[NONNUMERICIDENTIFIER] + ')';\n\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\nvar PRERELEASE = R++;\nsrc[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[PRERELEASEIDENTIFIER] + ')*))';\n\nvar PRERELEASELOOSE = R++;\nsrc[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\nvar BUILDIDENTIFIER = R++;\nsrc[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\nvar BUILD = R++;\nsrc[BUILD] = '(?:\\\\+(' + src[BUILDIDENTIFIER] +\n '(?:\\\\.' + src[BUILDIDENTIFIER] + ')*))';\n\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\nvar FULL = R++;\nvar FULLPLAIN = 'v?' + src[MAINVERSION] +\n src[PRERELEASE] + '?' +\n src[BUILD] + '?';\n\nsrc[FULL] = '^' + FULLPLAIN + '$';\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\nvar LOOSEPLAIN = '[v=\\\\s]*' + src[MAINVERSIONLOOSE] +\n src[PRERELEASELOOSE] + '?' +\n src[BUILD] + '?';\n\nvar LOOSE = R++;\nsrc[LOOSE] = '^' + LOOSEPLAIN + '$';\n\nvar GTLT = R++;\nsrc[GTLT] = '((?:<|>)?=?)';\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\nvar XRANGEIDENTIFIERLOOSE = R++;\nsrc[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*';\nvar XRANGEIDENTIFIER = R++;\nsrc[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\\\*';\n\nvar XRANGEPLAIN = R++;\nsrc[XRANGEPLAIN] = '[v=\\\\s]*(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:' + src[PRERELEASE] + ')?' +\n src[BUILD] + '?' +\n ')?)?';\n\nvar XRANGEPLAINLOOSE = R++;\nsrc[XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[PRERELEASELOOSE] + ')?' +\n src[BUILD] + '?' +\n ')?)?';\n\nvar XRANGE = R++;\nsrc[XRANGE] = '^' + src[GTLT] + '\\\\s*' + src[XRANGEPLAIN] + '$';\nvar XRANGELOOSE = R++;\nsrc[XRANGELOOSE] = '^' + src[GTLT] + '\\\\s*' + src[XRANGEPLAINLOOSE] + '$';\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\nvar LONETILDE = R++;\nsrc[LONETILDE] = '(?:~>?)';\n\nvar TILDETRIM = R++;\nsrc[TILDETRIM] = '(\\\\s*)' + src[LONETILDE] + '\\\\s+';\nre[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');\nvar tildeTrimReplace = '$1~';\n\nvar TILDE = R++;\nsrc[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';\nvar TILDELOOSE = R++;\nsrc[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\nvar LONECARET = R++;\nsrc[LONECARET] = '(?:\\\\^)';\n\nvar CARETTRIM = R++;\nsrc[CARETTRIM] = '(\\\\s*)' + src[LONECARET] + '\\\\s+';\nre[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');\nvar caretTrimReplace = '$1^';\n\nvar CARET = R++;\nsrc[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';\nvar CARETLOOSE = R++;\nsrc[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\nvar COMPARATORLOOSE = R++;\nsrc[COMPARATORLOOSE] = '^' + src[GTLT] + '\\\\s*(' + LOOSEPLAIN + ')$|^$';\nvar COMPARATOR = R++;\nsrc[COMPARATOR] = '^' + src[GTLT] + '\\\\s*(' + FULLPLAIN + ')$|^$';\n\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\nvar COMPARATORTRIM = R++;\nsrc[COMPARATORTRIM] = '(\\\\s*)' + src[GTLT] +\n '\\\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';\n\n// this one has to use the /g flag\nre[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');\nvar comparatorTrimReplace = '$1$2$3';\n\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\nvar HYPHENRANGE = R++;\nsrc[HYPHENRANGE] = '^\\\\s*(' + src[XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[XRANGEPLAIN] + ')' +\n '\\\\s*$';\n\nvar HYPHENRANGELOOSE = R++;\nsrc[HYPHENRANGELOOSE] = '^\\\\s*(' + src[XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$';\n\n// Star ranges basically just allow anything at all.\nvar STAR = R++;\nsrc[STAR] = '(<|>)?=?\\\\s*\\\\*';\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i]);\n if (!re[i])\n re[i] = new RegExp(src[i]);\n}\n\nexports.parse = parse;\nfunction parse(version, loose) {\n if (version instanceof SemVer)\n return version;\n\n if (typeof version !== 'string')\n return null;\n\n if (version.length > MAX_LENGTH)\n return null;\n\n var r = loose ? re[LOOSE] : re[FULL];\n if (!r.test(version))\n return null;\n\n try {\n return new SemVer(version, loose);\n } catch (er) {\n return null;\n }\n}\n\nexports.valid = valid;\nfunction valid(version, loose) {\n var v = parse(version, loose);\n return v ? v.version : null;\n}\n\n\nexports.clean = clean;\nfunction clean(version, loose) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), loose);\n return s ? s.version : null;\n}\n\nexports.SemVer = SemVer;\n\nfunction SemVer(version, loose) {\n if (version instanceof SemVer) {\n if (version.loose === loose)\n return version;\n else\n version = version.version;\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version);\n }\n\n if (version.length > MAX_LENGTH)\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n\n if (!(this instanceof SemVer))\n return new SemVer(version, loose);\n\n debug('SemVer', version, loose);\n this.loose = loose;\n var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);\n\n if (!m)\n throw new TypeError('Invalid Version: ' + version);\n\n this.raw = version;\n\n // these are actually numbers\n this.major = +m[1];\n this.minor = +m[2];\n this.patch = +m[3];\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0)\n throw new TypeError('Invalid major version')\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)\n throw new TypeError('Invalid minor version')\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)\n throw new TypeError('Invalid patch version')\n\n // numberify any prerelease numeric ids\n if (!m[4])\n this.prerelease = [];\n else\n this.prerelease = m[4].split('.').map(function(id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id;\n if (num >= 0 && num < MAX_SAFE_INTEGER)\n return num;\n }\n return id;\n });\n\n this.build = m[5] ? m[5].split('.') : [];\n this.format();\n}\n\nSemVer.prototype.format = function() {\n this.version = this.major + '.' + this.minor + '.' + this.patch;\n if (this.prerelease.length)\n this.version += '-' + this.prerelease.join('.');\n return this.version;\n};\n\nSemVer.prototype.toString = function() {\n return this.version;\n};\n\nSemVer.prototype.compare = function(other) {\n debug('SemVer.compare', this.version, this.loose, other);\n if (!(other instanceof SemVer))\n other = new SemVer(other, this.loose);\n\n return this.compareMain(other) || this.comparePre(other);\n};\n\nSemVer.prototype.compareMain = function(other) {\n if (!(other instanceof SemVer))\n other = new SemVer(other, this.loose);\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch);\n};\n\nSemVer.prototype.comparePre = function(other) {\n if (!(other instanceof SemVer))\n other = new SemVer(other, this.loose);\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length)\n return -1;\n else if (!this.prerelease.length && other.prerelease.length)\n return 1;\n else if (!this.prerelease.length && !other.prerelease.length)\n return 0;\n\n var i = 0;\n do {\n var a = this.prerelease[i];\n var b = other.prerelease[i];\n debug('prerelease compare', i, a, b);\n if (a === undefined && b === undefined)\n return 0;\n else if (b === undefined)\n return 1;\n else if (a === undefined)\n return -1;\n else if (a === b)\n continue;\n else\n return compareIdentifiers(a, b);\n } while (++i);\n};\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function(release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc('pre', identifier);\n break;\n case 'preminor':\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc('pre', identifier);\n break;\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0;\n this.inc('patch', identifier);\n this.inc('pre', identifier);\n break;\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0)\n this.inc('patch', identifier);\n this.inc('pre', identifier);\n break;\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)\n this.major++;\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0)\n this.minor++;\n this.patch = 0;\n this.prerelease = [];\n break;\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0)\n this.patch++;\n this.prerelease = [];\n break;\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0)\n this.prerelease = [0];\n else {\n var i = this.prerelease.length;\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++;\n i = -2;\n }\n }\n if (i === -1) // didn't increment anything\n this.prerelease.push(0);\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1]))\n this.prerelease = [identifier, 0];\n } else\n this.prerelease = [identifier, 0];\n }\n break;\n\n default:\n throw new Error('invalid increment argument: ' + release);\n }\n this.format();\n this.raw = this.version;\n return this;\n};\n\nexports.inc = inc;\nfunction inc(version, release, loose, identifier) {\n if (typeof(loose) === 'string') {\n identifier = loose;\n loose = undefined;\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version;\n } catch (er) {\n return null;\n }\n}\n\nexports.diff = diff;\nfunction diff(version1, version2) {\n if (eq(version1, version2)) {\n return null;\n } else {\n var v1 = parse(version1);\n var v2 = parse(version2);\n if (v1.prerelease.length || v2.prerelease.length) {\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return 'pre'+key;\n }\n }\n }\n return 'prerelease';\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return key;\n }\n }\n }\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers;\n\nvar numeric = /^[0-9]+$/;\nfunction compareIdentifiers(a, b) {\n var anum = numeric.test(a);\n var bnum = numeric.test(b);\n\n if (anum && bnum) {\n a = +a;\n b = +b;\n }\n\n return (anum && !bnum) ? -1 :\n (bnum && !anum) ? 1 :\n a < b ? -1 :\n a > b ? 1 :\n 0;\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers;\nfunction rcompareIdentifiers(a, b) {\n return compareIdentifiers(b, a);\n}\n\nexports.major = major;\nfunction major(a, loose) {\n return new SemVer(a, loose).major;\n}\n\nexports.minor = minor;\nfunction minor(a, loose) {\n return new SemVer(a, loose).minor;\n}\n\nexports.patch = patch;\nfunction patch(a, loose) {\n return new SemVer(a, loose).patch;\n}\n\nexports.compare = compare;\nfunction compare(a, b, loose) {\n return new SemVer(a, loose).compare(b);\n}\n\nexports.compareLoose = compareLoose;\nfunction compareLoose(a, b) {\n return compare(a, b, true);\n}\n\nexports.rcompare = rcompare;\nfunction rcompare(a, b, loose) {\n return compare(b, a, loose);\n}\n\nexports.sort = sort;\nfunction sort(list, loose) {\n return list.sort(function(a, b) {\n return exports.compare(a, b, loose);\n });\n}\n\nexports.rsort = rsort;\nfunction rsort(list, loose) {\n return list.sort(function(a, b) {\n return exports.rcompare(a, b, loose);\n });\n}\n\nexports.gt = gt;\nfunction gt(a, b, loose) {\n return compare(a, b, loose) > 0;\n}\n\nexports.lt = lt;\nfunction lt(a, b, loose) {\n return compare(a, b, loose) < 0;\n}\n\nexports.eq = eq;\nfunction eq(a, b, loose) {\n return compare(a, b, loose) === 0;\n}\n\nexports.neq = neq;\nfunction neq(a, b, loose) {\n return compare(a, b, loose) !== 0;\n}\n\nexports.gte = gte;\nfunction gte(a, b, loose) {\n return compare(a, b, loose) >= 0;\n}\n\nexports.lte = lte;\nfunction lte(a, b, loose) {\n return compare(a, b, loose) <= 0;\n}\n\nexports.cmp = cmp;\nfunction cmp(a, op, b, loose) {\n var ret;\n switch (op) {\n case '===':\n if (typeof a === 'object') a = a.version;\n if (typeof b === 'object') b = b.version;\n ret = a === b;\n break;\n case '!==':\n if (typeof a === 'object') a = a.version;\n if (typeof b === 'object') b = b.version;\n ret = a !== b;\n break;\n case '': case '=': case '==': ret = eq(a, b, loose); break;\n case '!=': ret = neq(a, b, loose); break;\n case '>': ret = gt(a, b, loose); break;\n case '>=': ret = gte(a, b, loose); break;\n case '<': ret = lt(a, b, loose); break;\n case '<=': ret = lte(a, b, loose); break;\n default: throw new TypeError('Invalid operator: ' + op);\n }\n return ret;\n}\n\nexports.Comparator = Comparator;\nfunction Comparator(comp, loose) {\n if (comp instanceof Comparator) {\n if (comp.loose === loose)\n return comp;\n else\n comp = comp.value;\n }\n\n if (!(this instanceof Comparator))\n return new Comparator(comp, loose);\n\n debug('comparator', comp, loose);\n this.loose = loose;\n this.parse(comp);\n\n if (this.semver === ANY)\n this.value = '';\n else\n this.value = this.operator + this.semver.version;\n\n debug('comp', this);\n}\n\nvar ANY = {};\nComparator.prototype.parse = function(comp) {\n var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];\n var m = comp.match(r);\n\n if (!m)\n throw new TypeError('Invalid comparator: ' + comp);\n\n this.operator = m[1];\n if (this.operator === '=')\n this.operator = '';\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2])\n this.semver = ANY;\n else\n this.semver = new SemVer(m[2], this.loose);\n};\n\nComparator.prototype.toString = function() {\n return this.value;\n};\n\nComparator.prototype.test = function(version) {\n debug('Comparator.test', version, this.loose);\n\n if (this.semver === ANY)\n return true;\n\n if (typeof version === 'string')\n version = new SemVer(version, this.loose);\n\n return cmp(version, this.operator, this.semver, this.loose);\n};\n\n\nexports.Range = Range;\nfunction Range(range, loose) {\n if ((range instanceof Range) && range.loose === loose)\n return range;\n\n if (!(this instanceof Range))\n return new Range(range, loose);\n\n this.loose = loose;\n\n // First, split based on boolean or ||\n this.raw = range;\n this.set = range.split(/\\s*\\|\\|\\s*/).map(function(range) {\n return this.parseRange(range.trim());\n }, this).filter(function(c) {\n // throw out any that are not relevant for whatever reason\n return c.length;\n });\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + range);\n }\n\n this.format();\n}\n\nRange.prototype.format = function() {\n this.range = this.set.map(function(comps) {\n return comps.join(' ').trim();\n }).join('||').trim();\n return this.range;\n};\n\nRange.prototype.toString = function() {\n return this.range;\n};\n\nRange.prototype.parseRange = function(range) {\n var loose = this.loose;\n range = range.trim();\n debug('range', range, loose);\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];\n range = range.replace(hr, hyphenReplace);\n debug('hyphen replace', range);\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);\n debug('comparator trim', range, re[COMPARATORTRIM]);\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[TILDETRIM], tildeTrimReplace);\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[CARETTRIM], caretTrimReplace);\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ');\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];\n var set = range.split(' ').map(function(comp) {\n return parseComparator(comp, loose);\n }).join(' ').split(/\\s+/);\n if (this.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function(comp) {\n return !!comp.match(compRe);\n });\n }\n set = set.map(function(comp) {\n return new Comparator(comp, loose);\n });\n\n return set;\n};\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators;\nfunction toComparators(range, loose) {\n return new Range(range, loose).set.map(function(comp) {\n return comp.map(function(c) {\n return c.value;\n }).join(' ').trim().split(' ');\n });\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator(comp, loose) {\n debug('comp', comp);\n comp = replaceCarets(comp, loose);\n debug('caret', comp);\n comp = replaceTildes(comp, loose);\n debug('tildes', comp);\n comp = replaceXRanges(comp, loose);\n debug('xrange', comp);\n comp = replaceStars(comp, loose);\n debug('stars', comp);\n return comp;\n}\n\nfunction isX(id) {\n return !id || id.toLowerCase() === 'x' || id === '*';\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes(comp, loose) {\n return comp.trim().split(/\\s+/).map(function(comp) {\n return replaceTilde(comp, loose);\n }).join(' ');\n}\n\nfunction replaceTilde(comp, loose) {\n var r = loose ? re[TILDELOOSE] : re[TILDE];\n return comp.replace(r, function(_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr);\n var ret;\n\n if (isX(M))\n ret = '';\n else if (isX(m))\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';\n else if (isX(p))\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';\n else if (pr) {\n debug('replaceTilde pr', pr);\n if (pr.charAt(0) !== '-')\n pr = '-' + pr;\n ret = '>=' + M + '.' + m + '.' + p + pr +\n ' <' + M + '.' + (+m + 1) + '.0';\n } else\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0';\n\n debug('tilde return', ret);\n return ret;\n });\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets(comp, loose) {\n return comp.trim().split(/\\s+/).map(function(comp) {\n return replaceCaret(comp, loose);\n }).join(' ');\n}\n\nfunction replaceCaret(comp, loose) {\n debug('caret', comp, loose);\n var r = loose ? re[CARETLOOSE] : re[CARET];\n return comp.replace(r, function(_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr);\n var ret;\n\n if (isX(M))\n ret = '';\n else if (isX(m))\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';\n else if (isX(p)) {\n if (M === '0')\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';\n else\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';\n } else if (pr) {\n debug('replaceCaret pr', pr);\n if (pr.charAt(0) !== '-')\n pr = '-' + pr;\n if (M === '0') {\n if (m === '0')\n ret = '>=' + M + '.' + m + '.' + p + pr +\n ' <' + M + '.' + m + '.' + (+p + 1);\n else\n ret = '>=' + M + '.' + m + '.' + p + pr +\n ' <' + M + '.' + (+m + 1) + '.0';\n } else\n ret = '>=' + M + '.' + m + '.' + p + pr +\n ' <' + (+M + 1) + '.0.0';\n } else {\n debug('no pr');\n if (M === '0') {\n if (m === '0')\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1);\n else\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0';\n } else\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0';\n }\n\n debug('caret return', ret);\n return ret;\n });\n}\n\nfunction replaceXRanges(comp, loose) {\n debug('replaceXRanges', comp, loose);\n return comp.split(/\\s+/).map(function(comp) {\n return replaceXRange(comp, loose);\n }).join(' ');\n}\n\nfunction replaceXRange(comp, loose) {\n comp = comp.trim();\n var r = loose ? re[XRANGELOOSE] : re[XRANGE];\n return comp.replace(r, function(ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr);\n var xM = isX(M);\n var xm = xM || isX(m);\n var xp = xm || isX(p);\n var anyX = xp;\n\n if (gtlt === '=' && anyX)\n gtlt = '';\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0';\n } else {\n // nothing is forbidden\n ret = '*';\n }\n } else if (gtlt && anyX) {\n // replace X with 0\n if (xm)\n m = 0;\n if (xp)\n p = 0;\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>=';\n if (xm) {\n M = +M + 1;\n m = 0;\n p = 0;\n } else if (xp) {\n m = +m + 1;\n p = 0;\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<';\n if (xm)\n M = +M + 1;\n else\n m = +m + 1;\n }\n\n ret = gtlt + M + '.' + m + '.' + p;\n } else if (xm) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';\n }\n\n debug('xRange return', ret);\n\n return ret;\n });\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars(comp, loose) {\n debug('replaceStars', comp, loose);\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[STAR], '');\n}\n\n// This function is passed to string.replace(re[HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n\n if (isX(fM))\n from = '';\n else if (isX(fm))\n from = '>=' + fM + '.0.0';\n else if (isX(fp))\n from = '>=' + fM + '.' + fm + '.0';\n else\n from = '>=' + from;\n\n if (isX(tM))\n to = '';\n else if (isX(tm))\n to = '<' + (+tM + 1) + '.0.0';\n else if (isX(tp))\n to = '<' + tM + '.' + (+tm + 1) + '.0';\n else if (tpr)\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;\n else\n to = '<=' + to;\n\n return (from + ' ' + to).trim();\n}\n\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function(version) {\n if (!version)\n return false;\n\n if (typeof version === 'string')\n version = new SemVer(version, this.loose);\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version))\n return true;\n }\n return false;\n};\n\nfunction testSet(set, version) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version))\n return false;\n }\n\n if (version.prerelease.length) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (var i = 0; i < set.length; i++) {\n debug(set[i].semver);\n if (set[i].semver === ANY)\n continue;\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver;\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch)\n return true;\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false;\n }\n\n return true;\n}\n\nexports.satisfies = satisfies;\nfunction satisfies(version, range, loose) {\n try {\n range = new Range(range, loose);\n } catch (er) {\n return false;\n }\n return range.test(version);\n}\n\nexports.maxSatisfying = maxSatisfying;\nfunction maxSatisfying(versions, range, loose) {\n return versions.filter(function(version) {\n return satisfies(version, range, loose);\n }).sort(function(a, b) {\n return rcompare(a, b, loose);\n })[0] || null;\n}\n\nexports.minSatisfying = minSatisfying;\nfunction minSatisfying(versions, range, loose) {\n return versions.filter(function(version) {\n return satisfies(version, range, loose);\n }).sort(function(a, b) {\n return compare(a, b, loose);\n })[0] || null;\n}\n\nexports.validRange = validRange;\nfunction validRange(range, loose) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, loose).range || '*';\n } catch (er) {\n return null;\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr;\nfunction ltr(version, range, loose) {\n return outside(version, range, '<', loose);\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr;\nfunction gtr(version, range, loose) {\n return outside(version, range, '>', loose);\n}\n\nexports.outside = outside;\nfunction outside(version, range, hilo, loose) {\n version = new SemVer(version, loose);\n range = new Range(range, loose);\n\n var gtfn, ltefn, ltfn, comp, ecomp;\n switch (hilo) {\n case '>':\n gtfn = gt;\n ltefn = lte;\n ltfn = lt;\n comp = '>';\n ecomp = '>=';\n break;\n case '<':\n gtfn = lt;\n ltefn = gte;\n ltfn = gt;\n comp = '<';\n ecomp = '<=';\n break;\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"');\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, loose)) {\n return false;\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i];\n\n var high = null;\n var low = null;\n\n comparators.forEach(function(comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator;\n low = low || comparator;\n if (gtfn(comparator.semver, high.semver, loose)) {\n high = comparator;\n } else if (ltfn(comparator.semver, low.semver, loose)) {\n low = comparator;\n }\n });\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false;\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false;\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false;\n }\n }\n return true;\n}\n\nexports.prerelease = prerelease;\nfunction prerelease(version, loose) {\n var parsed = parse(version, loose);\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;\n}\n"},{"id":15,"identifier":"external \"url\"","name":"external \"url\"","index":249,"index2":244,"size":42,"cacheable":false,"built":false,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","issuerId":376,"issuerName":"./src/cli/commands/publish.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":52,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\npm-registry.js","module":"./src/registries/npm-registry.js","moduleName":"./src/registries/npm-registry.js","type":"cjs require","userRequest":"url","loc":"89:39-53"},{"moduleId":90,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\exotics\\git-resolver.js","module":"./src/resolvers/exotics/git-resolver.js","moduleName":"./src/resolvers/exotics/git-resolver.js","type":"cjs require","userRequest":"url","loc":"59:17-31"},{"moduleId":119,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\guess-name.js","module":"./src/util/guess-name.js","moduleName":"./src/util/guess-name.js","type":"cjs require","userRequest":"url","loc":"11:39-53"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"url","loc":"46:39-53"},{"moduleId":215,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\har-validator\\node_modules\\ajv\\lib\\compile\\resolve.js","module":"./~/har-validator/~/ajv/lib/compile/resolve.js","moduleName":"./~/har-validator/~/ajv/lib/compile/resolve.js","type":"cjs require","userRequest":"url","loc":"3:10-24"},{"moduleId":257,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\tarball-fetcher.js","module":"./src/fetchers/tarball-fetcher.js","moduleName":"./src/fetchers/tarball-fetcher.js","type":"cjs require","userRequest":"url","loc":"63:12-26"},{"moduleId":272,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\request-manager.js","module":"./src/util/request-manager.js","moduleName":"./src/util/request-manager.js","type":"cjs require","userRequest":"url","loc":"16:39-53"},{"moduleId":356,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\aws-sign2\\index.js","module":"./~/aws-sign2/index.js","moduleName":"./~/aws-sign2/index.js","type":"cjs require","userRequest":"url","loc":"23:12-26"},{"moduleId":357,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\aws4\\aws4.js","module":"./~/aws4/aws4.js","moduleName":"./~/aws4/aws4.js","type":"cjs require","userRequest":"url","loc":"2:10-24"},{"moduleId":376,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\publish.js","module":"./src/cli/commands/publish.js","moduleName":"./src/cli/commands/publish.js","type":"cjs require","userRequest":"url","loc":"219:12-26"},{"moduleId":386,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\git-fetcher.js","module":"./src/fetchers/git-fetcher.js","moduleName":"./src/fetchers/git-fetcher.js","type":"cjs require","userRequest":"url","loc":"78:12-26"},{"moduleId":414,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\normalize-manifest\\fix.js","module":"./src/util/normalize-manifest/fix.js","moduleName":"./src/util/normalize-manifest/fix.js","type":"cjs require","userRequest":"url","loc":"49:12-26"},{"moduleId":468,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\form-data\\lib\\form_data.js","module":"./~/form-data/lib/form_data.js","moduleName":"./~/form-data/lib/form_data.js","type":"cjs require","userRequest":"url","loc":"6:15-29"},{"moduleId":588,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\normalize-url\\index.js","module":"./~/normalize-url/index.js","moduleName":"./~/normalize-url/index.js","type":"cjs require","userRequest":"url","loc":"2:12-26"},{"moduleId":624,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\lib\\oauth.js","module":"./~/request/lib/oauth.js","moduleName":"./~/request/lib/oauth.js","type":"cjs require","userRequest":"url","loc":"3:10-24"},{"moduleId":626,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\lib\\redirect.js","module":"./~/request/lib/redirect.js","moduleName":"./~/request/lib/redirect.js","type":"cjs require","userRequest":"url","loc":"3:10-24"},{"moduleId":627,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\lib\\tunnel.js","module":"./~/request/lib/tunnel.js","moduleName":"./~/request/lib/tunnel.js","type":"cjs require","userRequest":"url","loc":"3:10-24"},{"moduleId":633,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\request\\request.js","module":"./~/request/request.js","moduleName":"./~/request/request.js","type":"cjs require","userRequest":"url","loc":"5:10-24"},{"moduleId":665,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tough-cookie\\lib\\cookie.js","module":"./~/tough-cookie/lib/cookie.js","moduleName":"./~/tough-cookie/lib/cookie.js","type":"cjs require","userRequest":"url","loc":"33:15-29"}],"usedExports":true,"providedExports":null,"depth":3},{"id":16,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-runtime\\helpers\\extends.js","name":"./~/babel-runtime/helpers/extends.js","index":192,"index2":194,"size":544,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","issuerId":114,"issuerName":"./src/config.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":52,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\npm-registry.js","module":"./src/registries/npm-registry.js","moduleName":"./src/registries/npm-registry.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"17:44-84"},{"moduleId":92,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\execute-lifecycle-script.js","module":"./src/util/execute-lifecycle-script.js","moduleName":"./src/util/execute-lifecycle-script.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":114,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","module":"./src/config.js","moduleName":"./src/config.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"10:44-84"},{"moduleId":116,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\add.js","module":"./src/cli/commands/add.js","moduleName":"./src/cli/commands/add.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"17:44-84"},{"moduleId":150,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\integrity-checker.js","module":"./src/integrity-checker.js","moduleName":"./src/integrity-checker.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":154,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\reporters\\json-reporter.js","module":"./src/reporters/json-reporter.js","moduleName":"./src/reporters/json-reporter.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"10:44-84"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"16:44-84"},{"moduleId":253,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\remove.js","module":"./src/cli/commands/remove.js","moduleName":"./src/cli/commands/remove.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":255,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\upgrade-interactive.js","module":"./src/cli/commands/upgrade-interactive.js","moduleName":"./src/cli/commands/upgrade-interactive.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":269,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git\\git-spawn.js","module":"./src/util/git/git-spawn.js","moduleName":"./src/util/git/git-spawn.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":371,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\licenses.js","module":"./src/cli/commands/licenses.js","moduleName":"./src/cli/commands/licenses.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":374,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\outdated.js","module":"./src/cli/commands/outdated.js","moduleName":"./src/cli/commands/outdated.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":378,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\team.js","module":"./src/cli/commands/team.js","moduleName":"./src/cli/commands/team.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":388,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\fetchers\\workspace-fetcher.js","module":"./src/fetchers/workspace-fetcher.js","moduleName":"./src/fetchers/workspace-fetcher.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"10:44-84"},{"moduleId":390,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-hoister.js","module":"./src/package-hoister.js","moduleName":"./src/package-hoister.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"11:44-84"},{"moduleId":392,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\registries\\base-registry.js","module":"./src/registries/base-registry.js","moduleName":"./src/registries/base-registry.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"16:44-84"},{"moduleId":402,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\contextual\\workspace-resolver.js","module":"./src/resolvers/contextual/workspace-resolver.js","moduleName":"./src/resolvers/contextual/workspace-resolver.js","type":"cjs require","userRequest":"babel-runtime/helpers/extends","loc":"10:44-84"}],"usedExports":true,"providedExports":null,"depth":2,"source":"\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};"},{"id":17,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\webpack\\buildin\\module.js","name":"(webpack)/buildin/module.js","index":1,"index2":0,"size":517,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","issuerId":384,"issuerName":"./src/cli/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":24,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\lodash\\lodash.js","module":"./~/lodash/lodash.js","moduleName":"./~/lodash/lodash.js","type":"cjs require","userRequest":"module","loc":"1:0-41"},{"moduleId":39,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.js","module":"./~/rx/dist/rx.js","moduleName":"./~/rx/dist/rx.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":313,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.binding.js","module":"./~/rx/dist/rx.binding.js","moduleName":"./~/rx/dist/rx.binding.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":314,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.virtualtime.js","module":"./~/rx/dist/rx.virtualtime.js","moduleName":"./~/rx/dist/rx.virtualtime.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":345,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\ansi-styles\\index.js","module":"./~/ansi-styles/index.js","moduleName":"./~/ansi-styles/index.js","type":"cjs require","userRequest":"module","loc":"1:0-41"},{"moduleId":384,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\index.js","module":"./src/cli/index.js","moduleName":"./src/cli/index.js","type":"cjs require","userRequest":"module","loc":"1:0-57"},{"moduleId":549,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\node_modules\\ansi-styles\\index.js","module":"./~/inquirer/~/ansi-styles/index.js","moduleName":"./~/inquirer/~/ansi-styles/index.js","type":"cjs require","userRequest":"module","loc":"1:0-47"},{"moduleId":572,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\lodash._baseclone\\index.js","module":"./~/lodash._baseclone/index.js","moduleName":"./~/lodash._baseclone/index.js","type":"cjs require","userRequest":"module","loc":"1:0-41"},{"moduleId":638,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.aggregates.js","module":"./~/rx/dist/rx.aggregates.js","moduleName":"./~/rx/dist/rx.aggregates.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":639,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.async.js","module":"./~/rx/dist/rx.async.js","moduleName":"./~/rx/dist/rx.async.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":640,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.backpressure.js","module":"./~/rx/dist/rx.backpressure.js","moduleName":"./~/rx/dist/rx.backpressure.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":641,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.coincidence.js","module":"./~/rx/dist/rx.coincidence.js","moduleName":"./~/rx/dist/rx.coincidence.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":642,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.experimental.js","module":"./~/rx/dist/rx.experimental.js","moduleName":"./~/rx/dist/rx.experimental.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":643,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.joinpatterns.js","module":"./~/rx/dist/rx.joinpatterns.js","moduleName":"./~/rx/dist/rx.joinpatterns.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":644,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.sorting.js","module":"./~/rx/dist/rx.sorting.js","moduleName":"./~/rx/dist/rx.sorting.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":645,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.testing.js","module":"./~/rx/dist/rx.testing.js","moduleName":"./~/rx/dist/rx.testing.js","type":"cjs require","userRequest":"module","loc":"1:0-44"},{"moduleId":646,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rx\\dist\\rx.time.js","module":"./~/rx/dist/rx.time.js","moduleName":"./~/rx/dist/rx.time.js","type":"cjs require","userRequest":"module","loc":"1:0-44"}],"usedExports":true,"providedExports":null,"depth":1,"source":"module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n"},{"id":18,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\map.js","name":"./src/util/map.js","index":226,"index2":220,"size":897,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\parse.js","issuerId":74,"issuerName":"./src/lockfile/parse.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":5,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\fs.js","module":"./src/util/fs.js","moduleName":"./src/util/fs.js","type":"cjs require","userRequest":"./map.js","loc":"1104:39-58"},{"moduleId":25,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\install.js","module":"./src/cli/commands/install.js","moduleName":"./src/cli/commands/install.js","type":"cjs require","userRequest":"../../util/map.js","loc":"208:39-67"},{"moduleId":74,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\lockfile\\parse.js","module":"./src/lockfile/parse.js","moduleName":"./src/lockfile/parse.js","type":"cjs require","userRequest":"../util/map.js","loc":"45:39-64"},{"moduleId":77,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\blocking-queue.js","module":"./src/util/blocking-queue.js","moduleName":"./src/util/blocking-queue.js","type":"cjs require","userRequest":"./map.js","loc":"10:39-58"},{"moduleId":114,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\config.js","module":"./src/config.js","moduleName":"./src/config.js","type":"cjs require","userRequest":"./util/map.js","loc":"84:39-63"},{"moduleId":155,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolution-map.js","module":"./src/resolution-map.js","moduleName":"./src/resolution-map.js","type":"cjs require","userRequest":"./util/map","loc":"23:39-60"},{"moduleId":158,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\resolvers\\registries\\npm-resolver.js","module":"./src/resolvers/registries/npm-resolver.js","moduleName":"./src/resolvers/registries/npm-resolver.js","type":"cjs require","userRequest":"../../util/map.js","loc":"40:39-67"},{"moduleId":160,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\git.js","module":"./src/util/git.js","moduleName":"./src/util/git.js","type":"cjs require","userRequest":"./map.js","loc":"88:39-58"},{"moduleId":256,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\version.js","module":"./src/cli/commands/version.js","moduleName":"./src/cli/commands/version.js","type":"cjs require","userRequest":"../../util/map.js","loc":"230:39-67"},{"moduleId":258,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-compatibility.js","module":"./src/package-compatibility.js","moduleName":"./src/package-compatibility.js","type":"cjs require","userRequest":"./util/map.js","loc":"19:39-63"},{"moduleId":260,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\package-resolver.js","module":"./src/package-resolver.js","moduleName":"./src/package-resolver.js","type":"cjs require","userRequest":"./util/map.js","loc":"52:39-63"},{"moduleId":272,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\util\\request-manager.js","module":"./src/util/request-manager.js","moduleName":"./src/util/request-manager.js","type":"cjs require","userRequest":"../util/map.js","loc":"64:39-64"},{"moduleId":377,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\src\\cli\\commands\\run.js","module":"./src/cli/commands/run.js","moduleName":"./src/cli/commands/run.js","type":"cjs require","userRequest":"../../util/map.js","loc":"230:39-67"}],"usedExports":true,"providedExports":null,"depth":2,"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = nullify;\nfunction nullify(obj = {}) {\n if (Array.isArray(obj)) {\n for (var _iterator = obj, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n const item = _ref;\n\n nullify(item);\n }\n } else if (obj !== null && typeof obj === 'object' || typeof obj === 'function') {\n Object.setPrototypeOf(obj, null);\n\n // for..in can only be applied to 'object', not 'function'\n if (typeof obj === 'object') {\n for (const key in obj) {\n nullify(obj[key]);\n }\n }\n }\n\n return obj;\n}"},{"id":19,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\utils.js","name":"./~/sshpk/lib/utils.js","index":471,"index2":480,"size":7069,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\key.js","issuerId":22,"issuerName":"./~/sshpk/lib/key.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":22,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\key.js","module":"./~/sshpk/lib/key.js","moduleName":"./~/sshpk/lib/key.js","type":"cjs require","userRequest":"./utils","loc":"12:12-30"},{"moduleId":23,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\private-key.js","module":"./~/sshpk/lib/private-key.js","moduleName":"./~/sshpk/lib/private-key.js","type":"cjs require","userRequest":"./utils","loc":"12:12-30"},{"moduleId":49,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\signature.js","module":"./~/sshpk/lib/signature.js","moduleName":"./~/sshpk/lib/signature.js","type":"cjs require","userRequest":"./utils","loc":"9:12-30"},{"moduleId":57,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pem.js","module":"./~/sshpk/lib/formats/pem.js","moduleName":"./~/sshpk/lib/formats/pem.js","type":"cjs require","userRequest":"../utils","loc":"12:12-31"},{"moduleId":72,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\rfc4253.js","module":"./~/sshpk/lib/formats/rfc4253.js","moduleName":"./~/sshpk/lib/formats/rfc4253.js","type":"cjs require","userRequest":"../utils","loc":"18:12-31"},{"moduleId":109,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\certificate.js","module":"./~/sshpk/lib/certificate.js","moduleName":"./~/sshpk/lib/certificate.js","type":"cjs require","userRequest":"./utils","loc":"12:12-30"},{"moduleId":110,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\fingerprint.js","module":"./~/sshpk/lib/fingerprint.js","moduleName":"./~/sshpk/lib/fingerprint.js","type":"cjs require","userRequest":"./utils","loc":"11:12-30"},{"moduleId":111,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs8.js","module":"./~/sshpk/lib/formats/pkcs8.js","moduleName":"./~/sshpk/lib/formats/pkcs8.js","type":"cjs require","userRequest":"../utils","loc":"16:12-31"},{"moduleId":112,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\identity.js","module":"./~/sshpk/lib/identity.js","moduleName":"./~/sshpk/lib/identity.js","type":"cjs require","userRequest":"./utils","loc":"12:12-30"},{"moduleId":136,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh-private.js","module":"./~/sshpk/lib/formats/ssh-private.js","moduleName":"./~/sshpk/lib/formats/ssh-private.js","type":"cjs require","userRequest":"../utils","loc":"12:12-31"},{"moduleId":232,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs1.js","module":"./~/sshpk/lib/formats/pkcs1.js","moduleName":"./~/sshpk/lib/formats/pkcs1.js","type":"cjs require","userRequest":"../utils","loc":"13:12-31"},{"moduleId":319,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\dhe.js","module":"./~/sshpk/lib/dhe.js","moduleName":"./~/sshpk/lib/dhe.js","type":"cjs require","userRequest":"./utils","loc":"12:12-30"},{"moduleId":321,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\auto.js","module":"./~/sshpk/lib/formats/auto.js","moduleName":"./~/sshpk/lib/formats/auto.js","type":"cjs require","userRequest":"../utils","loc":"9:12-31"},{"moduleId":322,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh.js","module":"./~/sshpk/lib/formats/ssh.js","moduleName":"./~/sshpk/lib/formats/ssh.js","type":"cjs require","userRequest":"../utils","loc":"10:12-31"},{"moduleId":323,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509.js","module":"./~/sshpk/lib/formats/x509.js","moduleName":"./~/sshpk/lib/formats/x509.js","type":"cjs require","userRequest":"../utils","loc":"14:12-31"},{"moduleId":654,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\openssh-cert.js","module":"./~/sshpk/lib/formats/openssh-cert.js","moduleName":"./~/sshpk/lib/formats/openssh-cert.js","type":"cjs require","userRequest":"../utils","loc":"24:12-31"},{"moduleId":655,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509-pem.js","module":"./~/sshpk/lib/formats/x509-pem.js","moduleName":"./~/sshpk/lib/formats/x509-pem.js","type":"cjs require","userRequest":"../utils","loc":"15:12-31"}],"usedExports":true,"providedExports":null,"depth":9,"source":"// Copyright 2015 Joyent, Inc.\n\nmodule.exports = {\n\tbufferSplit: bufferSplit,\n\taddRSAMissing: addRSAMissing,\n\tcalculateDSAPublic: calculateDSAPublic,\n\tmpNormalize: mpNormalize,\n\tecNormalize: ecNormalize,\n\tcountZeros: countZeros,\n\tassertCompatible: assertCompatible,\n\tisCompatible: isCompatible,\n\topensslKeyDeriv: opensslKeyDeriv,\n\topensshCipherInfo: opensshCipherInfo\n};\n\nvar assert = require('assert-plus');\nvar PrivateKey = require('./private-key');\nvar crypto = require('crypto');\n\nvar MAX_CLASS_DEPTH = 3;\n\nfunction isCompatible(obj, klass, needVer) {\n\tif (obj === null || typeof (obj) !== 'object')\n\t\treturn (false);\n\tif (needVer === undefined)\n\t\tneedVer = klass.prototype._sshpkApiVersion;\n\tif (obj instanceof klass &&\n\t klass.prototype._sshpkApiVersion[0] == needVer[0])\n\t\treturn (true);\n\tvar proto = Object.getPrototypeOf(obj);\n\tvar depth = 0;\n\twhile (proto.constructor.name !== klass.name) {\n\t\tproto = Object.getPrototypeOf(proto);\n\t\tif (!proto || ++depth > MAX_CLASS_DEPTH)\n\t\t\treturn (false);\n\t}\n\tif (proto.constructor.name !== klass.name)\n\t\treturn (false);\n\tvar ver = proto._sshpkApiVersion;\n\tif (ver === undefined)\n\t\tver = klass._oldVersionDetect(obj);\n\tif (ver[0] != needVer[0] || ver[1] < needVer[1])\n\t\treturn (false);\n\treturn (true);\n}\n\nfunction assertCompatible(obj, klass, needVer, name) {\n\tif (name === undefined)\n\t\tname = 'object';\n\tassert.ok(obj, name + ' must not be null');\n\tassert.object(obj, name + ' must be an object');\n\tif (needVer === undefined)\n\t\tneedVer = klass.prototype._sshpkApiVersion;\n\tif (obj instanceof klass &&\n\t klass.prototype._sshpkApiVersion[0] == needVer[0])\n\t\treturn;\n\tvar proto = Object.getPrototypeOf(obj);\n\tvar depth = 0;\n\twhile (proto.constructor.name !== klass.name) {\n\t\tproto = Object.getPrototypeOf(proto);\n\t\tassert.ok(proto && ++depth <= MAX_CLASS_DEPTH,\n\t\t name + ' must be a ' + klass.name + ' instance');\n\t}\n\tassert.strictEqual(proto.constructor.name, klass.name,\n\t name + ' must be a ' + klass.name + ' instance');\n\tvar ver = proto._sshpkApiVersion;\n\tif (ver === undefined)\n\t\tver = klass._oldVersionDetect(obj);\n\tassert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1],\n\t name + ' must be compatible with ' + klass.name + ' klass ' +\n\t 'version ' + needVer[0] + '.' + needVer[1]);\n}\n\nvar CIPHER_LEN = {\n\t'des-ede3-cbc': { key: 7, iv: 8 },\n\t'aes-128-cbc': { key: 16, iv: 16 }\n};\nvar PKCS5_SALT_LEN = 8;\n\nfunction opensslKeyDeriv(cipher, salt, passphrase, count) {\n\tassert.buffer(salt, 'salt');\n\tassert.buffer(passphrase, 'passphrase');\n\tassert.number(count, 'iteration count');\n\n\tvar clen = CIPHER_LEN[cipher];\n\tassert.object(clen, 'supported cipher');\n\n\tsalt = salt.slice(0, PKCS5_SALT_LEN);\n\n\tvar D, D_prev, bufs;\n\tvar material = new Buffer(0);\n\twhile (material.length < clen.key + clen.iv) {\n\t\tbufs = [];\n\t\tif (D_prev)\n\t\t\tbufs.push(D_prev);\n\t\tbufs.push(passphrase);\n\t\tbufs.push(salt);\n\t\tD = Buffer.concat(bufs);\n\t\tfor (var j = 0; j < count; ++j)\n\t\t\tD = crypto.createHash('md5').update(D).digest();\n\t\tmaterial = Buffer.concat([material, D]);\n\t\tD_prev = D;\n\t}\n\n\treturn ({\n\t key: material.slice(0, clen.key),\n\t iv: material.slice(clen.key, clen.key + clen.iv)\n\t});\n}\n\n/* Count leading zero bits on a buffer */\nfunction countZeros(buf) {\n\tvar o = 0, obit = 8;\n\twhile (o < buf.length) {\n\t\tvar mask = (1 << obit);\n\t\tif ((buf[o] & mask) === mask)\n\t\t\tbreak;\n\t\tobit--;\n\t\tif (obit < 0) {\n\t\t\to++;\n\t\t\tobit = 8;\n\t\t}\n\t}\n\treturn (o*8 + (8 - obit) - 1);\n}\n\nfunction bufferSplit(buf, chr) {\n\tassert.buffer(buf);\n\tassert.string(chr);\n\n\tvar parts = [];\n\tvar lastPart = 0;\n\tvar matches = 0;\n\tfor (var i = 0; i < buf.length; ++i) {\n\t\tif (buf[i] === chr.charCodeAt(matches))\n\t\t\t++matches;\n\t\telse if (buf[i] === chr.charCodeAt(0))\n\t\t\tmatches = 1;\n\t\telse\n\t\t\tmatches = 0;\n\n\t\tif (matches >= chr.length) {\n\t\t\tvar newPart = i + 1;\n\t\t\tparts.push(buf.slice(lastPart, newPart - matches));\n\t\t\tlastPart = newPart;\n\t\t\tmatches = 0;\n\t\t}\n\t}\n\tif (lastPart <= buf.length)\n\t\tparts.push(buf.slice(lastPart, buf.length));\n\n\treturn (parts);\n}\n\nfunction ecNormalize(buf, addZero) {\n\tassert.buffer(buf);\n\tif (buf[0] === 0x00 && buf[1] === 0x04) {\n\t\tif (addZero)\n\t\t\treturn (buf);\n\t\treturn (buf.slice(1));\n\t} else if (buf[0] === 0x04) {\n\t\tif (!addZero)\n\t\t\treturn (buf);\n\t} else {\n\t\twhile (buf[0] === 0x00)\n\t\t\tbuf = buf.slice(1);\n\t\tif (buf[0] === 0x02 || buf[0] === 0x03)\n\t\t\tthrow (new Error('Compressed elliptic curve points ' +\n\t\t\t 'are not supported'));\n\t\tif (buf[0] !== 0x04)\n\t\t\tthrow (new Error('Not a valid elliptic curve point'));\n\t\tif (!addZero)\n\t\t\treturn (buf);\n\t}\n\tvar b = new Buffer(buf.length + 1);\n\tb[0] = 0x0;\n\tbuf.copy(b, 1);\n\treturn (b);\n}\n\nfunction mpNormalize(buf) {\n\tassert.buffer(buf);\n\twhile (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00)\n\t\tbuf = buf.slice(1);\n\tif ((buf[0] & 0x80) === 0x80) {\n\t\tvar b = new Buffer(buf.length + 1);\n\t\tb[0] = 0x00;\n\t\tbuf.copy(b, 1);\n\t\tbuf = b;\n\t}\n\treturn (buf);\n}\n\nfunction bigintToMpBuf(bigint) {\n\tvar buf = new Buffer(bigint.toByteArray());\n\tbuf = mpNormalize(buf);\n\treturn (buf);\n}\n\nfunction calculateDSAPublic(g, p, x) {\n\tassert.buffer(g);\n\tassert.buffer(p);\n\tassert.buffer(x);\n\ttry {\n\t\tvar bigInt = require('jsbn').BigInteger;\n\t} catch (e) {\n\t\tthrow (new Error('To load a PKCS#8 format DSA private key, ' +\n\t\t 'the node jsbn library is required.'));\n\t}\n\tg = new bigInt(g);\n\tp = new bigInt(p);\n\tx = new bigInt(x);\n\tvar y = g.modPow(x, p);\n\tvar ybuf = bigintToMpBuf(y);\n\treturn (ybuf);\n}\n\nfunction addRSAMissing(key) {\n\tassert.object(key);\n\tassertCompatible(key, PrivateKey, [1, 1]);\n\ttry {\n\t\tvar bigInt = require('jsbn').BigInteger;\n\t} catch (e) {\n\t\tthrow (new Error('To write a PEM private key from ' +\n\t\t 'this source, the node jsbn lib is required.'));\n\t}\n\n\tvar d = new bigInt(key.part.d.data);\n\tvar buf;\n\n\tif (!key.part.dmodp) {\n\t\tvar p = new bigInt(key.part.p.data);\n\t\tvar dmodp = d.mod(p.subtract(1));\n\n\t\tbuf = bigintToMpBuf(dmodp);\n\t\tkey.part.dmodp = {name: 'dmodp', data: buf};\n\t\tkey.parts.push(key.part.dmodp);\n\t}\n\tif (!key.part.dmodq) {\n\t\tvar q = new bigInt(key.part.q.data);\n\t\tvar dmodq = d.mod(q.subtract(1));\n\n\t\tbuf = bigintToMpBuf(dmodq);\n\t\tkey.part.dmodq = {name: 'dmodq', data: buf};\n\t\tkey.parts.push(key.part.dmodq);\n\t}\n}\n\nfunction opensshCipherInfo(cipher) {\n\tvar inf = {};\n\tswitch (cipher) {\n\tcase '3des-cbc':\n\t\tinf.keySize = 24;\n\t\tinf.blockSize = 8;\n\t\tinf.opensslName = 'des-ede3-cbc';\n\t\tbreak;\n\tcase 'blowfish-cbc':\n\t\tinf.keySize = 16;\n\t\tinf.blockSize = 8;\n\t\tinf.opensslName = 'bf-cbc';\n\t\tbreak;\n\tcase 'aes128-cbc':\n\tcase 'aes128-ctr':\n\tcase 'aes128-gcm@openssh.com':\n\t\tinf.keySize = 16;\n\t\tinf.blockSize = 16;\n\t\tinf.opensslName = 'aes-128-' + cipher.slice(7, 10);\n\t\tbreak;\n\tcase 'aes192-cbc':\n\tcase 'aes192-ctr':\n\tcase 'aes192-gcm@openssh.com':\n\t\tinf.keySize = 24;\n\t\tinf.blockSize = 16;\n\t\tinf.opensslName = 'aes-192-' + cipher.slice(7, 10);\n\t\tbreak;\n\tcase 'aes256-cbc':\n\tcase 'aes256-ctr':\n\tcase 'aes256-gcm@openssh.com':\n\t\tinf.keySize = 32;\n\t\tinf.blockSize = 16;\n\t\tinf.opensslName = 'aes-256-' + cipher.slice(7, 10);\n\t\tbreak;\n\tdefault:\n\t\tthrow (new Error(\n\t\t 'Unsupported openssl cipher \"' + cipher + '\"'));\n\t}\n\treturn (inf);\n}\n"},{"id":20,"identifier":"external \"assert\"","name":"external \"assert\"","index":85,"index2":82,"size":42,"cacheable":false,"built":false,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\glob.js","issuerId":68,"issuerName":"./~/glob/glob.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":9,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\assert-plus\\assert.js","module":"./~/assert-plus/assert.js","moduleName":"./~/assert-plus/assert.js","type":"cjs require","userRequest":"assert","loc":"4:13-30"},{"moduleId":68,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\glob.js","module":"./~/glob/glob.js","moduleName":"./~/glob/glob.js","type":"cjs require","userRequest":"assert","loc":"50:13-30"},{"moduleId":213,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\glob\\sync.js","module":"./~/glob/sync.js","moduleName":"./~/glob/sync.js","type":"cjs require","userRequest":"assert","loc":"11:13-30"},{"moduleId":231,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\rimraf\\rimraf.js","module":"./~/rimraf/rimraf.js","moduleName":"./~/rimraf/rimraf.js","type":"cjs require","userRequest":"assert","loc":"4:13-30"},{"moduleId":283,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\extsprintf\\lib\\extsprintf.js","module":"./~/extsprintf/lib/extsprintf.js","moduleName":"./~/extsprintf/lib/extsprintf.js","type":"cjs require","userRequest":"assert","loc":"5:17-34"},{"moduleId":286,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\graceful-fs\\graceful-fs.js","module":"./~/graceful-fs/graceful-fs.js","moduleName":"./~/graceful-fs/graceful-fs.js","type":"cjs require","userRequest":"assert","loc":"23:4-21"},{"moduleId":316,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\signal-exit\\index.js","module":"./~/signal-exit/index.js","moduleName":"./~/signal-exit/index.js","type":"cjs require","userRequest":"assert","loc":"4:13-30"},{"moduleId":350,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\asn1\\lib\\ber\\reader.js","module":"./~/asn1/lib/ber/reader.js","moduleName":"./~/asn1/lib/ber/reader.js","type":"cjs require","userRequest":"assert","loc":"3:13-30"},{"moduleId":351,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\asn1\\lib\\ber\\writer.js","module":"./~/asn1/lib/ber/writer.js","moduleName":"./~/asn1/lib/ber/writer.js","type":"cjs require","userRequest":"assert","loc":"3:13-30"},{"moduleId":536,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\objects\\choices.js","module":"./~/inquirer/lib/objects/choices.js","moduleName":"./~/inquirer/lib/objects/choices.js","type":"cjs require","userRequest":"assert","loc":"2:13-30"},{"moduleId":668,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\tunnel-agent\\index.js","module":"./~/tunnel-agent/index.js","moduleName":"./~/tunnel-agent/index.js","type":"cjs require","userRequest":"assert","loc":"8:13-30"},{"moduleId":673,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\verror\\lib\\verror.js","module":"./~/verror/lib/verror.js","moduleName":"./~/verror/lib/verror.js","type":"cjs require","userRequest":"assert","loc":"5:17-34"}],"usedExports":true,"providedExports":null,"depth":3},{"id":21,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\algs.js","name":"./~/sshpk/lib/algs.js","index":466,"index2":449,"size":4842,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\key.js","issuerId":22,"issuerName":"./~/sshpk/lib/key.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":22,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\key.js","module":"./~/sshpk/lib/key.js","moduleName":"./~/sshpk/lib/key.js","type":"cjs require","userRequest":"./algs","loc":"6:11-28"},{"moduleId":23,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\private-key.js","module":"./~/sshpk/lib/private-key.js","moduleName":"./~/sshpk/lib/private-key.js","type":"cjs require","userRequest":"./algs","loc":"6:11-28"},{"moduleId":49,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\signature.js","module":"./~/sshpk/lib/signature.js","moduleName":"./~/sshpk/lib/signature.js","type":"cjs require","userRequest":"./algs","loc":"6:11-28"},{"moduleId":57,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pem.js","module":"./~/sshpk/lib/formats/pem.js","moduleName":"./~/sshpk/lib/formats/pem.js","type":"cjs require","userRequest":"../algs","loc":"11:11-29"},{"moduleId":72,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\rfc4253.js","module":"./~/sshpk/lib/formats/rfc4253.js","moduleName":"./~/sshpk/lib/formats/rfc4253.js","type":"cjs require","userRequest":"../algs","loc":"17:11-29"},{"moduleId":109,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\certificate.js","module":"./~/sshpk/lib/certificate.js","moduleName":"./~/sshpk/lib/certificate.js","type":"cjs require","userRequest":"./algs","loc":"6:11-28"},{"moduleId":110,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\fingerprint.js","module":"./~/sshpk/lib/fingerprint.js","moduleName":"./~/sshpk/lib/fingerprint.js","type":"cjs require","userRequest":"./algs","loc":"6:11-28"},{"moduleId":111,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs8.js","module":"./~/sshpk/lib/formats/pkcs8.js","moduleName":"./~/sshpk/lib/formats/pkcs8.js","type":"cjs require","userRequest":"../algs","loc":"15:11-29"},{"moduleId":112,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\identity.js","module":"./~/sshpk/lib/identity.js","moduleName":"./~/sshpk/lib/identity.js","type":"cjs require","userRequest":"./algs","loc":"6:11-28"},{"moduleId":136,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh-private.js","module":"./~/sshpk/lib/formats/ssh-private.js","moduleName":"./~/sshpk/lib/formats/ssh-private.js","type":"cjs require","userRequest":"../algs","loc":"11:11-29"},{"moduleId":232,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs1.js","module":"./~/sshpk/lib/formats/pkcs1.js","moduleName":"./~/sshpk/lib/formats/pkcs1.js","type":"cjs require","userRequest":"../algs","loc":"12:11-29"},{"moduleId":319,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\dhe.js","module":"./~/sshpk/lib/dhe.js","moduleName":"./~/sshpk/lib/dhe.js","type":"cjs require","userRequest":"./algs","loc":"11:11-28"},{"moduleId":323,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509.js","module":"./~/sshpk/lib/formats/x509.js","moduleName":"./~/sshpk/lib/formats/x509.js","type":"cjs require","userRequest":"../algs","loc":"13:11-29"},{"moduleId":654,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\openssh-cert.js","module":"./~/sshpk/lib/formats/openssh-cert.js","moduleName":"./~/sshpk/lib/formats/openssh-cert.js","type":"cjs require","userRequest":"../algs","loc":"18:11-29"},{"moduleId":655,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509-pem.js","module":"./~/sshpk/lib/formats/x509-pem.js","moduleName":"./~/sshpk/lib/formats/x509-pem.js","type":"cjs require","userRequest":"../algs","loc":"14:11-29"}],"usedExports":true,"providedExports":null,"depth":9,"source":"// Copyright 2015 Joyent, Inc.\n\nvar algInfo = {\n\t'dsa': {\n\t\tparts: ['p', 'q', 'g', 'y'],\n\t\tsizePart: 'p'\n\t},\n\t'rsa': {\n\t\tparts: ['e', 'n'],\n\t\tsizePart: 'n'\n\t},\n\t'ecdsa': {\n\t\tparts: ['curve', 'Q'],\n\t\tsizePart: 'Q'\n\t},\n\t'ed25519': {\n\t\tparts: ['R'],\n\t\tnormalize: false,\n\t\tsizePart: 'R'\n\t}\n};\nalgInfo['curve25519'] = algInfo['ed25519'];\n\nvar algPrivInfo = {\n\t'dsa': {\n\t\tparts: ['p', 'q', 'g', 'y', 'x']\n\t},\n\t'rsa': {\n\t\tparts: ['n', 'e', 'd', 'iqmp', 'p', 'q']\n\t},\n\t'ecdsa': {\n\t\tparts: ['curve', 'Q', 'd']\n\t},\n\t'ed25519': {\n\t\tparts: ['R', 'r'],\n\t\tnormalize: false\n\t}\n};\nalgPrivInfo['curve25519'] = algPrivInfo['ed25519'];\n\nvar hashAlgs = {\n\t'md5': true,\n\t'sha1': true,\n\t'sha256': true,\n\t'sha384': true,\n\t'sha512': true\n};\n\n/*\n * Taken from\n * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf\n */\nvar curves = {\n\t'nistp256': {\n\t\tsize: 256,\n\t\tpkcs8oid: '1.2.840.10045.3.1.7',\n\t\tp: new Buffer(('00' +\n\t\t 'ffffffff 00000001 00000000 00000000' +\n\t\t '00000000 ffffffff ffffffff ffffffff').\n\t\t replace(/ /g, ''), 'hex'),\n\t\ta: new Buffer(('00' +\n\t\t 'FFFFFFFF 00000001 00000000 00000000' +\n\t\t '00000000 FFFFFFFF FFFFFFFF FFFFFFFC').\n\t\t replace(/ /g, ''), 'hex'),\n\t\tb: new Buffer((\n\t\t '5ac635d8 aa3a93e7 b3ebbd55 769886bc' +\n\t\t '651d06b0 cc53b0f6 3bce3c3e 27d2604b').\n\t\t replace(/ /g, ''), 'hex'),\n\t\ts: new Buffer(('00' +\n\t\t 'c49d3608 86e70493 6a6678e1 139d26b7' +\n\t\t '819f7e90').\n\t\t replace(/ /g, ''), 'hex'),\n\t\tn: new Buffer(('00' +\n\t\t 'ffffffff 00000000 ffffffff ffffffff' +\n\t\t 'bce6faad a7179e84 f3b9cac2 fc632551').\n\t\t replace(/ /g, ''), 'hex'),\n\t\tG: new Buffer(('04' +\n\t\t '6b17d1f2 e12c4247 f8bce6e5 63a440f2' +\n\t\t '77037d81 2deb33a0 f4a13945 d898c296' +\n\t\t '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' +\n\t\t '2bce3357 6b315ece cbb64068 37bf51f5').\n\t\t replace(/ /g, ''), 'hex')\n\t},\n\t'nistp384': {\n\t\tsize: 384,\n\t\tpkcs8oid: '1.3.132.0.34',\n\t\tp: new Buffer(('00' +\n\t\t 'ffffffff ffffffff ffffffff ffffffff' +\n\t\t 'ffffffff ffffffff ffffffff fffffffe' +\n\t\t 'ffffffff 00000000 00000000 ffffffff').\n\t\t replace(/ /g, ''), 'hex'),\n\t\ta: new Buffer(('00' +\n\t\t 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +\n\t\t 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' +\n\t\t 'FFFFFFFF 00000000 00000000 FFFFFFFC').\n\t\t replace(/ /g, ''), 'hex'),\n\t\tb: new Buffer((\n\t\t 'b3312fa7 e23ee7e4 988e056b e3f82d19' +\n\t\t '181d9c6e fe814112 0314088f 5013875a' +\n\t\t 'c656398d 8a2ed19d 2a85c8ed d3ec2aef').\n\t\t replace(/ /g, ''), 'hex'),\n\t\ts: new Buffer(('00' +\n\t\t 'a335926a a319a27a 1d00896a 6773a482' +\n\t\t '7acdac73').\n\t\t replace(/ /g, ''), 'hex'),\n\t\tn: new Buffer(('00' +\n\t\t 'ffffffff ffffffff ffffffff ffffffff' +\n\t\t 'ffffffff ffffffff c7634d81 f4372ddf' +\n\t\t '581a0db2 48b0a77a ecec196a ccc52973').\n\t\t replace(/ /g, ''), 'hex'),\n\t\tG: new Buffer(('04' +\n\t\t 'aa87ca22 be8b0537 8eb1c71e f320ad74' +\n\t\t '6e1d3b62 8ba79b98 59f741e0 82542a38' +\n\t\t '5502f25d bf55296c 3a545e38 72760ab7' +\n\t\t '3617de4a 96262c6f 5d9e98bf 9292dc29' +\n\t\t 'f8f41dbd 289a147c e9da3113 b5f0b8c0' +\n\t\t '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f').\n\t\t replace(/ /g, ''), 'hex')\n\t},\n\t'nistp521': {\n\t\tsize: 521,\n\t\tpkcs8oid: '1.3.132.0.35',\n\t\tp: new Buffer((\n\t\t '01ffffff ffffffff ffffffff ffffffff' +\n\t\t 'ffffffff ffffffff ffffffff ffffffff' +\n\t\t 'ffffffff ffffffff ffffffff ffffffff' +\n\t\t 'ffffffff ffffffff ffffffff ffffffff' +\n\t\t 'ffff').replace(/ /g, ''), 'hex'),\n\t\ta: new Buffer(('01FF' +\n\t\t 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +\n\t\t 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +\n\t\t 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +\n\t\t 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC').\n\t\t replace(/ /g, ''), 'hex'),\n\t\tb: new Buffer(('51' +\n\t\t '953eb961 8e1c9a1f 929a21a0 b68540ee' +\n\t\t 'a2da725b 99b315f3 b8b48991 8ef109e1' +\n\t\t '56193951 ec7e937b 1652c0bd 3bb1bf07' +\n\t\t '3573df88 3d2c34f1 ef451fd4 6b503f00').\n\t\t replace(/ /g, ''), 'hex'),\n\t\ts: new Buffer(('00' +\n\t\t 'd09e8800 291cb853 96cc6717 393284aa' +\n\t\t 'a0da64ba').replace(/ /g, ''), 'hex'),\n\t\tn: new Buffer(('01ff' +\n\t\t 'ffffffff ffffffff ffffffff ffffffff' +\n\t\t 'ffffffff ffffffff ffffffff fffffffa' +\n\t\t '51868783 bf2f966b 7fcc0148 f709a5d0' +\n\t\t '3bb5c9b8 899c47ae bb6fb71e 91386409').\n\t\t replace(/ /g, ''), 'hex'),\n\t\tG: new Buffer(('04' +\n\t\t '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' +\n\t\t '9c648139 053fb521 f828af60 6b4d3dba' +\n\t\t 'a14b5e77 efe75928 fe1dc127 a2ffa8de' +\n\t\t '3348b3c1 856a429b f97e7e31 c2e5bd66' +\n\t\t '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' +\n\t\t '98f54449 579b4468 17afbd17 273e662c' +\n\t\t '97ee7299 5ef42640 c550b901 3fad0761' +\n\t\t '353c7086 a272c240 88be9476 9fd16650').\n\t\t replace(/ /g, ''), 'hex')\n\t}\n};\n\nmodule.exports = {\n\tinfo: algInfo,\n\tprivInfo: algPrivInfo,\n\thashAlgs: hashAlgs,\n\tcurves: curves\n};\n"},{"id":22,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\key.js","name":"./~/sshpk/lib/key.js","index":465,"index2":488,"size":7467,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\index.js","issuerId":233,"issuerName":"./~/sshpk/lib/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":23,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\private-key.js","module":"./~/sshpk/lib/private-key.js","moduleName":"./~/sshpk/lib/private-key.js","type":"cjs require","userRequest":"./key","loc":"25:10-26"},{"moduleId":57,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pem.js","module":"./~/sshpk/lib/formats/pem.js","moduleName":"./~/sshpk/lib/formats/pem.js","type":"cjs require","userRequest":"../key","loc":"13:10-27"},{"moduleId":72,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\rfc4253.js","module":"./~/sshpk/lib/formats/rfc4253.js","moduleName":"./~/sshpk/lib/formats/rfc4253.js","type":"cjs require","userRequest":"../key","loc":"19:10-27"},{"moduleId":109,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\certificate.js","module":"./~/sshpk/lib/certificate.js","moduleName":"./~/sshpk/lib/certificate.js","type":"cjs require","userRequest":"./key","loc":"13:10-26"},{"moduleId":110,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\fingerprint.js","module":"./~/sshpk/lib/fingerprint.js","moduleName":"./~/sshpk/lib/fingerprint.js","type":"cjs require","userRequest":"./key","loc":"9:10-26"},{"moduleId":111,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs8.js","module":"./~/sshpk/lib/formats/pkcs8.js","moduleName":"./~/sshpk/lib/formats/pkcs8.js","type":"cjs require","userRequest":"../key","loc":"17:10-27"},{"moduleId":136,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh-private.js","module":"./~/sshpk/lib/formats/ssh-private.js","moduleName":"./~/sshpk/lib/formats/ssh-private.js","type":"cjs require","userRequest":"../key","loc":"15:10-27"},{"moduleId":232,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs1.js","module":"./~/sshpk/lib/formats/pkcs1.js","moduleName":"./~/sshpk/lib/formats/pkcs1.js","type":"cjs require","userRequest":"../key","loc":"15:10-27"},{"moduleId":233,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\index.js","module":"./~/sshpk/lib/index.js","moduleName":"./~/sshpk/lib/index.js","type":"cjs require","userRequest":"./key","loc":"3:10-26"},{"moduleId":319,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\dhe.js","module":"./~/sshpk/lib/dhe.js","moduleName":"./~/sshpk/lib/dhe.js","type":"cjs require","userRequest":"./key","loc":"16:10-26"},{"moduleId":321,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\auto.js","module":"./~/sshpk/lib/formats/auto.js","moduleName":"./~/sshpk/lib/formats/auto.js","type":"cjs require","userRequest":"../key","loc":"10:10-27"},{"moduleId":322,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh.js","module":"./~/sshpk/lib/formats/ssh.js","moduleName":"./~/sshpk/lib/formats/ssh.js","type":"cjs require","userRequest":"../key","loc":"11:10-27"},{"moduleId":323,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509.js","module":"./~/sshpk/lib/formats/x509.js","moduleName":"./~/sshpk/lib/formats/x509.js","type":"cjs require","userRequest":"../key","loc":"15:10-27"},{"moduleId":654,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\openssh-cert.js","module":"./~/sshpk/lib/formats/openssh-cert.js","moduleName":"./~/sshpk/lib/formats/openssh-cert.js","type":"cjs require","userRequest":"../key","loc":"19:10-27"},{"moduleId":655,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509-pem.js","module":"./~/sshpk/lib/formats/x509-pem.js","moduleName":"./~/sshpk/lib/formats/x509-pem.js","type":"cjs require","userRequest":"../key","loc":"16:10-27"}],"usedExports":true,"providedExports":null,"depth":8,"source":"// Copyright 2017 Joyent, Inc.\n\nmodule.exports = Key;\n\nvar assert = require('assert-plus');\nvar algs = require('./algs');\nvar crypto = require('crypto');\nvar Fingerprint = require('./fingerprint');\nvar Signature = require('./signature');\nvar DiffieHellman = require('./dhe').DiffieHellman;\nvar errs = require('./errors');\nvar utils = require('./utils');\nvar PrivateKey = require('./private-key');\nvar edCompat;\n\ntry {\n\tedCompat = require('./ed-compat');\n} catch (e) {\n\t/* Just continue through, and bail out if we try to use it. */\n}\n\nvar InvalidAlgorithmError = errs.InvalidAlgorithmError;\nvar KeyParseError = errs.KeyParseError;\n\nvar formats = {};\nformats['auto'] = require('./formats/auto');\nformats['pem'] = require('./formats/pem');\nformats['pkcs1'] = require('./formats/pkcs1');\nformats['pkcs8'] = require('./formats/pkcs8');\nformats['rfc4253'] = require('./formats/rfc4253');\nformats['ssh'] = require('./formats/ssh');\nformats['ssh-private'] = require('./formats/ssh-private');\nformats['openssh'] = formats['ssh-private'];\n\nfunction Key(opts) {\n\tassert.object(opts, 'options');\n\tassert.arrayOfObject(opts.parts, 'options.parts');\n\tassert.string(opts.type, 'options.type');\n\tassert.optionalString(opts.comment, 'options.comment');\n\n\tvar algInfo = algs.info[opts.type];\n\tif (typeof (algInfo) !== 'object')\n\t\tthrow (new InvalidAlgorithmError(opts.type));\n\n\tvar partLookup = {};\n\tfor (var i = 0; i < opts.parts.length; ++i) {\n\t\tvar part = opts.parts[i];\n\t\tpartLookup[part.name] = part;\n\t}\n\n\tthis.type = opts.type;\n\tthis.parts = opts.parts;\n\tthis.part = partLookup;\n\tthis.comment = undefined;\n\tthis.source = opts.source;\n\n\t/* for speeding up hashing/fingerprint operations */\n\tthis._rfc4253Cache = opts._rfc4253Cache;\n\tthis._hashCache = {};\n\n\tvar sz;\n\tthis.curve = undefined;\n\tif (this.type === 'ecdsa') {\n\t\tvar curve = this.part.curve.data.toString();\n\t\tthis.curve = curve;\n\t\tsz = algs.curves[curve].size;\n\t} else if (this.type === 'ed25519') {\n\t\tsz = 256;\n\t\tthis.curve = 'curve25519';\n\t} else {\n\t\tvar szPart = this.part[algInfo.sizePart];\n\t\tsz = szPart.data.length;\n\t\tsz = sz * 8 - utils.countZeros(szPart.data);\n\t}\n\tthis.size = sz;\n}\n\nKey.formats = formats;\n\nKey.prototype.toBuffer = function (format, options) {\n\tif (format === undefined)\n\t\tformat = 'ssh';\n\tassert.string(format, 'format');\n\tassert.object(formats[format], 'formats[format]');\n\tassert.optionalObject(options, 'options');\n\n\tif (format === 'rfc4253') {\n\t\tif (this._rfc4253Cache === undefined)\n\t\t\tthis._rfc4253Cache = formats['rfc4253'].write(this);\n\t\treturn (this._rfc4253Cache);\n\t}\n\n\treturn (formats[format].write(this, options));\n};\n\nKey.prototype.toString = function (format, options) {\n\treturn (this.toBuffer(format, options).toString());\n};\n\nKey.prototype.hash = function (algo) {\n\tassert.string(algo, 'algorithm');\n\talgo = algo.toLowerCase();\n\tif (algs.hashAlgs[algo] === undefined)\n\t\tthrow (new InvalidAlgorithmError(algo));\n\n\tif (this._hashCache[algo])\n\t\treturn (this._hashCache[algo]);\n\n\tvar hash = crypto.createHash(algo).\n\t update(this.toBuffer('rfc4253')).digest();\n\tthis._hashCache[algo] = hash;\n\treturn (hash);\n};\n\nKey.prototype.fingerprint = function (algo) {\n\tif (algo === undefined)\n\t\talgo = 'sha256';\n\tassert.string(algo, 'algorithm');\n\tvar opts = {\n\t\ttype: 'key',\n\t\thash: this.hash(algo),\n\t\talgorithm: algo\n\t};\n\treturn (new Fingerprint(opts));\n};\n\nKey.prototype.defaultHashAlgorithm = function () {\n\tvar hashAlgo = 'sha1';\n\tif (this.type === 'rsa')\n\t\thashAlgo = 'sha256';\n\tif (this.type === 'dsa' && this.size > 1024)\n\t\thashAlgo = 'sha256';\n\tif (this.type === 'ed25519')\n\t\thashAlgo = 'sha512';\n\tif (this.type === 'ecdsa') {\n\t\tif (this.size <= 256)\n\t\t\thashAlgo = 'sha256';\n\t\telse if (this.size <= 384)\n\t\t\thashAlgo = 'sha384';\n\t\telse\n\t\t\thashAlgo = 'sha512';\n\t}\n\treturn (hashAlgo);\n};\n\nKey.prototype.createVerify = function (hashAlgo) {\n\tif (hashAlgo === undefined)\n\t\thashAlgo = this.defaultHashAlgorithm();\n\tassert.string(hashAlgo, 'hash algorithm');\n\n\t/* ED25519 is not supported by OpenSSL, use a javascript impl. */\n\tif (this.type === 'ed25519' && edCompat !== undefined)\n\t\treturn (new edCompat.Verifier(this, hashAlgo));\n\tif (this.type === 'curve25519')\n\t\tthrow (new Error('Curve25519 keys are not suitable for ' +\n\t\t 'signing or verification'));\n\n\tvar v, nm, err;\n\ttry {\n\t\tnm = hashAlgo.toUpperCase();\n\t\tv = crypto.createVerify(nm);\n\t} catch (e) {\n\t\terr = e;\n\t}\n\tif (v === undefined || (err instanceof Error &&\n\t err.message.match(/Unknown message digest/))) {\n\t\tnm = 'RSA-';\n\t\tnm += hashAlgo.toUpperCase();\n\t\tv = crypto.createVerify(nm);\n\t}\n\tassert.ok(v, 'failed to create verifier');\n\tvar oldVerify = v.verify.bind(v);\n\tvar key = this.toBuffer('pkcs8');\n\tvar curve = this.curve;\n\tvar self = this;\n\tv.verify = function (signature, fmt) {\n\t\tif (Signature.isSignature(signature, [2, 0])) {\n\t\t\tif (signature.type !== self.type)\n\t\t\t\treturn (false);\n\t\t\tif (signature.hashAlgorithm &&\n\t\t\t signature.hashAlgorithm !== hashAlgo)\n\t\t\t\treturn (false);\n\t\t\tif (signature.curve && self.type === 'ecdsa' &&\n\t\t\t signature.curve !== curve)\n\t\t\t\treturn (false);\n\t\t\treturn (oldVerify(key, signature.toBuffer('asn1')));\n\n\t\t} else if (typeof (signature) === 'string' ||\n\t\t Buffer.isBuffer(signature)) {\n\t\t\treturn (oldVerify(key, signature, fmt));\n\n\t\t/*\n\t\t * Avoid doing this on valid arguments, walking the prototype\n\t\t * chain can be quite slow.\n\t\t */\n\t\t} else if (Signature.isSignature(signature, [1, 0])) {\n\t\t\tthrow (new Error('signature was created by too old ' +\n\t\t\t 'a version of sshpk and cannot be verified'));\n\n\t\t} else {\n\t\t\tthrow (new TypeError('signature must be a string, ' +\n\t\t\t 'Buffer, or Signature object'));\n\t\t}\n\t};\n\treturn (v);\n};\n\nKey.prototype.createDiffieHellman = function () {\n\tif (this.type === 'rsa')\n\t\tthrow (new Error('RSA keys do not support Diffie-Hellman'));\n\n\treturn (new DiffieHellman(this));\n};\nKey.prototype.createDH = Key.prototype.createDiffieHellman;\n\nKey.parse = function (data, format, options) {\n\tif (typeof (data) !== 'string')\n\t\tassert.buffer(data, 'data');\n\tif (format === undefined)\n\t\tformat = 'auto';\n\tassert.string(format, 'format');\n\tif (typeof (options) === 'string')\n\t\toptions = { filename: options };\n\tassert.optionalObject(options, 'options');\n\tif (options === undefined)\n\t\toptions = {};\n\tassert.optionalString(options.filename, 'options.filename');\n\tif (options.filename === undefined)\n\t\toptions.filename = '(unnamed)';\n\n\tassert.object(formats[format], 'formats[format]');\n\n\ttry {\n\t\tvar k = formats[format].read(data, options);\n\t\tif (k instanceof PrivateKey)\n\t\t\tk = k.toPublic();\n\t\tif (!k.comment)\n\t\t\tk.comment = options.filename;\n\t\treturn (k);\n\t} catch (e) {\n\t\tif (e.name === 'KeyEncryptedError')\n\t\t\tthrow (e);\n\t\tthrow (new KeyParseError(options.filename, format, e));\n\t}\n};\n\nKey.isKey = function (obj, ver) {\n\treturn (utils.isCompatible(obj, Key, ver));\n};\n\n/*\n * API versions for Key:\n * [1,0] -- initial ver, may take Signature for createVerify or may not\n * [1,1] -- added pkcs1, pkcs8 formats\n * [1,2] -- added auto, ssh-private, openssh formats\n * [1,3] -- added defaultHashAlgorithm\n * [1,4] -- added ed support, createDH\n * [1,5] -- first explicitly tagged version\n */\nKey.prototype._sshpkApiVersion = [1, 5];\n\nKey._oldVersionDetect = function (obj) {\n\tassert.func(obj.toBuffer);\n\tassert.func(obj.fingerprint);\n\tif (obj.createDH)\n\t\treturn ([1, 4]);\n\tif (obj.defaultHashAlgorithm)\n\t\treturn ([1, 3]);\n\tif (obj.formats['auto'])\n\t\treturn ([1, 2]);\n\tif (obj.formats['pkcs1'])\n\t\treturn ([1, 1]);\n\treturn ([1, 0]);\n};\n"},{"id":23,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\private-key.js","name":"./~/sshpk/lib/private-key.js","index":472,"index2":479,"size":6675,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\index.js","issuerId":233,"issuerName":"./~/sshpk/lib/index.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":19,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\utils.js","module":"./~/sshpk/lib/utils.js","moduleName":"./~/sshpk/lib/utils.js","type":"cjs require","userRequest":"./private-key","loc":"17:17-41"},{"moduleId":22,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\key.js","module":"./~/sshpk/lib/key.js","moduleName":"./~/sshpk/lib/key.js","type":"cjs require","userRequest":"./private-key","loc":"13:17-41"},{"moduleId":57,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pem.js","module":"./~/sshpk/lib/formats/pem.js","moduleName":"./~/sshpk/lib/formats/pem.js","type":"cjs require","userRequest":"../private-key","loc":"14:17-42"},{"moduleId":72,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\rfc4253.js","module":"./~/sshpk/lib/formats/rfc4253.js","moduleName":"./~/sshpk/lib/formats/rfc4253.js","type":"cjs require","userRequest":"../private-key","loc":"20:17-42"},{"moduleId":109,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\certificate.js","module":"./~/sshpk/lib/certificate.js","moduleName":"./~/sshpk/lib/certificate.js","type":"cjs require","userRequest":"./private-key","loc":"14:17-41"},{"moduleId":111,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs8.js","module":"./~/sshpk/lib/formats/pkcs8.js","moduleName":"./~/sshpk/lib/formats/pkcs8.js","type":"cjs require","userRequest":"../private-key","loc":"18:17-42"},{"moduleId":136,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh-private.js","module":"./~/sshpk/lib/formats/ssh-private.js","moduleName":"./~/sshpk/lib/formats/ssh-private.js","type":"cjs require","userRequest":"../private-key","loc":"16:17-42"},{"moduleId":232,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\pkcs1.js","module":"./~/sshpk/lib/formats/pkcs1.js","moduleName":"./~/sshpk/lib/formats/pkcs1.js","type":"cjs require","userRequest":"../private-key","loc":"16:17-42"},{"moduleId":233,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\index.js","module":"./~/sshpk/lib/index.js","moduleName":"./~/sshpk/lib/index.js","type":"cjs require","userRequest":"./private-key","loc":"6:17-41"},{"moduleId":319,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\dhe.js","module":"./~/sshpk/lib/dhe.js","moduleName":"./~/sshpk/lib/dhe.js","type":"cjs require","userRequest":"./private-key","loc":"17:17-41"},{"moduleId":321,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\auto.js","module":"./~/sshpk/lib/formats/auto.js","moduleName":"./~/sshpk/lib/formats/auto.js","type":"cjs require","userRequest":"../private-key","loc":"11:17-42"},{"moduleId":322,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\ssh.js","module":"./~/sshpk/lib/formats/ssh.js","moduleName":"./~/sshpk/lib/formats/ssh.js","type":"cjs require","userRequest":"../private-key","loc":"12:17-42"},{"moduleId":323,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509.js","module":"./~/sshpk/lib/formats/x509.js","moduleName":"./~/sshpk/lib/formats/x509.js","type":"cjs require","userRequest":"../private-key","loc":"16:17-42"},{"moduleId":654,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\openssh-cert.js","module":"./~/sshpk/lib/formats/openssh-cert.js","moduleName":"./~/sshpk/lib/formats/openssh-cert.js","type":"cjs require","userRequest":"../private-key","loc":"20:17-42"},{"moduleId":655,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\sshpk\\lib\\formats\\x509-pem.js","module":"./~/sshpk/lib/formats/x509-pem.js","moduleName":"./~/sshpk/lib/formats/x509-pem.js","type":"cjs require","userRequest":"../private-key","loc":"17:17-42"}],"usedExports":true,"providedExports":null,"depth":8,"source":"// Copyright 2017 Joyent, Inc.\n\nmodule.exports = PrivateKey;\n\nvar assert = require('assert-plus');\nvar algs = require('./algs');\nvar crypto = require('crypto');\nvar Fingerprint = require('./fingerprint');\nvar Signature = require('./signature');\nvar errs = require('./errors');\nvar util = require('util');\nvar utils = require('./utils');\nvar dhe = require('./dhe');\nvar generateECDSA = dhe.generateECDSA;\nvar generateED25519 = dhe.generateED25519;\nvar edCompat;\nvar ed;\n\ntry {\n\tedCompat = require('./ed-compat');\n} catch (e) {\n\t/* Just continue through, and bail out if we try to use it. */\n}\n\nvar Key = require('./key');\n\nvar InvalidAlgorithmError = errs.InvalidAlgorithmError;\nvar KeyParseError = errs.KeyParseError;\nvar KeyEncryptedError = errs.KeyEncryptedError;\n\nvar formats = {};\nformats['auto'] = require('./formats/auto');\nformats['pem'] = require('./formats/pem');\nformats['pkcs1'] = require('./formats/pkcs1');\nformats['pkcs8'] = require('./formats/pkcs8');\nformats['rfc4253'] = require('./formats/rfc4253');\nformats['ssh-private'] = require('./formats/ssh-private');\nformats['openssh'] = formats['ssh-private'];\nformats['ssh'] = formats['ssh-private'];\n\nfunction PrivateKey(opts) {\n\tassert.object(opts, 'options');\n\tKey.call(this, opts);\n\n\tthis._pubCache = undefined;\n}\nutil.inherits(PrivateKey, Key);\n\nPrivateKey.formats = formats;\n\nPrivateKey.prototype.toBuffer = function (format, options) {\n\tif (format === undefined)\n\t\tformat = 'pkcs1';\n\tassert.string(format, 'format');\n\tassert.object(formats[format], 'formats[format]');\n\tassert.optionalObject(options, 'options');\n\n\treturn (formats[format].write(this, options));\n};\n\nPrivateKey.prototype.hash = function (algo) {\n\treturn (this.toPublic().hash(algo));\n};\n\nPrivateKey.prototype.toPublic = function () {\n\tif (this._pubCache)\n\t\treturn (this._pubCache);\n\n\tvar algInfo = algs.info[this.type];\n\tvar pubParts = [];\n\tfor (var i = 0; i < algInfo.parts.length; ++i) {\n\t\tvar p = algInfo.parts[i];\n\t\tpubParts.push(this.part[p]);\n\t}\n\n\tthis._pubCache = new Key({\n\t\ttype: this.type,\n\t\tsource: this,\n\t\tparts: pubParts\n\t});\n\tif (this.comment)\n\t\tthis._pubCache.comment = this.comment;\n\treturn (this._pubCache);\n};\n\nPrivateKey.prototype.derive = function (newType, newSize) {\n\tassert.string(newType, 'type');\n\tassert.optionalNumber(newSize, 'size');\n\tvar priv, pub;\n\n\tif (this.type === 'ed25519' && newType === 'curve25519') {\n\t\tif (ed === undefined)\n\t\t\ted = require('jodid25519');\n\n\t\tpriv = this.part.r.data;\n\t\tif (priv[0] === 0x00)\n\t\t\tpriv = priv.slice(1);\n\t\tpriv = priv.slice(0, 32);\n\n\t\tpub = ed.dh.publicKey(priv);\n\t\tpriv = utils.mpNormalize(Buffer.concat([priv, pub]));\n\n\t\treturn (new PrivateKey({\n\t\t\ttype: 'curve25519',\n\t\t\tparts: [\n\t\t\t\t{ name: 'R', data: utils.mpNormalize(pub) },\n\t\t\t\t{ name: 'r', data: priv }\n\t\t\t]\n\t\t}));\n\t} else if (this.type === 'curve25519' && newType === 'ed25519') {\n\t\tif (ed === undefined)\n\t\t\ted = require('jodid25519');\n\n\t\tpriv = this.part.r.data;\n\t\tif (priv[0] === 0x00)\n\t\t\tpriv = priv.slice(1);\n\t\tpriv = priv.slice(0, 32);\n\n\t\tpub = ed.eddsa.publicKey(priv.toString('binary'));\n\t\tpub = new Buffer(pub, 'binary');\n\n\t\tpriv = utils.mpNormalize(Buffer.concat([priv, pub]));\n\n\t\treturn (new PrivateKey({\n\t\t\ttype: 'ed25519',\n\t\t\tparts: [\n\t\t\t\t{ name: 'R', data: utils.mpNormalize(pub) },\n\t\t\t\t{ name: 'r', data: priv }\n\t\t\t]\n\t\t}));\n\t}\n\tthrow (new Error('Key derivation not supported from ' + this.type +\n\t ' to ' + newType));\n};\n\nPrivateKey.prototype.createVerify = function (hashAlgo) {\n\treturn (this.toPublic().createVerify(hashAlgo));\n};\n\nPrivateKey.prototype.createSign = function (hashAlgo) {\n\tif (hashAlgo === undefined)\n\t\thashAlgo = this.defaultHashAlgorithm();\n\tassert.string(hashAlgo, 'hash algorithm');\n\n\t/* ED25519 is not supported by OpenSSL, use a javascript impl. */\n\tif (this.type === 'ed25519' && edCompat !== undefined)\n\t\treturn (new edCompat.Signer(this, hashAlgo));\n\tif (this.type === 'curve25519')\n\t\tthrow (new Error('Curve25519 keys are not suitable for ' +\n\t\t 'signing or verification'));\n\n\tvar v, nm, err;\n\ttry {\n\t\tnm = hashAlgo.toUpperCase();\n\t\tv = crypto.createSign(nm);\n\t} catch (e) {\n\t\terr = e;\n\t}\n\tif (v === undefined || (err instanceof Error &&\n\t err.message.match(/Unknown message digest/))) {\n\t\tnm = 'RSA-';\n\t\tnm += hashAlgo.toUpperCase();\n\t\tv = crypto.createSign(nm);\n\t}\n\tassert.ok(v, 'failed to create verifier');\n\tvar oldSign = v.sign.bind(v);\n\tvar key = this.toBuffer('pkcs1');\n\tvar type = this.type;\n\tvar curve = this.curve;\n\tv.sign = function () {\n\t\tvar sig = oldSign(key);\n\t\tif (typeof (sig) === 'string')\n\t\t\tsig = new Buffer(sig, 'binary');\n\t\tsig = Signature.parse(sig, type, 'asn1');\n\t\tsig.hashAlgorithm = hashAlgo;\n\t\tsig.curve = curve;\n\t\treturn (sig);\n\t};\n\treturn (v);\n};\n\nPrivateKey.parse = function (data, format, options) {\n\tif (typeof (data) !== 'string')\n\t\tassert.buffer(data, 'data');\n\tif (format === undefined)\n\t\tformat = 'auto';\n\tassert.string(format, 'format');\n\tif (typeof (options) === 'string')\n\t\toptions = { filename: options };\n\tassert.optionalObject(options, 'options');\n\tif (options === undefined)\n\t\toptions = {};\n\tassert.optionalString(options.filename, 'options.filename');\n\tif (options.filename === undefined)\n\t\toptions.filename = '(unnamed)';\n\n\tassert.object(formats[format], 'formats[format]');\n\n\ttry {\n\t\tvar k = formats[format].read(data, options);\n\t\tassert.ok(k instanceof PrivateKey, 'key is not a private key');\n\t\tif (!k.comment)\n\t\t\tk.comment = options.filename;\n\t\treturn (k);\n\t} catch (e) {\n\t\tif (e.name === 'KeyEncryptedError')\n\t\t\tthrow (e);\n\t\tthrow (new KeyParseError(options.filename, format, e));\n\t}\n};\n\nPrivateKey.isPrivateKey = function (obj, ver) {\n\treturn (utils.isCompatible(obj, PrivateKey, ver));\n};\n\nPrivateKey.generate = function (type, options) {\n\tif (options === undefined)\n\t\toptions = {};\n\tassert.object(options, 'options');\n\n\tswitch (type) {\n\tcase 'ecdsa':\n\t\tif (options.curve === undefined)\n\t\t\toptions.curve = 'nistp256';\n\t\tassert.string(options.curve, 'options.curve');\n\t\treturn (generateECDSA(options.curve));\n\tcase 'ed25519':\n\t\treturn (generateED25519());\n\tdefault:\n\t\tthrow (new Error('Key generation not supported with key ' +\n\t\t 'type \"' + type + '\"'));\n\t}\n};\n\n/*\n * API versions for PrivateKey:\n * [1,0] -- initial ver\n * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats\n * [1,2] -- added defaultHashAlgorithm\n * [1,3] -- added derive, ed, createDH\n * [1,4] -- first tagged version\n */\nPrivateKey.prototype._sshpkApiVersion = [1, 4];\n\nPrivateKey._oldVersionDetect = function (obj) {\n\tassert.func(obj.toPublic);\n\tassert.func(obj.createSign);\n\tif (obj.derive)\n\t\treturn ([1, 3]);\n\tif (obj.defaultHashAlgorithm)\n\t\treturn ([1, 2]);\n\tif (obj.formats['auto'])\n\t\treturn ([1, 1]);\n\treturn ([1, 0]);\n};\n"},{"id":24,"identifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\lodash\\lodash.js","name":"./~/lodash/lodash.js","index":137,"index2":131,"size":539588,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\ui\\bottom-bar.js","issuerId":545,"issuerName":"./~/inquirer/lib/ui/bottom-bar.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":53,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\base.js","module":"./~/inquirer/lib/prompts/base.js","moduleName":"./~/inquirer/lib/prompts/base.js","type":"cjs require","userRequest":"lodash","loc":"6:8-25"},{"moduleId":127,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\utils\\paginator.js","module":"./~/inquirer/lib/utils/paginator.js","moduleName":"./~/inquirer/lib/utils/paginator.js","type":"cjs require","userRequest":"lodash","loc":"3:8-25"},{"moduleId":293,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\ui\\baseUI.js","module":"./~/inquirer/lib/ui/baseUI.js","moduleName":"./~/inquirer/lib/ui/baseUI.js","type":"cjs require","userRequest":"lodash","loc":"2:8-25"},{"moduleId":535,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\objects\\choice.js","module":"./~/inquirer/lib/objects/choice.js","moduleName":"./~/inquirer/lib/objects/choice.js","type":"cjs require","userRequest":"lodash","loc":"2:8-25"},{"moduleId":536,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\objects\\choices.js","module":"./~/inquirer/lib/objects/choices.js","moduleName":"./~/inquirer/lib/objects/choices.js","type":"cjs require","userRequest":"lodash","loc":"3:8-25"},{"moduleId":537,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\checkbox.js","module":"./~/inquirer/lib/prompts/checkbox.js","moduleName":"./~/inquirer/lib/prompts/checkbox.js","type":"cjs require","userRequest":"lodash","loc":"5:8-25"},{"moduleId":538,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\confirm.js","module":"./~/inquirer/lib/prompts/confirm.js","moduleName":"./~/inquirer/lib/prompts/confirm.js","type":"cjs require","userRequest":"lodash","loc":"5:8-25"},{"moduleId":540,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\expand.js","module":"./~/inquirer/lib/prompts/expand.js","moduleName":"./~/inquirer/lib/prompts/expand.js","type":"cjs require","userRequest":"lodash","loc":"5:8-25"},{"moduleId":542,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\list.js","module":"./~/inquirer/lib/prompts/list.js","moduleName":"./~/inquirer/lib/prompts/list.js","type":"cjs require","userRequest":"lodash","loc":"5:8-25"},{"moduleId":544,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\prompts\\rawlist.js","module":"./~/inquirer/lib/prompts/rawlist.js","moduleName":"./~/inquirer/lib/prompts/rawlist.js","type":"cjs require","userRequest":"lodash","loc":"5:8-25"},{"moduleId":545,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\ui\\bottom-bar.js","module":"./~/inquirer/lib/ui/bottom-bar.js","moduleName":"./~/inquirer/lib/ui/bottom-bar.js","type":"cjs require","userRequest":"lodash","loc":"9:8-25"},{"moduleId":546,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\ui\\prompt.js","module":"./~/inquirer/lib/ui/prompt.js","moduleName":"./~/inquirer/lib/ui/prompt.js","type":"cjs require","userRequest":"lodash","loc":"2:8-25"},{"moduleId":547,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\utils\\screen-manager.js","module":"./~/inquirer/lib/utils/screen-manager.js","moduleName":"./~/inquirer/lib/utils/screen-manager.js","type":"cjs require","userRequest":"lodash","loc":"2:8-25"},{"moduleId":548,"moduleIdentifier":"C:\\Users\\byk\\Documents\\Projects\\yarnpkg\\yarn\\node_modules\\inquirer\\lib\\utils\\utils.js","module":"./~/inquirer/lib/utils/utils.js","moduleName":"./~/inquirer/lib/utils/utils.js","type":"cjs require","userRequest":"lodash","loc":"2:8-25"}],"usedExports":true,"providedExports":null,"depth":5,"source":"/**\n * @license\n * Lodash \n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.4';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var 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 match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading and trailing whitespace. */\n var reTrim = /^\\s+|\\s+$/g,\n reTrimStart = /^\\s+/,\n reTrimEnd = /\\s+$/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:(?:1st|2nd|3rd|(?![123])\\\\dth)\\\\b)',\n rsOrdUpper = '\\\\d*(?:(?:1ST|2ND|3RD|(?![123])\\\\dTH)\\\\b)',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\n function addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n }\n\n /**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\n function addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n }\n\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 */\n function 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\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\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 */\n function 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\n /**\n * A specialized version of `_.forEachRight` 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 */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` 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 {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(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 false;\n }\n }\n return true;\n }\n\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 */\n function 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\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 */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\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 */\n function 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\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 */\n function 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\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 */\n function 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\n /**\n * A specialized version of `_.reduce` 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 * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` 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 * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\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 */\n function 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\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\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 */\n function 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\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 */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\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 * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\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 */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` 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 {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\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 */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` 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 {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\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 */\n function 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\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\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 */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\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 */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\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 */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\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 */\n function 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\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 */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\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 */\n function 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\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\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 */\n function 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\n /**\n * A specialized version of `_.lastIndexOf` 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 */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\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 */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\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 */\n var 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\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function 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 /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\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 */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\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 */\n function 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\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 */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\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 */\n function 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\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function 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 /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\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 */\n function 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\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 */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\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 */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\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 */\n function 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\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\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 */\n function 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 /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\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 */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\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 */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\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 */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\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 */\n function 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\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\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 */\n function 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 /**\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 */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\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 */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\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 */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\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 */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\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 */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\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 */\n function stackHas(key) {\n return this.__data__.has(key);\n }\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 */\n function 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\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\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 */\n function 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\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\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 */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\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 */\n function 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\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 */\n function 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\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\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 */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\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 */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\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 */\n function 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\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\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 */\n function 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, baseClone, 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 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\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\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 */\n function 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\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\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 */\n function 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\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 */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\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 */\n var baseForRight = createBaseFor(true);\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 */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` 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 */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\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 */\n function 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\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 */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\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 */\n function 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\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` 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 */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\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 */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays 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 array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\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 */\n function 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\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\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 */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\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 */\n function 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\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 */\n function 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\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 */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\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 */\n function 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\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 */\n function 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\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\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 */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\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 */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\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 */\n function 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\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 */\n function 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\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 */\n function 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\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\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 */\n function 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\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 */\n function 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\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n if (isObject(srcValue)) {\n stack || (stack = new Stack);\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(object[key], srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = object[key],\n srcValue = source[key],\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n var index = -1;\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\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 */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\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 */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\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 */\n var 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\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection 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 */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n value = iteratee(value);\n\n var low = 0,\n high = array == null ? 0 : array.length,\n valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * 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 * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\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 */\n function 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\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 */\n function 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\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays 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 array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\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 */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\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 */\n function 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\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 */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\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 */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\n function cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n }\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 */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\n function cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n }\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 */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\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 */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\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 */\n function 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\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 */\n function 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\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 */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\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 */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\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 */\n function 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\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\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 */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(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\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\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 */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\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 */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\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 */\n function 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 // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\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\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 */\n function 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\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 */\n function 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 // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\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\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\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 */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\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 */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\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 */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\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 */\n function 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\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 */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\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 */\n function 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\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 */\n var 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\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 */\n var 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\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((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\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\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 */\n function 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\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 */\n function initCloneArray(array) {\n var length = array.length,\n result = 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\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 */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\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`, `Number`, `RegExp`, 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 {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, cloneFunc, 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 cloneMap(object, isDeep, cloneFunc);\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 cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\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 */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\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 */\n function isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\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 */\n function 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\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 */\n function 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\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\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 */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\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 */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\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 */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\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 */\n function 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\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 */\n function 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\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\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 */\n function 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\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 */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\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 */\n function 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\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\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 */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\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 */\n function 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\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\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 */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\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 */\n function 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\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 */\n function 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\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\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 (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\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 */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\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 */\n function 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, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.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=array.length-1] 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': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, 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 baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all 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 * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.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 * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\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 */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\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 */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\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 */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.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=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three 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 iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\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 */\n function 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`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\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 * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

' + func(text) + '

';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

fred, barney, & pebbles

'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\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 */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\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 */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\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 */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.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 `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.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 `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\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 */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\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 */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` 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 an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\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 */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\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 */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or 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 boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\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 */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` 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 date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\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 DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\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 empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\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 */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\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 * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\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 an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\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 finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\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 */\n function 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\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\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 integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\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 */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\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 */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\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 */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\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 */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\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 `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\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 native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\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 `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\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 nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\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 number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` 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 regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\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 safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\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 */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\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 */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\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 */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` 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 weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` 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 weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.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 `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.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 `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\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 */\n function 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\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 */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is 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 convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\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 */\n function 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 = value.replace(reTrim, '');\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\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\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 * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\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 */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(args) {\n args.push(undefined, customDefaultsAssignIn);\n return apply(assignInWith, undefined, args);\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key 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 Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\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 */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\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 = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\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 */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\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 */\n var invert = createInverter(function(result, value, key) {\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` 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 of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\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 */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\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 */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\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 values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values 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 values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '