Repository: webpack/webpack-bundle-analyzer Branch: main Commit: b3f44b0de81e Files: 190 Total size: 1.9 MB Directory structure: gitextract_2b7jp3oi/ ├── .babelrc ├── .browserslistrc ├── .editorconfig ├── .github/ │ └── workflows/ │ └── main.yml ├── .gitignore ├── .npm-upgrade.json ├── .nvmrc ├── .prettierignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bin/ │ └── install-test-webpack-versions.sh ├── client/ │ ├── .eslintrc.json │ ├── components/ │ │ ├── Button.css │ │ ├── Button.jsx │ │ ├── Checkbox.css │ │ ├── Checkbox.jsx │ │ ├── CheckboxList.css │ │ ├── CheckboxList.jsx │ │ ├── CheckboxListItem.jsx │ │ ├── ContextMenu.css │ │ ├── ContextMenu.jsx │ │ ├── ContextMenuItem.css │ │ ├── ContextMenuItem.jsx │ │ ├── Dropdown.css │ │ ├── Dropdown.jsx │ │ ├── Icon.css │ │ ├── Icon.jsx │ │ ├── ModuleItem.css │ │ ├── ModuleItem.jsx │ │ ├── ModulesList.css │ │ ├── ModulesList.jsx │ │ ├── ModulesTreemap.css │ │ ├── ModulesTreemap.jsx │ │ ├── Search.css │ │ ├── Search.jsx │ │ ├── Sidebar.css │ │ ├── Sidebar.jsx │ │ ├── Switcher.css │ │ ├── Switcher.jsx │ │ ├── SwitcherItem.jsx │ │ ├── ThemeToggle.css │ │ ├── ThemeToggle.jsx │ │ ├── Tooltip.css │ │ ├── Tooltip.jsx │ │ ├── Treemap.jsx │ │ └── types.js │ ├── lib/ │ │ └── PureComponent.jsx │ ├── localStorage.js │ ├── store.js │ ├── utils.js │ ├── viewer.css │ └── viewer.jsx ├── eslint.config.mjs ├── jest.config.js ├── package.json ├── prettier.config.mjs ├── src/ │ ├── BundleAnalyzerPlugin.js │ ├── Logger.js │ ├── analyzer.js │ ├── bin/ │ │ └── analyzer.js │ ├── index.js │ ├── parseUtils.js │ ├── sizeUtils.js │ ├── statsUtils.js │ ├── template.js │ ├── tree/ │ │ ├── BaseFolder.js │ │ ├── ConcatenatedModule.js │ │ ├── ContentFolder.js │ │ ├── ContentModule.js │ │ ├── Folder.js │ │ ├── Module.js │ │ ├── Node.js │ │ └── utils.js │ ├── utils.js │ └── viewer.js ├── test/ │ ├── .eslintrc.json │ ├── .gitignore │ ├── Logger.js │ ├── analyzer.js │ ├── bundles/ │ │ ├── invalidBundle.js │ │ ├── validBundleWithArrowFunction.js │ │ ├── validBundleWithArrowFunction.modules.json │ │ ├── validBundleWithEsNextFeatures.js │ │ ├── validBundleWithEsNextFeatures.modules.json │ │ ├── validBundleWithIIFE.js │ │ ├── validBundleWithIIFE.modules.json │ │ ├── validCommonBundleWithDedupePlugin.js │ │ ├── validCommonBundleWithDedupePlugin.modules.json │ │ ├── validCommonBundleWithModulesAsArray.js │ │ ├── validCommonBundleWithModulesAsArray.modules.json │ │ ├── validCommonBundleWithModulesAsObject.js │ │ ├── validCommonBundleWithModulesAsObject.modules.json │ │ ├── validExtraBundleWithModulesAsArray.js │ │ ├── validExtraBundleWithModulesAsArray.modules.json │ │ ├── validExtraBundleWithModulesInsideArrayConcat.js │ │ ├── validExtraBundleWithModulesInsideArrayConcat.modules.json │ │ ├── validExtraBundleWithNamedChunk.js │ │ ├── validExtraBundleWithNamedChunk.modules.json │ │ ├── validJsonpWithArrayConcatAndEntryPoint.js │ │ ├── validJsonpWithArrayConcatAndEntryPoint.modules.json │ │ ├── validNodeBundle.js │ │ ├── validNodeBundle.modules.json │ │ ├── validUmdLibraryBundleWithModulesAsArray.js │ │ ├── validUmdLibraryBundleWithModulesAsArray.modules.json │ │ ├── validWebpack4AsyncChunk.js │ │ ├── validWebpack4AsyncChunk.modules.json │ │ ├── validWebpack4AsyncChunkAndEntryPoint.js │ │ ├── validWebpack4AsyncChunkAndEntryPoint.modules.json │ │ ├── validWebpack4AsyncChunkUsingCustomGlobalObject.js │ │ ├── validWebpack4AsyncChunkUsingCustomGlobalObject.modules.json │ │ ├── validWebpack4AsyncChunkUsingSelfInsteadOfWindow.js │ │ ├── validWebpack4AsyncChunkUsingSelfInsteadOfWindow.modules.json │ │ ├── validWebpack4AsyncChunkUsingThisInsteadOfWindow.js │ │ ├── validWebpack4AsyncChunkUsingThisInsteadOfWindow.modules.json │ │ ├── validWebpack4AsyncChunkWithOptimizedModulesArray.js │ │ ├── validWebpack4AsyncChunkWithOptimizedModulesArray.modules.json │ │ ├── validWebpack4AsyncChunkWithWebWorkerChunkTemplatePlugin.js │ │ ├── validWebpack4AsyncChunkWithWebWorkerChunkTemplatePlugin.modules.json │ │ ├── validWebpack5LegacyBundle.js │ │ ├── validWebpack5LegacyBundle.modules.json │ │ ├── validWebpack5ModernBundle.js │ │ └── validWebpack5ModernBundle.modules.json │ ├── dev-server/ │ │ ├── .gitignore │ │ ├── src.js │ │ └── webpack.config.js │ ├── dev-server.js │ ├── helpers.js │ ├── parseUtils.js │ ├── plugin.js │ ├── src/ │ │ ├── a-clone.js │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ ├── stats/ │ │ ├── extremely-optimized-webpack-5-bundle/ │ │ │ ├── bundle.js │ │ │ ├── expected-chart-data.js │ │ │ └── stats.json │ │ ├── minimal-stats/ │ │ │ └── stats.json │ │ ├── webpack-5-bundle-with-concatenated-entry-module/ │ │ │ ├── app.js │ │ │ ├── expected-chart-data.json │ │ │ └── stats.json │ │ ├── webpack-5-bundle-with-multiple-entries/ │ │ │ ├── bundle.js │ │ │ ├── expected-chart-data.js │ │ │ └── stats.json │ │ ├── webpack-5-bundle-with-single-entry/ │ │ │ ├── bundle.js │ │ │ ├── expected-chart-data.js │ │ │ └── stats.json │ │ ├── with-array-config/ │ │ │ ├── config-1-main.js │ │ │ ├── config-2-main.js │ │ │ └── stats.json │ │ ├── with-children-array.json │ │ ├── with-cjs-chunk.json │ │ ├── with-invalid-chunk/ │ │ │ ├── invalid-chunk.js │ │ │ ├── stats.json │ │ │ └── valid-chunk.js │ │ ├── with-invalid-dynamic-require.json │ │ ├── with-missing-chunk/ │ │ │ ├── stats.json │ │ │ └── valid-chunk.js │ │ ├── with-missing-module-chunks/ │ │ │ ├── stats.json │ │ │ └── valid-chunk.js │ │ ├── with-missing-parsed-module/ │ │ │ ├── bundle.js │ │ │ └── stats.json │ │ ├── with-module-concatenation-info/ │ │ │ ├── bundle.js │ │ │ ├── expected-chart-data.js │ │ │ └── stats.json │ │ ├── with-modules-chunk.json │ │ ├── with-modules-in-chunks/ │ │ │ ├── expected-chart-data.js │ │ │ └── stats.json │ │ ├── with-multiple-entrypoints/ │ │ │ ├── expected-chart-data.js │ │ │ └── stats.json │ │ ├── with-no-entrypoints/ │ │ │ └── stats.json │ │ ├── with-non-asset-asset/ │ │ │ ├── bundle.js │ │ │ └── stats.json │ │ ├── with-special-chars/ │ │ │ ├── bundle.js │ │ │ ├── expected-chart-data.js │ │ │ └── stats.json │ │ ├── with-worker-loader/ │ │ │ ├── bundle.js │ │ │ ├── bundle.worker.js │ │ │ └── stats.json │ │ └── with-worker-loader-dynamic-import/ │ │ ├── 1.bundle.js │ │ ├── 1.bundle.worker.js │ │ ├── bundle.js │ │ ├── bundle.worker.js │ │ └── stats.json │ ├── statsUtils.js │ ├── utils.js │ └── viewer.js ├── tsconfig.json └── webpack.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .babelrc ================================================ // Babel config for Node // Compiles sources, gulpfile and tests { "presets": [ [ "@babel/preset-env", { "targets": { "node": "16.20.2" } } ] ] } ================================================ FILE: .browserslistrc ================================================ # Supported browsers last 2 Chrome major versions last 2 Firefox major versions last 1 Safari major version ================================================ FILE: .editorconfig ================================================ root = true [*] charset = utf-8 indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false ================================================ FILE: .github/workflows/main.yml ================================================ name: main on: push: branches: - main pull_request: jobs: build-and-test: strategy: fail-fast: false matrix: node: - version: 20.x - version: 22.x - version: 24.x runs-on: ubuntu-22.04 name: Tests on Node.js v${{ matrix.node.version }} steps: - name: Checkout repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup node uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: ${{ matrix.node.version }} cache: npm - name: Install dependencies run: npm ci - name: Build sources run: ${{ matrix.node.env }} npm run build - name: Run tests run: ${{ matrix.node.env }} npm run test:coverage - name: Codecov uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} lint: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup node uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: "22.x" cache: npm - name: Install dependencies run: npm ci - name: Build sources run: npm run build - name: Run lint run: npm run lint ================================================ FILE: .gitignore ================================================ /lib /public /samples node_modules npm-debug.log .eslintcache ================================================ FILE: .npm-upgrade.json ================================================ { "ignore": { "mobx": { "versions": ">=6", "reason": "v6 drops decorators" }, "mobx-react": { "versions": ">=7", "reason": "v7 requires MobX v6" }, "webpack-cli": { "versions": ">=4", "reason": "Current version of Webpack Dev Server doesn't work with v4" } } } ================================================ FILE: .nvmrc ================================================ v22.14.0 ================================================ FILE: .prettierignore ================================================ test/bundles/** test/stats/** test/output/** samples/** CHANGELOG.md ================================================ FILE: CHANGELOG.md ================================================ # Changelog > **Tags:** > - [Breaking Change] > - [New Feature] > - [Improvement] > - [Bug Fix] > - [Internal] > - [Documentation] _Note: Gaps between patch versions are faulty, broken or test releases._ ## UNRELEASED * **Bug Fix** * Fix a race condition in `writeStats` that could lead to incorrect content in `stats.json` ([#711](https://github.com/webpack/webpack-bundle-analyzer/pull/711) by [@colinaaa](https://github.com/colinaaa)) ## 5.2.0 * **New Feature** * Add support for Zstandard compression ([#693](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/693) by [@bjohansebas](https://github.com/bjohansebas)) * **Internal** * Prettier applied to the code base ([#693](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/694) by [@alexander-akait](https://github.com/alexander-akait)) * Update `sirv` dependency ([#692](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/692) by [@bjohansebas](https://github.com/bjohansebas)) * Update `ws` dependency ([#691](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/691) by [@bjohansebas](https://github.com/bjohansebas)) ## 5.1.1 * **Bug Fix** * Fix tooltip styling in dark mode when using CSS Modules ([#688](https://github.com/webpack/webpack-bundle-analyzer/pull/688) by [@theEquinoxDev](https://github.com/theEquinoxDev)) * Avoid parse failures for bundles with IIFE ([#685](https://github.com/webpack/webpack-bundle-analyzer/pull/685) by [@hai-x](https://github.com/hai-x)) ## 5.1.0 * **Bug Fix** * Prevent `TypeError` when `assets` or `modules` are undefined in `analyzer.js` ([#679](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/679) by [@Srushti-33](https://github.com/Srushti-33)) * **New Feature** * Add optional dark/light mode toggle ([#683](https://github.com/webpack/webpack-bundle-analyzer/pull/683) by [@theEquinoxDev](https://github.com/theEquinoxDev)) ## 5.0.1 * **Bug Fix** * Restore `@babel/plugin-transform-class-properties` to fix HTML report ([#682](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/682) by [@valscion](https://github.com/valscion)) ## 5.0.0 * **Breaking Change** * Remove explicit support for Node versions below 20.9.0 ([#676](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/676) by [@valscion](https://github.com/valscion)) * **Improvement** * Parse bundles as ES modules based on stats JSON information ([#649](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/649) by [@eamodio](https://github.com/eamodio)) * **New Feature** * Add support for Brotli compression ([#663](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/663) by [@dcsaszar](https://github.com/dcsaszar)) * Add support for React Native ([666](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/666) by [@ilteoood](https://github.com/ilteoood)) ## 4.10.2 * **Bug Fix** * fix `.cjs` files not being handled ([#512](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/512) by [@Rush](https://github.com/Rush)) * **Internal** * Remove `is-plain-object` ([#627](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/627) by [@SukkaW](https://github.com/SukkaW)) ## 4.10.1 * **Bug Fix** * fix `this.handleValueChange.cancel()` is not a function ([#611](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/625) by [@life2015](https://github.com/life2015)) ## 4.10.0 * **Improvement** * Allows filtering the list of entrypoints ([#624](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/624) by [@chriskrogh](https://github.com/chriskrogh)) * **Internal** * Make module much slimmer by replacing all `lodash.*` packages ([#612](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/612)) by [@sukkaw](https://github.com/sukkaw). ## 4.9.1 * **Internal** * Replace some lodash usages with JavaScript native API ([#505](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/505)) by [@sukkaw](https://github.com/sukkaw). * Make module much slimmer ([#609](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/609)) by [@sukkaw](https://github.com/sukkaw). * **Bug Fix** * fix `analyzerMode: 'server'` on certain machines ([#611](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/611) by [@panbenson](https://github.com/panbenson)) ## 4.9.0 * **Improvement** * Display modules included in concatenated entry modules on Webpack 5 when "Show content of concatenated modules" is checked ([#602](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/602) by [@pgoldberg](https://github.com/pgoldberg)) ## 4.8.0 * **Improvement** * Support reading large (>500MB) stats.json files ([#423](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/423) by [@henry-alakazhang](https://github.com/henry-alakazhang)) * Improve search UX by graying out non-matches ([#554](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/554) by [@starpit](https://github.com/starpit)) * **Internal** * Add Node.js v16.x to CI and update GitHub actions ([#539](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/539) by [@amareshsm](https://github.com/amareshsm)) ## 4.7.0 * **New Feature** * Add the ability to filter to displaying only initial chunks per entrypoint ([#519](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/519) by [@pas-trop-de-zele](https://github.com/pas-trop-de-zele)) ## 4.6.1 * **Bug Fix** * fix outputting different URL in cli mode ([#524](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/524) by [@southorange1228](https://github.com/southorange1228)) ## 4.6.0 * **New Feature** * Support outputting different URL in server mode ([#520](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/520) by [@southorange1228](https://github.com/southorange1228)) * Use deterministic chunk colors (#[501](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/501) by [@CreativeTechGuy](https://github.com/CreativeTechGuy)) ## 4.5.0 * **Improvement** * Stop publishing src folder to npm ([#478](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/478) by [@wood1986](https://github.com/wood1986)) * **Internal** * Update some dependencies ([#448](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/448)) * Replace nightmare with Puppeteer ([#469](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/469) by [@valscion](https://github.com/valscion)) * Replace Mocha with Jest ([#470](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/470) by [@valscion](https://github.com/valscion)) ## 4.4.2 * **Bug Fix** * Fix failure with `compiler.outputFileSystem.constructor` being `undefined` ([#447](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/447) by [@kedarv](https://github.com/kedarv) and [@alexander-akait](https://github.com/alexander-akait)) * **NOTE:** This fix doesn't have added test coverage so the fix might break in future versions unless test coverage is added later. ## 4.4.1 * **Bug Fix** * Fix missing module chunks ([#433](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/433) by [@deanshub](https://github.com/deanshub)) * **Internal** * Fix tests timing out in CI ([#435](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/435) by [@deanshub](https://github.com/deanshub)) * Fix command in issue template ([#428](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/428) by [@cncolder](https://github.com/cncolder)) ## 4.4.0 * **Improvement** * Keep treemap labels visible during zooming animations for better user experience ([#414](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/414) by [@stanislawosinski](https://github.com/stanislawosinski)) * **Bug Fix** * Don't show an empty tooltip when hovering over the FoamTree attribution group or between top-level groups ([#413](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/413) by [@stanislawosinski](https://github.com/stanislawosinski)) * **Internal** * Upgrade FoamTree to version 3.5.0, replace vendor dependency with an NPM package ([#412](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/412) by [@stanislawosinski](https://github.com/stanislawosinski)) ## 4.3.0 * **Improvement** * Replace express with builtin node server, reducing number of dependencies ([#398](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/398) by [@TrySound](https://github.com/TrySound)) * Move `filesize` to dev dependencies, reducing number of dependencies ([#401](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/401) by [@realityking](https://github.com/realityking)) * **Internal** * Replace Travis with GitHub actions ([#402](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/402) by [@valscion](https://github.com/valscion)) ## 4.2.0 * **Improvement** * A number of improvements to reduce the number of dependencies ([#391](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/391), [#396](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/396), [#397](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/397)) * **Bug Fix** * Prevent crashes for bundles generated from webpack array configs. ([#394](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/394) by [@ctavan](https://github.com/ctavan)) * Fix `non-asset` assets causing analyze failure. ([#385](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/385) by [@ZKHelloworld](https://github.com/ZKHelloworld)) ## 4.1.0 * **Improvement** * Significantly speed up generation of `stats.json` file (see `generateStatsFile` option). ## 4.0.0 * **Breaking change** * Dropped support for Node.js 6 and 8. Minimal required version now is v10.13.0 * **Improvement** * Support for Webpack 5 * **Bug Fix** * Prevent crashes when `openAnalyzer` was set to true in environments where there's no program to handle opening. ([#382](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/382) by [@wbobeirne](https://github.com/wbobeirne)) * **Internal** * Updated dependencies * Added support for multiple Webpack versions in tests ## 3.9.0 * **New Feature** * Adds option `reportTitle` to set title in HTML reports; default remains date of report generation ([#354](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/354) by [@eoingroat](https://github.com/eoingroat)) * **Improvement** * Added capability to parse bundles that have child assets generated ([#376](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/376) by [@masterkidan](https://github.com/masterkidan) and [#378](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/378) by [@https://github.com/dabbott](https://github.com/https://github.com/dabbott)) ## 3.8.0 * **Improvement** * Added support for exports.modules when webpack target = node ([#345](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/345) by [@Spikef](https://github.com/Spikef)) * **New Feature** * Support [WebWorkerChunkTemplatePlugin](https://github.com/webpack/webpack/blob/c9d4ff7b054fc581c96ce0e53432d44f9dd8ca72/lib/webworker/WebWorkerChunkTemplatePlugin.js) ([#353](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/353) by [@Gongreg](https://github.com/Gongreg)) * **Bug Fix** * Support any custom `globalObject` option in Webpack Config. ([#352](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/352) by [@Gongreg](https://github.com/Gongreg)) ## 3.7.0 * **New Feature** * Added JSON output option (`analyzerMode: "json"` in plugin, `--mode json` in CLI) ([#341](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/341) by [@Gongreg](https://github.com/Gongreg)) * **Improvement** * Persist "Show content of concatenated modules" option ([#322](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/322) by [@lorenzos](https://github.com/lorenzos)) ## 3.6.1 * **Bug Fix** * Add leading zero to hour & minute on `` when needed ([#314](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/314) by [@mhxbe](https://github.com/mhxbe)) * **Internal** * Update some dependencies to get rid of vulnerability warnings ([#339](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/339)) ## 3.6.0 * **Improvement** * Support webpack builds where `output.globalObject` is set to `'self'` ([#323](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/323) by [@lemonmade](https://github.com/lemonmade)) * Improve readability of tooltips ([#320](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/320) by [@lorenzos](https://github.com/lorenzos)) ## 3.5.2 * **Bug Fix** * Fix sidebar not showing visibility status of chunks hidden via popup menu (issue [#316](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/316) by [@gaokun](https://github.com/gaokun), fixed in [#317](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/317) by [@bregenspan](https://github.com/bregenspan)) ## 3.5.1 * **Bug Fix** * Fix regression in support of webpack dev server and `webpack --watch` (issue [#312](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/312), fixed in [#313](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/313) by [@gaokun](https://github.com/gaokun)) ## 3.5.0 * **Improvements** * Improved report title and added favicon ([#310](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/310), [@gaokun](https://github.com/gaokun)) ## 3.4.1 * **Bug Fix** * Fix regression of requiring an object to be passed to `new BundleAnalyzerPlugin()` (issue [#300](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/300), fixed in [#302](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/302) by [@jerryOnlyZRJ](https://github.com/jerryOnlyZRJ)) ## 3.4.0 * **Improvements** * Add `port: 'auto'` option ([#290](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/290), [@avin-kavish](https://github.com/avin-kavish)) * **Bug Fix** * Avoid mutation of the generated `stats.json` ([#293](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/293), [@wood1986](https://github.com/wood1986)) * **Internal** * Use Autoprefixer ([#266](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/266), [@bregenspan](https://github.com/bregenspan)) * Detect `AsyncMFS` to support dev-server of Nuxt 2.5 and above ([#275](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/275), [@amoshydra](https://github.com/amoshydra)) ## 3.3.2 * **Bug Fix** * Fix regression with escaping internal assets ([#264](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/264), fixes [#263](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/263)) ## 3.3.1 * **Improvements** * Use relative links for serving internal assets ([#261](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/261), fixes [#254](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/254)) * Properly escape embedded JS/JSON ([#262](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/262)) * **Bug Fix** * Fix showing help message on `-h` flag ([#260](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/260), fixes [#239](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/239)) ## 3.3.0 * **New Feature** * Show/hide chunks using context menu ([#246](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/246), [@bregenspan](https://github.com/bregenspan)) * **Internal** * Updated dev dependencies ## 3.2.0 * **Improvements** * Add support for .mjs output files ([#252](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/252), [@jlopezxs](https://github.com/jlopezxs)) ## 3.1.0 * **Bug Fix** * Properly determine the size of the modules containing special characters ([#223](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/223), [@hulkish](https://github.com/hulkish)) * Update acorn to v6 ([#248](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/248), [@realityking](https://github.com/realityking)) ## 3.0.4 * **Bug Fix** * Make webpack's done hook wait until analyzer writes report or stat file ([#247](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/247), [@mareolan](https://github.com/mareolan)) ## 3.0.3 * **Bug Fix** * Disable viewer websocket connection when report is generated in `static` mode ([#215](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/215), [@sebastianhaeni](https://github.com/sebastianhaeni)) ## 3.0.2 * **Improvements** * Drop `@babel/runtime` dependency ([#209](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/209), [@realityking](https://github.com/realityking)) * Properly specify minimal Node.js version in `.babelrc` ([#209](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/209), [@realityking](https://github.com/realityking)) * **Bug Fix** * Move some "dependencies" to "devDependencies" ([#209](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/209), [@realityking](https://github.com/realityking)) ## 3.0.1 * **Bug Fix** * Small UI fixes ## 3.0.0 * **Breaking change** * Dropped support for Node.js v4. Minimal required version now is v6.14.4 * Contents of concatenated modules are now hidden by default because of a number of related issues ([details](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/188)), but can be shown using a new checkbox in the sidebar. * **New Feature** * Added modules search * Added ability to pin and resize the sidebar * Added button to toggle the sidebar * Added checkbox to show/hide contents of concatenated modules * **Improvements** * Nested folders that contain only one child folder are now visually merged i.e. `folder1 => folder2 => file1` is now shown like `folder1/folder2 => file1` (thanks to [@varun-singh-1](https://github.com/varun-singh-1) for the idea) * **Internal** * Dropped support for Node.js v4 * Using MobX for state management * Updated dependencies ## 2.13.1 * **Improvement** * Pretty-format the generated stats.json ([#180](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/180)) [@edmorley](https://github.com/edmorley)) * **Bug Fix** * Properly parse Webpack 4 async chunk with `Array.concat` optimization ([#184](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/184), fixes [#183](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/183)) * **Internal** * Refactor bundle parsing logic ([#184](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/184)) ## 2.13.0 * **Improvement** * Loosen bundle parsing logic ([#181](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/181)). Now analyzer will still show parsed sizes even if: * It can't parse some bundle chunks. Those chunks just won't have content in the report. Fixes issues like [#160](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/160). * Some bundle chunks are missing (it couldn't find files to parse). Those chunks just won't be visible in the report for parsed/gzipped sizes. ## 2.12.0 * **New Feature** * Add option that allows to exclude assets from the report ([#178](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/178)) ## 2.11.3 * **Bug Fix** * Filter out modules that weren't found during bundles parsing ([#177](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/177)) ## 2.11.2 * **Bug Fix** * Properly process stat files that contain modules inside of `chunks` array ([#175](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/175)) * Fix parsing of async chunks that push to `this.webpackJsonp` array ([#176](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/176)) ## 2.11.1 * **Improvement** * Add support for parsing Webpack 4's chunked modules ([#159](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/159), [@jdelStrother](https://github.com/jdelStrother)) ## 2.11.0 * **Improvement** * Show contents of concatenated module (requires Webpack 4) ([#158](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/158), closes [#157](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/157)) ## 2.10.1 * **Improvement** * Support webpack 4 without deprecation warnings. @ai in [#156](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/156), fixes [#154](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/154) ## 2.10.0 * **Bug Fix** * Fix "out of memory" crash when dealing with huge stats objects ([#129](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/129), [@ryan953](https://github.com/ryan953)) * **Internal** * Update dependencies ([#146](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/146)) * Update gulp to v4 and simplify gulpfile ([#146](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/146), [#149](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/149)) * Simplify ESLint configs ([#148](https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/148)) ## 2.9.2 * **Bug Fix** * Add a listener for the 'error' event on the WebSocket server client (#140) * **Internal** * Clean up .travis.yml (#140) * Update ws to version 4.0.0 (#140) ## 2.9.1 * **Bug Fix** * Bump `ws` dependency to fix DoS vulnerability (closes [#130](https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/130)) ## 2.9.0 * **New Feature** * Show chunk sizes in sidebar (closes #91) * **Bug Fix** * Properly parse webpack bundles that use arrow functions as module wrappers (#108, @regiontog) ## 2.8.3 * **Bug Fix** * Correctly advertise port when using a random one (#89, @yannickcr) * Add proper support for `multi` entries (fixes #92, #87) * Support parsing of ESNext features (fixes #94) ## 2.8.2 * **Improvement** * Greatly improved accuracy of gzip sizes * **Bug Fix** * Generate report file in the bundle output directory when used with Webpack Dev Server (fixes #75) ## 2.8.1 * **Improvement** * Improve warning message when analyzer client couldn't connect to WebSocket server ## 2.8.0 * **Improvement** * Analyzer now supports `webpack --watch` and Webpack Dev Server! It will automatically update modules treemap according to changes in the sources via WebSockets! * **Internal** * Use `babel-preset-env` and two different Babel configs to compile node and browser code * Update deps ## 2.7.0 * **New Feature** * Add control to sidebar that allows to choose shown chunks (closes #71 and partially addresses #38) ## 2.6.0 * **New Feature** * Add `defaultSizes` option (closes #52) ## 2.5.0 * **New Feature** * Added `--host` CLI option (@difelice) ## 2.4.1 * **Improvement** * Support `NamedChunksPlugin` (@valscion) ## 2.4.0 * **Bug Fix** * Fix `TypeError: currentFolder.addModule is not a function` * **Internal** * Update deps ## 2.3.1 * **Improvement** * Improve compatibility with Webpack 2 (@valscion) ## 2.3.0 * **Improvement** * Add `analyzerHost` option (@freaz) * **Internal** * Update deps ## 2.2.3 * **Bug Fix** * Support bundles that uses `Array.concat` expression in modules definition (@valscion) ## 2.2.1 * **Bug Fix** * Fix regression in analyzing stats files with non-empty `children` property (@gbakernet) ## 2.2.0 * **Improvement** * Improve treemap sharpness on hi-res displays (fixes #33) * Add support for stats files with all the information under `children` property (fixes #10) * **Internal** * Update deps ## 2.1.1 * **Improvement** * Add support for `output.jsonpFunction` webpack config option (fixes #16) ## 2.1.0 * **New Feature** * Add `logLevel` option (closes #19) ## 2.0.1 * **Bug Fix** * Support query in bundle filenames (fixes #22) * **Internal** * Minimize CSS for report UI ## 2.0.0 * **New Feature** * Analyzer now also shows gzipped sizes (closes #6) * Added switcher that allows to choose what sizes will be used to generate tree map. Just move your mouse to the left corner of the browser and settings sidebar will appear. * **Bug Fix** * Properly show sizes for some asset modules (e.g. CSS files loaded with `css-loader`) * **Internal** * Completely rewritten analyzer UI. Now uses Preact and Webpack 2. ## 1.5.4 * **Bug Fix** * Fix bug when Webpack build is being controlled by some wrapper like `grunt-webpack` (see #21) ## 1.5.3 * **Bug Fix** * Workaround `Express` bug that caused wrong `ejs` version to be used as view engine (fixes #17) ## 1.5.2 * **Bug Fix** * Support array module descriptors that can be generated if `DedupePlugin` is used (fixes #4) ## 1.5.1 * **Internal** * Plug analyzer to Webpack compiler `done` event instead of `emit`. Should fix #15. ## 1.5.0 * **New Feature** * Add `statsOptions` option for `BundleAnalyzerPlugin` ## 1.4.2 * **Bug Fix** * Fix "Unable to find bundle asset" error when bundle name starts with `/` (fixes #3) ## 1.4.1 * **Bug Fix** * Add partial support for `DedupePlugin` (see #4 for more info) ## 1.4.0 * **New Feature** * Add "static report" mode (closes #2) ## 1.3.0 * **Improvement** * Add `startAnalyzer` option for `BundleAnalyzerPlugin` (fixes #1) * **Internal** * Make module much slimmer - remove/replace bloated dependencies ## 1.2.5 * Initial public release ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing To contribute to `webpack-bundle-analyzer`, fork the repository and clone it to your machine. [See this GitHub help page for what forking and cloning means](https://help.github.com/articles/fork-a-repo/) ## Setup packages Next, install this package's dependencies: ```sh npm i ``` ## Develop with your own project Run the following to build this library and watch its source files for changes: ```sh npm run start ``` You will now have a fully functioning local build of this library ready to be used. **Leave the `start` script running**, and continue with a new Terminal/shell window. Link the local package with `yarn` and/or `npm` to use it in your own projects: ```sh # Needed if your own project uses `yarn` to handle dependencies: yarn link # Needed if your own project uses `npm` to handle dependencies: npm link ``` Now go to your own project directory, and tell `npm` or `yarn` to use the local copy of `webpack-bundle-analyzer` package: ```sh cd /path/to/my/own/project # If you're using yarn, run this: yarn link webpack-bundle-analyzer # ...and if you're not, and you're using just npm in your own # project, run this: npm link webpack-bundle-analyzer ``` Now when you call `require('webpack-bundle-analyzer')` in your own project, you will actually be using the local copy of the `webpack-bundle-analyzer` project. If your own project's Webpack config has `BundleAnalyzerPlugin` configured with `analyzerMode: 'server'`, the changes you do inside `client` folder within your local copy of `webpack-bundle-analyzer` should now be immediately visible after you refresh your browser page. Hack away! ## Send your changes back to us! :revolving_hearts: We'd love for you to contribute your changes back to `webpack-bundle-analyzer`! To do that, it would be ace if you could commit your changes to a separate feature branch and open a Pull Request for those changes. Point your feature branch to use the `main` branch as the base of this PR. The exact commands used depends on how you've setup your local git copy, but the flow could look like this: ```sh # Inside your own copy of `webpack-bundle-analyzer` package... git checkout --branch feature-branch-name-here upstream/main # Then hack away, and commit your changes: git add -A git commit -m "Few words about the changes I did" # Push your local changes back to your fork git push --set-upstream origin feature-branch-name-here ``` After these steps, you should be able to create a new Pull Request for this repository. If you hit any issues following these instructions, please open an issue and we'll see if we can improve these instructions even further. ## Add tests for your changes :tada: It would be really great if the changes you did could be tested somehow. Our tests live inside the `test` directory, and they can be run with the following command: ```sh npm run test-dev ``` Now whenever you change some files, the tests will be rerun immediately. If you don't want that, and want to run tests as a one-off operation, you can use: ```sh npm test ``` ================================================ FILE: LICENSE ================================================ Copyright JS Foundation and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ [![npm][npm]][npm-url] [![node][node]][node-url] [![tests][tests]][tests-url] [![downloads][downloads]][downloads-url] <div align="center"> <a href="https://github.com/webpack/webpack"> <img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg"> </a> <h1>Webpack Bundle Analyzer</h1> <p>Visualize size of webpack output files with an interactive zoomable treemap.</p> </div> <h2 align="center">Install</h2> ```bash # NPM npm install --save-dev webpack-bundle-analyzer # Yarn yarn add -D webpack-bundle-analyzer ``` <h2 align="center">Usage (as a plugin)</h2> ```js const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); module.exports = { plugins: [new BundleAnalyzerPlugin()], }; ``` It will create an interactive treemap visualization of the contents of all your bundles. ![webpack bundle analyzer zoomable treemap](https://cloud.githubusercontent.com/assets/302213/20628702/93f72404-b338-11e6-92d4-9a365550a701.gif) This module will help you: 1. Realize what's _really_ inside your bundle 2. Find out what modules make up the most of its size 3. Find modules that got there by mistake 4. Optimize it! And the best thing is it supports minified bundles! It parses them to get real size of bundled modules. And it also shows their gzipped, Brotli, or Zstandard sizes! <h2 align="center">Options (for plugin)</h2> <!-- eslint-skip --> ```js new BundleAnalyzerPlugin(options?: object) ``` | Name | Type | Description | | :------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **`analyzerMode`** | One of: `server`, `static`, `json`, `disabled` | Default: `server`. In `server` mode analyzer will start HTTP server to show bundle report. In `static` mode single HTML file with bundle report will be generated. In `json` mode single JSON file with bundle report will be generated. In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`. | | **`analyzerHost`** | `{String}` | Default: `127.0.0.1`. Host that will be used in `server` mode to start HTTP server. | | **`analyzerPort`** | `{Number}` or `auto` | Default: `8888`. Port that will be used in `server` mode to start HTTP server. If `analyzerPort` is `auto`, the operating system will assign an arbitrary unused port | | **`analyzerUrl`** | `{Function}` called with `{ listenHost: string, listenHost: string, boundAddress: server.address}`. [server.address comes from Node.js](https://nodejs.org/api/net.html#serveraddress) | Default: `http://${listenHost}:${boundAddress.port}`. The URL printed to console with server mode. | | **`reportFilename`** | `{String}` | Default: `report.html`. Path to bundle report file that will be generated in `static` mode. It can be either an absolute path or a path relative to a bundle output directory (which is output.path in webpack config). | | **`reportTitle`** | `{String\|function}` | Default: function that returns pretty printed current date and time. Content of the HTML `title` element; or a function of the form `() => string` that provides the content. | | **`defaultSizes`** | One of: `stat`, `parsed`, `gzip`, `brotli` | Default: `parsed`. Module sizes to show in report by default. [Size definitions](#size-definitions) section describes what these values mean. | | **`compressionAlgorithm`** | One of: `gzip`, `brotli`, `zstd` | Default: `gzip`. Compression type used to calculate the compressed module sizes. | | **`openAnalyzer`** | `{Boolean}` | Default: `true`. Automatically open report in default browser. | | **`generateStatsFile`** | `{Boolean}` | Default: `false`. If `true`, webpack stats JSON file will be generated in bundle output directory | | **`statsFilename`** | `{String}` | Default: `stats.json`. Name of webpack stats JSON file that will be generated if `generateStatsFile` is `true`. It can be either an absolute path or a path relative to a bundle output directory (which is output.path in webpack config). | | **`statsOptions`** | `null` or `{Object}` | Default: `null`. Options for `stats.toJson()` method. For example you can exclude sources of your modules from stats file with `source: false` option. [See more options here](https://webpack.js.org/configuration/stats/). | | **`excludeAssets`** | `{null\|pattern\|pattern[]}` where `pattern` equals to `{String\|RegExp\|function}` | Default: `null`. Patterns that will be used to match against asset names to exclude them from the report. If pattern is a string it will be converted to RegExp via `new RegExp(str)`. If pattern is a function it should have the following signature `(assetName: string) => boolean` and should return `true` to _exclude_ matching asset. If multiple patterns are provided asset should match at least one of them to be excluded. | | **`logLevel`** | One of: `info`, `warn`, `error`, `silent` | Default: `info`. Used to control how much details the plugin outputs. | <h2 align="center">Usage (as a CLI utility)</h2> You can analyze an existing bundle if you have a webpack stats JSON file. You can generate it using `BundleAnalyzerPlugin` with `generateStatsFile` option set to `true` or with this simple command: ```bash webpack --profile --json > stats.json ``` If you're on Windows and using PowerShell, you can generate the stats file with this command to [avoid BOM issues](https://github.com/webpack/webpack-bundle-analyzer/issues/47): ``` webpack --profile --json | Out-file 'stats.json' -Encoding OEM ``` Then you can run the CLI tool. ``` webpack-bundle-analyzer bundle/output/path/stats.json ``` <h2 align="center">Options (for CLI)</h2> ```bash webpack-bundle-analyzer <bundleStatsFile> [bundleDir] [options] ``` Arguments are documented below: ### `bundleStatsFile` Path to webpack stats JSON file ### `bundleDir` Directory containing all generated bundles. ### `options` ``` -V, --version output the version number -m, --mode <mode> Analyzer mode. Should be `server`, `static` or `json`. In `server` mode analyzer will start HTTP server to show bundle report. In `static` mode single HTML file with bundle report will be generated. In `json` mode single JSON file with bundle report will be generated. (default: server) -h, --host <host> Host that will be used in `server` mode to start HTTP server. (default: 127.0.0.1) -p, --port <n> Port that will be used in `server` mode to start HTTP server. Should be a number or `auto` (default: 8888) -r, --report <file> Path to bundle report file that will be generated in `static` mode. (default: report.html) -t, --title <title> String to use in title element of html report. (default: pretty printed current date) -s, --default-sizes <type> Module sizes to show in treemap by default. Possible values: stat, parsed, gzip, brotli, zstd (default: parsed) --compression-algorithm <type> Compression algorithm that will be used to calculate the compressed module sizes. Possible values: gzip, brotli, zstd (default: gzip) -O, --no-open Don't open report in default browser automatically. -e, --exclude <regexp> Assets that should be excluded from the report. Can be specified multiple times. -l, --log-level <level> Log level. Possible values: debug, info, warn, error, silent (default: info) -h, --help output usage information ``` <h2 align="center" id="size-definitions">Size definitions</h2> webpack-bundle-analyzer reports three values for sizes. `defaultSizes` can be used to control which of these is shown by default. The different reported sizes are: ### `stat` This is the "input" size of your files, before any transformations like minification. It is called "stat size" because it's obtained from Webpack's [stats object](https://webpack.js.org/configuration/stats/). ### `parsed` This is the "output" size of your files. If you're using a Webpack plugin such as Uglify, then this value will reflect the minified size of your code. ### `gzip` This is the size of running the parsed bundles/modules through gzip compression. ### `brotli` This is the size of running the parsed bundles/modules through Brotli compression. ### `zstd` This is the size of running the parsed bundles/modules through Zstandard compression. (Node.js 22.15.0+ is required for this feature) <h2 align="center">Selecting Which Chunks to Display</h2> When opened, the report displays all of the Webpack chunks for your project. It's possible to filter to a more specific list of chunks by using the sidebar or the chunk context menu. ### Sidebar The Sidebar Menu can be opened by clicking the `>` button at the top left of the report. You can select or deselect chunks to display under the "Show chunks" heading there. ### Chunk Context Menu The Chunk Context Menu can be opened by right-clicking or `Ctrl`-clicking on a specific chunk in the report. It provides the following options: - **Hide chunk:** Hides the selected chunk - **Hide all other chunks:** Hides all chunks besides the selected one - **Show all chunks:** Un-hides any hidden chunks, returning the report to its initial, unfiltered view <h2 align="center">Troubleshooting</h2> ### I don't see `gzip` or `parsed` sizes, it only shows `stat` size It happens when `webpack-bundle-analyzer` analyzes files that don't actually exist in your file system, for example when you work with `webpack-dev-server` that keeps all the files in RAM. If you use `webpack-bundle-analyzer` as a plugin you won't get any errors, however if you run it via CLI you get the error message in terminal: ``` Error parsing bundle asset "your_bundle_name.bundle.js": no such file No bundles were parsed. Analyzer will show only original module sizes from stats file. ``` To get more information about it you can read [issue #147](https://github.com/webpack/webpack-bundle-analyzer/issues/147). <h2 align="center">Other tools</h2> - [Statoscope](https://github.com/smelukov/statoscope/blob/master/packages/ui-webpack/README.md) - Webpack bundle analyzing tool to find out why a certain module was bundled (and more features, including interactive treemap) <h2 align="center">Maintainers</h2> <table> <tbody> <tr> <td align="center"> <img width="150" height="150" src="https://avatars3.githubusercontent.com/u/302213?v=4&s=150"> </br> <a href="https://github.com/th0r">Yuriy Grunin</a> </td> <td align="center"> <img width="150" height="150" src="https://avatars3.githubusercontent.com/u/482561?v=4&s=150"> </br> <a href="https://github.com/valscion">Vesa Laakso</a> </td> </tr> <tbody> </table> [npm]: https://img.shields.io/npm/v/webpack-bundle-analyzer.svg [npm-url]: https://npmjs.com/package/webpack-bundle-analyzer [node]: https://img.shields.io/node/v/webpack-bundle-analyzer.svg [node-url]: https://nodejs.org [tests]: https://github.com/webpack/webpack-bundle-analyzer/actions/workflows/main.yml/badge.svg [tests-url]: https://github.com/webpack/webpack-bundle-analyzer/actions/workflows/main.yml [downloads]: https://img.shields.io/npm/dt/webpack-bundle-analyzer.svg [downloads-url]: https://npmjs.com/package/webpack-bundle-analyzer <h2 align="center">Contributing</h2> Check out [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on contributing :tada: ================================================ FILE: bin/install-test-webpack-versions.sh ================================================ #!/usr/bin/env bash for dir in "$(dirname "$0")"/../test/webpack-versions/*; do (cd "$dir" && npm i); done ================================================ FILE: client/.eslintrc.json ================================================ { "extends": ["th0r-react", "../.eslintrc.json"], "settings": { "react": { "version": "16.2" } }, "parserOptions": { "ecmaFeatures": { "legacyDecorators": true } }, "rules": { "react/jsx-key": "off", "react/jsx-no-bind": "off", "react/react-in-jsx-scope": "off" } } ================================================ FILE: client/components/Button.css ================================================ .button { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; display: inline-block; font: var(--main-font); outline: none; padding: 5px 7px; transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease; white-space: nowrap; color: var(--text-primary); } .button:focus, .button:hover { background: var(--hover-bg); } .button.active { background: #ffa500; color: #000; } .button[disabled] { cursor: default; } ================================================ FILE: client/components/Button.jsx ================================================ import cls from "classnames"; import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import * as styles from "./Button.css"; export default class Button extends PureComponent { static propTypes = { className: PropTypes.string, active: PropTypes.bool, toggle: PropTypes.bool, disabled: PropTypes.bool, onClick: PropTypes.func.isRequired, children: PropTypes.node, }; render({ active, className, children, ...props }) { const classes = cls(className, { [styles.button]: true, [styles.active]: active, }); return ( <button {...props} ref={this.saveRef} type="button" className={classes} disabled={this.disabled} onClick={this.handleClick} > {children} </button> ); } get disabled() { const { disabled, active, toggle } = this.props; return disabled || (active && !toggle); } handleClick = (event) => { if (this.elem) { this.elem.blur(); } this.props.onClick(event); }; saveRef = (elem) => (this.elem = elem); } ================================================ FILE: client/components/Checkbox.css ================================================ .label { cursor: pointer; display: inline-block; } .checkbox { cursor: pointer; } .itemText { margin-left: 3px; position: relative; top: -2px; vertical-align: middle; } ================================================ FILE: client/components/Checkbox.jsx ================================================ import cls from "classnames"; import { Component } from "preact"; import PropTypes from "prop-types"; import * as styles from "./Checkbox.css"; export default class Checkbox extends Component { static propTypes = { className: PropTypes.string, checked: PropTypes.bool, onChange: PropTypes.func.isRequired, children: PropTypes.node, }; render() { const { checked, className, children } = this.props; return ( <label className={cls(styles.label, className)}> <input className={styles.checkbox} type="checkbox" checked={checked} onChange={this.handleChange} /> {children && <span className={styles.itemText}>{children}</span>} </label> ); } handleChange = () => { this.props.onChange(!this.props.checked); }; } ================================================ FILE: client/components/CheckboxList.css ================================================ .container { font: var(--main-font); white-space: nowrap; } .label { font-size: 11px; font-weight: bold; margin-bottom: 7px; } .item + .item { margin-top: 1px; } ================================================ FILE: client/components/CheckboxList.jsx ================================================ import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import * as styles from "./CheckboxList.css"; import CheckboxListItem from "./CheckboxListItem.jsx"; import { ViewerDataType } from "./types.js"; const ALL_ITEM = Symbol("ALL_ITEM"); export default class CheckboxList extends PureComponent { static propTypes = { label: PropTypes.string.isRequired, renderLabel: PropTypes.func.isRequired, items: PropTypes.oneOfType([ViewerDataType, PropTypes.symbol]), checkedItems: PropTypes.oneOfType([ViewerDataType, PropTypes.symbol]), onChange: PropTypes.func.isRequired, }; static ALL_ITEM = ALL_ITEM; constructor(props) { super(props); this.state = { checkedItems: props.checkedItems || props.items, }; } componentWillReceiveProps(newProps) { if (newProps.items !== this.props.items) { if (this.isAllChecked()) { // Preserving `all checked` state this.setState({ checkedItems: newProps.items }); this.informAboutChange(newProps.items); } else if (this.state.checkedItems.length) { // Checking only items that are in the new `items` array const checkedItems = newProps.items.filter((item) => this.state.checkedItems.find( (checkedItem) => checkedItem.label === item.label, ), ); this.setState({ checkedItems }); this.informAboutChange(checkedItems); } } else if (newProps.checkedItems !== this.props.checkedItems) { this.setState({ checkedItems: newProps.checkedItems }); } } render() { const { label, items, renderLabel } = this.props; return ( <div className={styles.container}> <div className={styles.label}>{label}:</div> <div> <CheckboxListItem item={ALL_ITEM} checked={this.isAllChecked()} onChange={this.handleToggleAllCheck} > {renderLabel} </CheckboxListItem> {items.map((item) => ( <CheckboxListItem key={item.label} item={item} checked={this.isItemChecked(item)} onChange={this.handleItemCheck} > {renderLabel} </CheckboxListItem> ))} </div> </div> ); } handleToggleAllCheck = () => { const checkedItems = this.isAllChecked() ? [] : this.props.items; this.setState({ checkedItems }); this.informAboutChange(checkedItems); }; handleItemCheck = (item) => { let checkedItems; if (this.isItemChecked(item)) { checkedItems = this.state.checkedItems.filter( (checkedItem) => checkedItem !== item, ); } else { checkedItems = [...this.state.checkedItems, item]; } this.setState({ checkedItems }); this.informAboutChange(checkedItems); }; isItemChecked(item) { return this.state.checkedItems.includes(item); } isAllChecked() { return this.props.items.length === this.state.checkedItems.length; } informAboutChange(checkedItems) { setTimeout(() => this.props.onChange(checkedItems)); } } ================================================ FILE: client/components/CheckboxListItem.jsx ================================================ import { Component } from "preact"; import PropTypes from "prop-types"; import Checkbox from "./Checkbox.jsx"; import * as styles from "./CheckboxList.css"; import CheckboxList from "./CheckboxList.jsx"; import { ViewerDataItemType } from "./types.js"; export default class CheckboxListItem extends Component { static propTypes = { item: PropTypes.oneOfType([ViewerDataItemType, PropTypes.symbol]) .isRequired, onChange: PropTypes.func.isRequired, children: PropTypes.func, }; render() { return ( <div className={styles.item}> <Checkbox {...this.props} onChange={this.handleChange}> {this.renderLabel()} </Checkbox> </div> ); } renderLabel() { const { children, item } = this.props; if (children) { return children(item); } return item === CheckboxList.ALL_ITEM ? "All" : item.label; } handleChange = () => { this.props.onChange(this.props.item); }; } ================================================ FILE: client/components/ContextMenu.css ================================================ .container { font: var(--main-font); position: absolute; padding: 0; border-radius: 4px; background: #fff; border: 1px solid #aaa; list-style: none; opacity: 1; white-space: nowrap; visibility: visible; transition: opacity 0.2s ease, visibility 0.2s ease; } .hidden { opacity: 0; visibility: hidden; } ================================================ FILE: client/components/ContextMenu.jsx ================================================ import cls from "classnames"; import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import { store } from "../store.js"; import { elementIsOutside } from "../utils.js"; import * as styles from "./ContextMenu.css"; import ContextMenuItem from "./ContextMenuItem.jsx"; import { ViewerDataItemType } from "./types.js"; export default class ContextMenu extends PureComponent { static propTypes = { visible: PropTypes.bool, chunk: ViewerDataItemType, coords: PropTypes.shape({ x: PropTypes.number, y: PropTypes.number, }).isRequired, onHide: PropTypes.func, }; componentDidMount() { this.boundingRect = this.node.getBoundingClientRect(); } componentDidUpdate(prevProps) { if (this.props.visible && !prevProps.visible) { document.addEventListener( "mousedown", this.handleDocumentMousedown, true, ); } else if (prevProps.visible && !this.props.visible) { document.removeEventListener( "mousedown", this.handleDocumentMousedown, true, ); } } render() { const { visible } = this.props; const containerClassName = cls({ [styles.container]: true, [styles.hidden]: !visible, }); const multipleChunksSelected = store.selectedChunks.length > 1; return ( <ul ref={this.saveNode} className={containerClassName} style={this.getStyle()} > <ContextMenuItem disabled={!multipleChunksSelected} onClick={this.handleClickHideChunk} > Hide chunk </ContextMenuItem> <ContextMenuItem disabled={!multipleChunksSelected} onClick={this.handleClickFilterToChunk} > Hide all other chunks </ContextMenuItem> <hr /> <ContextMenuItem disabled={store.allChunksSelected} onClick={this.handleClickShowAllChunks} > Show all chunks </ContextMenuItem> </ul> ); } handleClickHideChunk = () => { const { chunk: selectedChunk } = this.props; if (selectedChunk && selectedChunk.label) { const filteredChunks = store.selectedChunks.filter( (chunk) => chunk.label !== selectedChunk.label, ); store.setSelectedChunks(filteredChunks); } this.hide(); }; handleClickFilterToChunk = () => { const { chunk: selectedChunk } = this.props; if (selectedChunk && selectedChunk.label) { const filteredChunks = store.allChunks.filter( (chunk) => chunk.label === selectedChunk.label, ); store.setSelectedChunks(filteredChunks); } this.hide(); }; handleClickShowAllChunks = () => { store.setSelectedChunks(store.allChunks); this.hide(); }; /** * Handle document-wide `mousedown` events to detect clicks * outside the context menu. * @param {MouseEvent} event DOM mouse event object * @returns {void} */ handleDocumentMousedown = (event) => { const isSecondaryClick = event.ctrlKey || event.button === 2; if (!isSecondaryClick && elementIsOutside(event.target, this.node)) { event.preventDefault(); event.stopPropagation(); this.hide(); } }; hide() { if (this.props.onHide) { this.props.onHide(); } } saveNode = (node) => (this.node = node); getStyle() { const { boundingRect } = this; // Upon the first render of this component, we don't yet know // its dimensions, so can't position it yet if (!boundingRect) return; const { coords } = this.props; const pos = { left: coords.x, top: coords.y, }; if (pos.left + boundingRect.width > window.innerWidth) { // Shifting horizontally pos.left = window.innerWidth - boundingRect.width; } if (pos.top + boundingRect.height > window.innerHeight) { // Flipping vertically pos.top = coords.y - boundingRect.height; } return pos; } } ================================================ FILE: client/components/ContextMenuItem.css ================================================ .item { cursor: pointer; margin: 0; padding: 8px 14px; user-select: none; } .item:hover { background: #ffefd7; } .disabled { cursor: default; color: gray; } .item.disabled:hover { background: transparent; } ================================================ FILE: client/components/ContextMenuItem.jsx ================================================ import cls from "classnames"; import PropTypes from "prop-types"; import * as styles from "./ContextMenuItem.css"; /** * @returns {boolean} nothing */ function noop() { return false; } /** * @typedef {object} ContextMenuItemProps * @property {React.ReactNode} children children * @property {boolean=} disabled - true when disabled, otherwise false * @property {React.MouseEventHandler<HTMLLIElement>=} onClick on click handler */ /** * @param {ContextMenuItemProps} props props * @returns {JSX.Element} context menu item */ export default function ContextMenuItem({ children, disabled, onClick }) { const className = cls({ [styles.item]: true, [styles.disabled]: disabled, }); const handler = disabled ? noop : onClick; return ( <li className={className} onClick={handler}> {children} </li> ); } ContextMenuItem.propTypes = { disabled: PropTypes.bool, children: PropTypes.node.isRequired, onClick: PropTypes.func, }; ================================================ FILE: client/components/Dropdown.css ================================================ .container { font: var(--main-font); white-space: nowrap; } .label { font-size: 11px; font-weight: bold; margin-bottom: 7px; } .input { border: 1px solid var(--border-color); border-radius: 4px; display: block; width: 100%; color: var(--text-secondary); height: 27px; background: var(--bg-primary); transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; } .option { padding: 4px 0; cursor: pointer; } ================================================ FILE: client/components/Dropdown.jsx ================================================ import { createRef } from "preact"; import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import * as styles from "./Dropdown.css"; export default class Dropdown extends PureComponent { static propTypes = { label: PropTypes.string.isRequired, options: PropTypes.arrayOf(PropTypes.string).isRequired, onSelectionChange: PropTypes.func.isRequired, }; input = createRef(); state = { query: "", showOptions: false, }; componentDidMount() { document.addEventListener("click", this.handleClickOutside, true); } componentWillUnmount() { document.removeEventListener("click", this.handleClickOutside, true); } render() { const { label, options } = this.props; const filteredOptions = this.state.query ? options.filter((option) => option.toLowerCase().includes(this.state.query.toLowerCase()), ) : options; return ( <div className={styles.container}> <div className={styles.label}>{label}:</div> <div> <input ref={this.input} className={styles.input} type="text" value={this.state.query} onInput={this.handleInput} onFocus={this.handleFocus} /> {this.state.showOptions ? ( <div> {filteredOptions.map((option) => ( <div key={option} className={styles.option} onClick={this.getOptionClickHandler(option)} > {option} </div> ))} </div> ) : null} </div> </div> ); } handleClickOutside = (event) => { const el = this.input.current; if (el && event && !el.contains(event.target)) { this.setState({ showOptions: false }); // If the query is not in the options, reset the selection if (this.state.query && !this.props.options.includes(this.state.query)) { this.setState({ query: "" }); this.props.onSelectionChange(undefined); } } }; handleInput = (event) => { const { value } = event.target; this.setState({ query: value }); if (!value) { this.props.onSelectionChange(undefined); } }; handleFocus = () => { // move the cursor to the end of the input this.input.current.value = this.state.query; this.setState({ showOptions: true }); }; getOptionClickHandler = (option) => () => { this.props.onSelectionChange(option); this.setState({ query: option, showOptions: false }); }; } ================================================ FILE: client/components/Icon.css ================================================ .icon { background: no-repeat center/contain; display: inline-block; filter: invert(0); } [data-theme="dark"] .icon { filter: invert(1); } ================================================ FILE: client/components/Icon.jsx ================================================ import cls from "classnames"; import PropTypes from "prop-types"; import iconArrowRight from "../assets/icon-arrow-right.svg"; import iconMoon from "../assets/icon-moon.svg"; import iconPin from "../assets/icon-pin.svg"; import iconSun from "../assets/icon-sun.svg"; import PureComponent from "../lib/PureComponent.jsx"; import * as styles from "./Icon.css"; const ICONS = { "arrow-right": { src: iconArrowRight, size: [7, 13], }, pin: { src: iconPin, size: [12, 18], }, moon: { src: iconMoon, size: [24, 24], }, sun: { src: iconSun, size: [24, 24], }, }; export default class Icon extends PureComponent { static propTypes = { className: PropTypes.string, name: PropTypes.string.isRequired, size: PropTypes.number, rotate: PropTypes.number, }; render({ className }) { return <i className={cls(styles.icon, className)} style={this.style} />; } get style() { const { name, size, rotate } = this.props; const icon = ICONS[name]; if (!icon) throw new TypeError(`Can't find "${name}" icon.`); let [width, height] = icon.size; if (size) { const ratio = size / Math.max(width, height); width = Math.min(Math.ceil(width * ratio), size); height = Math.min(Math.ceil(height * ratio), size); } return { backgroundImage: `url(${icon.src})`, width: `${width}px`, height: `${height}px`, transform: rotate ? `rotate(${rotate}deg)` : "", }; } } ================================================ FILE: client/components/ModuleItem.css ================================================ .container { background: no-repeat left center; cursor: pointer; margin-bottom: 4px; padding-left: 18px; position: relative; white-space: nowrap; } .container.module { background-image: url("../assets/icon-module.svg"); background-position-x: 1px; } .container.folder { background-image: url("../assets/icon-folder.svg"); } .container.chunk { background-image: url("../assets/icon-chunk.svg"); } .container.invisible:hover::before { background: url("../assets/icon-invisible.svg") no-repeat left center; content: ""; height: 100%; left: 0; top: 1px; position: absolute; width: 13px; } ================================================ FILE: client/components/ModuleItem.jsx ================================================ import cls from "classnames"; import escapeRegExp from "escape-string-regexp"; import { filesize } from "filesize"; import { escape } from "html-escaper"; import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import * as styles from "./ModuleItem.css"; import { ModuleType, SizeType } from "./types.js"; export default class ModuleItem extends PureComponent { static propTypes = { module: ModuleType.isRequired, showSize: SizeType.isRequired, highlightedText: PropTypes.instanceOf(RegExp), isVisible: PropTypes.func.isRequired, onClick: PropTypes.func.isRequired, }; state = { visible: true, }; render({ module, showSize }) { const invisible = !this.state.visible; const classes = cls(styles.container, styles[this.itemType], { [styles.invisible]: invisible, }); return ( <div className={classes} title={invisible ? this.invisibleHint : null} onClick={this.handleClick} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} > <span dangerouslySetInnerHTML={{ __html: this.titleHtml }} /> {showSize && ( <> {" ("} <strong>{filesize(module[showSize])}</strong> {")"} </> )} </div> ); } get itemType() { const { module } = this.props; if (!module.path) return "chunk"; return module.groups ? "folder" : "module"; } get titleHtml() { let html; const { module } = this.props; const title = module.path || module.label; const term = this.props.highlightedText; if (term) { const regexp = term instanceof RegExp ? new RegExp(term.source, "igu") : new RegExp(`(?:${escapeRegExp(term)})+`, "iu"); let match; let lastMatch; do { lastMatch = match; match = regexp.exec(title); } while (match); if (lastMatch) { html = `${escape( title.slice(0, lastMatch.index), )}<strong>${escape(lastMatch[0])}</strong>${escape( title.slice(lastMatch.index + lastMatch[0].length), )}`; } } if (!html) { html = escape(title); } return html; } get invisibleHint() { const itemType = this.itemType.charAt(0).toUpperCase() + this.itemType.slice(1); return `${itemType} is not rendered in the treemap because it's too small.`; } get isVisible() { const { isVisible } = this.props; return isVisible ? isVisible(this.props.module) : true; } handleClick = () => this.props.onClick(this.props.module); handleMouseEnter = () => { if (this.props.isVisible) { this.setState({ visible: this.isVisible }); } }; } ================================================ FILE: client/components/ModulesList.css ================================================ .container { font: var(--main-font); } ================================================ FILE: client/components/ModulesList.jsx ================================================ import cls from "classnames"; import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import ModuleItem from "./ModuleItem.jsx"; import * as styles from "./ModulesList.css"; import { ModuleType, SizeType } from "./types.js"; export default class ModulesList extends PureComponent { static propTypes = { className: PropTypes.string, modules: PropTypes.arrayOf(ModuleType).isRequired, showSize: SizeType.isRequired, highlightedText: PropTypes.instanceOf(RegExp), isModuleVisible: PropTypes.func.isRequired, onModuleClick: PropTypes.func.isRequired, }; render({ modules, showSize, highlightedText, isModuleVisible, className }) { return ( <div className={cls(styles.container, className)}> {modules.map((module) => ( <ModuleItem key={module.cid} module={module} showSize={showSize} highlightedText={highlightedText} isVisible={isModuleVisible} onClick={this.handleModuleClick} /> ))} </div> ); } handleModuleClick = (module) => this.props.onModuleClick(module); } ================================================ FILE: client/components/ModulesTreemap.css ================================================ .container { align-items: stretch; display: flex; height: 100%; position: relative; width: 100%; } .map { flex: 1; } .sidebarGroup { font: var(--main-font); margin-bottom: 20px; } .showOption { margin-top: 5px; } .activeSize { font-weight: bold; } .foundModulesInfo { display: flex; font: var(--main-font); margin: 8px 0 0; } .foundModulesInfoItem + .foundModulesInfoItem { margin-left: 15px; } .foundModulesContainer { margin-top: 15px; max-height: 600px; overflow: auto; } .foundModulesChunk + .foundModulesChunk { margin-top: 15px; } .foundModulesChunkName { cursor: pointer; font: var(--main-font); font-weight: bold; margin-bottom: 7px; } .foundModulesList { margin-left: 7px; } ================================================ FILE: client/components/ModulesTreemap.jsx ================================================ import { filesize } from "filesize"; import { computed, makeObservable } from "mobx"; import { observer } from "mobx-react"; import { Component } from "preact"; import localStorage from "../localStorage.js"; import { store } from "../store.js"; import { isChunkParsed } from "../utils.js"; import Checkbox from "./Checkbox.jsx"; import CheckboxList from "./CheckboxList.jsx"; import ContextMenu from "./ContextMenu.jsx"; import Dropdown from "./Dropdown.jsx"; import ModulesList from "./ModulesList.jsx"; import * as styles from "./ModulesTreemap.css"; import Search from "./Search.jsx"; import Sidebar from "./Sidebar.jsx"; import Switcher from "./Switcher.jsx"; import Tooltip from "./Tooltip.jsx"; import Treemap from "./Treemap.jsx"; /** @typedef {"statSize" | "parsedSize" | "gzipSize" | "brotliSize" | "zstdSize"} PropSize */ /** * @returns {{ label: string, prop: PropSize }[]} sizes */ function getSizeSwitchItems() { const items = [ { label: "Stat", prop: "statSize" }, { label: "Parsed", prop: "parsedSize" }, ]; if (globalThis.compressionAlgorithm === "gzip") { items.push({ label: "Gzipped", prop: "gzipSize" }); } if (globalThis.compressionAlgorithm === "brotli") { items.push({ label: "Brotli", prop: "brotliSize" }); } if (globalThis.compressionAlgorithm === "zstd") { items.push({ label: "Zstandard", prop: "zstdSize" }); } return items; } class ModulesTreemap extends Component { mouseCoords = { x: 0, y: 0, }; state = { selectedChunk: null, selectedMouseCoords: { x: 0, y: 0 }, sidebarPinned: false, showChunkContextMenu: false, showTooltip: false, tooltipContent: null, }; constructor() { super(); makeObservable(this, { sizeSwitchItems: computed, activeSizeItem: computed, chunkItems: computed, highlightedModules: computed, foundModulesInfo: computed, }); } componentDidMount() { document.addEventListener("mousemove", this.handleMouseMove, true); } componentWillUnmount() { document.removeEventListener("mousemove", this.handleMouseMove, true); } render() { const { selectedChunk, selectedMouseCoords, sidebarPinned, showChunkContextMenu, showTooltip, tooltipContent, } = this.state; return ( <div className={styles.container}> <Sidebar pinned={sidebarPinned} onToggle={this.handleSidebarToggle} onPinStateChange={this.handleSidebarPinStateChange} onResize={this.handleSidebarResize} > <div className={styles.sidebarGroup}> <Switcher label="Treemap sizes" items={this.sizeSwitchItems} activeItem={this.activeSizeItem} onSwitch={this.handleSizeSwitch} /> {store.hasConcatenatedModules && ( <div className={styles.showOption}> <Checkbox checked={store.showConcatenatedModulesContent} onChange={this.handleConcatenatedModulesContentToggle} > {`Show content of concatenated modules${store.activeSize === "statSize" ? "" : " (inaccurate)"}`} </Checkbox> </div> )} </div> <div className={styles.sidebarGroup}> <Dropdown label="Filter to initial chunks" options={store.entrypoints} onSelectionChange={this.handleSelectionChange} /> </div> <div className={styles.sidebarGroup}> <Search label="Search modules" query={store.searchQuery} autofocus onQueryChange={this.handleQueryChange} /> <div className={styles.foundModulesInfo}> {this.foundModulesInfo} </div> {store.isSearching && store.hasFoundModules && ( <div className={styles.foundModulesContainer}> {store.foundModulesByChunk.map(({ chunk, modules }) => ( <div key={chunk.cid} className={styles.foundModulesChunk}> <div className={styles.foundModulesChunkName} onClick={() => this.treemap.zoomToGroup(chunk)} > {chunk.label} </div> <ModulesList className={styles.foundModulesList} modules={modules} showSize={store.activeSize} highlightedText={store.searchQueryRegexp} isModuleVisible={this.isModuleVisible} onModuleClick={this.handleFoundModuleClick} /> </div> ))} </div> )} </div> {this.chunkItems.length > 1 && ( <div className={styles.sidebarGroup}> <CheckboxList label="Show chunks" items={this.chunkItems} checkedItems={store.selectedChunks} renderLabel={this.renderChunkItemLabel} onChange={this.handleSelectedChunksChange} /> </div> )} </Sidebar> <Treemap ref={this.saveTreemapRef} className={styles.map} data={store.visibleChunks} highlightGroups={this.highlightedModules} weightProp={store.activeSize} onMouseLeave={this.handleMouseLeaveTreemap} onGroupHover={this.handleTreemapGroupHover} onGroupSecondaryClick={this.handleTreemapGroupSecondaryClick} onResize={this.handleResize} /> {tooltipContent && ( <Tooltip visible={showTooltip}>{tooltipContent}</Tooltip> )} <ContextMenu visible={showChunkContextMenu} chunk={selectedChunk} coords={selectedMouseCoords} onHide={this.handleChunkContextMenuHide} /> </div> ); } renderModuleSize(module, sizeType) { const sizeProp = `${sizeType}Size`; const size = module[sizeProp]; const sizeLabel = getSizeSwitchItems().find( (item) => item.prop === sizeProp, ).label; const isActive = store.activeSize === sizeProp; return typeof size === "number" ? ( <div className={isActive ? styles.activeSize : ""}> {sizeLabel} size: <strong>{filesize(size)}</strong> </div> ) : null; } renderChunkItemLabel = (item) => { const isAllItem = item === CheckboxList.ALL_ITEM; const label = isAllItem ? "All" : item.label; const size = isAllItem ? store.totalChunksSize : item[store.activeSize]; return ( <> {label} (<strong>{filesize(size)}</strong>) </> ); }; get sizeSwitchItems() { return store.hasParsedSizes ? getSizeSwitchItems() : getSizeSwitchItems().slice(0, 1); } get activeSizeItem() { return this.sizeSwitchItems.find((item) => item.prop === store.activeSize); } get chunkItems() { const { allChunks, activeSize } = store; let chunkItems = [...allChunks]; if (activeSize !== "statSize") { chunkItems = chunkItems.filter(isChunkParsed); } chunkItems.sort( (chunk1, chunk2) => chunk2[activeSize] - chunk1[activeSize], ); return chunkItems; } get highlightedModules() { return new Set(store.foundModules); } get foundModulesInfo() { if (!store.isSearching) { // ` ` to reserve space return "\u00A0"; } if (store.hasFoundModules) { return ( <> <div className={styles.foundModulesInfoItem}> Count: <strong>{store.foundModules.length}</strong> </div> <div className={styles.foundModulesInfoItem}> Total size: <strong>{filesize(store.foundModulesSize)}</strong> </div> </> ); } return `Nothing found${store.allChunksSelected ? "" : " in selected chunks"}`; } handleSelectionChange = (selected) => { if (!selected) { store.setSelectedChunks(store.allChunks); return; } store.setSelectedChunks( store.allChunks.filter( (chunk) => chunk.isInitialByEntrypoint[selected] ?? false, ), ); }; handleConcatenatedModulesContentToggle = (flag) => { store.showConcatenatedModulesContent = flag; if (flag) { localStorage.setItem("showConcatenatedModulesContent", true); } else { localStorage.removeItem("showConcatenatedModulesContent"); } }; handleChunkContextMenuHide = () => { this.setState({ showChunkContextMenu: false, }); }; handleResize = () => { // Close any open context menu when the report is resized, // so it doesn't show in an incorrect position if (this.state.showChunkContextMenu) { this.setState({ showChunkContextMenu: false, }); } }; handleSidebarToggle = () => { if (this.state.sidebarPinned) { setTimeout(() => this.treemap.resize()); } }; handleSidebarPinStateChange = (pinned) => { this.setState({ sidebarPinned: pinned }); setTimeout(() => this.treemap.resize()); }; handleSidebarResize = () => { this.treemap.resize(); }; handleSizeSwitch = (sizeSwitchItem) => { store.setSelectedSize(sizeSwitchItem.prop); }; handleQueryChange = (query) => { store.setSearchQuery(query); }; handleSelectedChunksChange = (selectedChunks) => { store.setSelectedSize(selectedChunks); }; handleMouseLeaveTreemap = () => { this.setState({ showTooltip: false }); }; handleTreemapGroupSecondaryClick = (event) => { const { group } = event; if (group && group.isAsset) { this.setState({ selectedChunk: group, selectedMouseCoords: { ...this.mouseCoords }, showChunkContextMenu: true, }); } else { this.setState({ selectedChunk: null, showChunkContextMenu: false, }); } }; handleTreemapGroupHover = (event) => { const { group } = event; if (group) { this.setState({ showTooltip: true, tooltipContent: this.getTooltipContent(group), }); } else { this.setState({ showTooltip: false }); } }; handleFoundModuleClick = (module) => this.treemap.zoomToGroup(module); handleMouseMove = (event) => { Object.assign(this.mouseCoords, { x: event.pageX, y: event.pageY, }); }; isModuleVisible = (module) => this.treemap.isGroupRendered(module); saveTreemapRef = (treemap) => (this.treemap = treemap); getTooltipContent(module) { if (!module) return null; return ( <div> <div> <strong>{module.label}</strong> </div> <br /> {this.renderModuleSize(module, "stat")} {!module.inaccurateSizes && this.renderModuleSize(module, "parsed")} {!module.inaccurateSizes && this.renderModuleSize(module, globalThis.compressionAlgorithm)} {module.path && ( <div> Path: <strong>{module.path}</strong> </div> )} {module.isAsset && ( <div> <br /> <strong> <em>Right-click to view options related to this chunk</em> </strong> </div> )} </div> ); } } export default observer(ModulesTreemap); ================================================ FILE: client/components/Search.css ================================================ .container { font: var(--main-font); white-space: nowrap; } .label { font-weight: bold; margin-bottom: 7px; } .row { display: flex; } .input { border: 1px solid var(--border-color); border-radius: 4px; display: block; flex: 1; padding: 5px; background: var(--bg-primary); color: var(--text-primary); transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; } .input:focus { outline: none; border-color: var(--text-secondary); } .clear { flex: 0 0 auto; line-height: 1; margin-left: 3px; padding: 5px 8px 7px; } ================================================ FILE: client/components/Search.jsx ================================================ // TODO: switch to a more modern debounce package once we drop Node.js 10 support import debounce from "debounce"; import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import Button from "./Button.jsx"; import * as styles from "./Search.css"; export default class Search extends PureComponent { static propTypes = { className: PropTypes.string, label: PropTypes.string.isRequired, query: PropTypes.string.isRequired, autofocus: PropTypes.bool, onQueryChange: PropTypes.func.isRequired, }; componentDidMount() { if (this.props.autofocus) { this.focus(); } } componentWillUnmount() { this.handleValueChange.clear(); } render() { const { label, query } = this.props; return ( <div className={styles.container}> <div className={styles.label}>{label}:</div> <div className={styles.row}> <input ref={this.saveInputNode} className={styles.input} type="text" value={query} placeholder="Enter regexp" onInput={this.handleValueChange} onBlur={this.handleInputBlur} onKeyDown={this.handleKeyDown} /> <Button className={styles.clear} onClick={this.handleClearClick}> x </Button> </div> </div> ); } handleValueChange = debounce((event) => { this.informChange(event.target.value); }, 400); handleInputBlur = () => { this.handleValueChange.flush(); }; handleClearClick = () => { this.clear(); this.focus(); }; handleKeyDown = (event) => { let handled = true; switch (event.key) { case "Escape": this.clear(); break; case "Enter": this.handleValueChange.flush(); break; default: handled = false; } if (handled) { event.stopPropagation(); } }; focus() { if (this.input) { this.input.focus(); } } clear() { this.handleValueChange.clear(); this.informChange(""); this.input.value = ""; } informChange(value) { this.props.onQueryChange(value); } saveInputNode = (node) => (this.input = node); } ================================================ FILE: client/components/Sidebar.css ================================================ .container { background: var(--bg-primary); border: none; border-right: 1px solid var(--border-color); box-sizing: border-box; max-width: calc(50% - 10px); opacity: 0.95; z-index: 1; transition: background-color 0.3s ease, border-color 0.3s ease; } .container:not(.hidden) { min-width: 200px; } .container:not(.pinned) { bottom: 0; position: absolute; top: 0; transition: transform 200ms ease; } .container.pinned { position: relative; } .container.left { left: 0; } .container.left.hidden { transform: translateX(calc(-100% + 7px)); } .content { box-sizing: border-box; height: 100%; overflow-y: auto; padding: 25px 20px 20px; width: 100%; } .empty.pinned .content { padding: 0; } .container :global(.themeToggle) { position: absolute; top: 10px; left: 15px; z-index: 10; height: 26px; width: 27px; padding: 0; } .pinButton, .toggleButton { cursor: pointer; height: 26px; line-height: 0; position: absolute; top: 10px; width: 27px; } .pinButton { right: 47px; } .toggleButton { padding-left: 6px; right: 15px; } .hidden .toggleButton { right: -35px; transition: transform 0.2s ease; } .hidden .toggleButton:hover { transform: translateX(4px); } .resizer { bottom: 0; cursor: col-resize; position: absolute; right: 0; top: 0; width: 7px; } :export { toggleTime: 200ms; } ================================================ FILE: client/components/Sidebar.jsx ================================================ import cls from "classnames"; import { Component } from "preact"; import PropTypes from "prop-types"; import Button from "./Button.jsx"; import Icon from "./Icon.jsx"; import * as styles from "./Sidebar.css"; import ThemeToggle from "./ThemeToggle.jsx"; const toggleTime = Number.parseInt(styles.toggleTime, 10); export default class Sidebar extends Component { static propTypes = { pinned: PropTypes.bool.isRequired, position: PropTypes.string, onToggle: PropTypes.func.isRequired, onResize: PropTypes.func.isRequired, onPinStateChange: PropTypes.func.isRequired, children: PropTypes.node.isRequired, }; static defaultProps = { pinned: false, position: "left", }; allowHide = true; toggling = false; hideContentTimeout = null; width = null; state = { visible: true, renderContent: true, }; componentDidMount() { this.hideTimeoutId = setTimeout(() => this.toggleVisibility(false), 3000); } componentWillUnmount() { clearTimeout(this.hideTimeoutId); clearTimeout(this.hideContentTimeout); } render() { const { position, pinned, children } = this.props; const { visible, renderContent } = this.state; const className = cls({ [styles.container]: true, [styles.pinned]: pinned, [styles.left]: position === "left", [styles.hidden]: !visible, [styles.empty]: !renderContent, }); return ( <div ref={this.saveNode} className={className} onClick={this.handleClick} onMouseLeave={this.handleMouseLeave} > <ThemeToggle /> {visible && ( <Button type="button" title="Pin" className={styles.pinButton} active={pinned} toggle onClick={this.handlePinButtonClick} > <Icon name="pin" size={13} /> </Button> )} <Button type="button" title={visible ? "Hide" : "Show sidebar"} className={styles.toggleButton} onClick={this.handleToggleButtonClick} > <Icon name="arrow-right" size={10} rotate={visible ? 180 : 0} /> </Button> {pinned && visible && ( <div className={styles.resizer} onMouseDown={this.handleResizeStart} /> )} <div className={styles.content} onMouseEnter={this.handleMouseEnter} onMouseMove={this.handleMouseMove} > {renderContent ? children : null} </div> </div> ); } handleClick = () => { this.allowHide = false; }; handleMouseEnter = () => { if (!this.toggling && !this.props.pinned) { clearTimeout(this.hideTimeoutId); this.toggleVisibility(true); } }; handleMouseMove = () => { this.allowHide = true; }; handleMouseLeave = () => { if (this.allowHide && !this.toggling && !this.props.pinned) { this.toggleVisibility(false); } }; handleToggleButtonClick = () => { this.toggleVisibility(); }; handlePinButtonClick = () => { const pinned = !this.props.pinned; this.width = pinned ? this.node.getBoundingClientRect().width : null; this.updateNodeWidth(); this.props.onPinStateChange(pinned); }; handleResizeStart = (event) => { this.resizeInfo = { startPageX: event.pageX, initialWidth: this.width, }; document.body.classList.add("resizing", "col"); document.addEventListener("mousemove", this.handleResize, true); document.addEventListener("mouseup", this.handleResizeEnd, true); }; handleResize = (event) => { this.width = this.resizeInfo.initialWidth + (event.pageX - this.resizeInfo.startPageX); this.updateNodeWidth(); }; handleResizeEnd = () => { document.body.classList.remove("resizing", "col"); document.removeEventListener("mousemove", this.handleResize, true); document.removeEventListener("mouseup", this.handleResizeEnd, true); this.props.onResize(); }; toggleVisibility(flag) { clearTimeout(this.hideContentTimeout); const { visible } = this.state; const { onToggle, pinned } = this.props; if (flag === undefined) { flag = !visible; } else if (flag === visible) { return; } this.setState({ visible: flag }); this.toggling = true; setTimeout(() => { this.toggling = false; }, toggleTime); if (pinned) { this.updateNodeWidth(flag ? this.width : null); } if (flag || pinned) { this.setState({ renderContent: flag }); onToggle(flag); } else if (!flag) { // Waiting for the CSS animation to finish and hiding content this.hideContentTimeout = setTimeout(() => { this.hideContentTimeout = null; this.setState({ renderContent: false }); onToggle(false); }, toggleTime); } } saveNode = (node) => (this.node = node); updateNodeWidth(width = this.width) { this.node.style.width = width ? `${width}px` : ""; } } ================================================ FILE: client/components/Switcher.css ================================================ .container { font: var(--main-font); white-space: nowrap; } .label { font-weight: bold; font-size: 11px; margin-bottom: 7px; } .item + .item { margin-left: 5px; } ================================================ FILE: client/components/Switcher.jsx ================================================ import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import * as styles from "./Switcher.css"; import SwitcherItem from "./SwitcherItem.jsx"; import { SwitcherItemType } from "./types.js"; export default class Switcher extends PureComponent { static propTypes = { label: PropTypes.string.isRequired, items: PropTypes.arrayOf(SwitcherItemType).isRequired, activeItem: SwitcherItemType.isRequired, onSwitch: PropTypes.func.isRequired, }; render() { const { label, items, activeItem, onSwitch } = this.props; return ( <div className={styles.container}> <div className={styles.label}>{label}:</div> <div> {items.map((item) => ( <SwitcherItem key={item.label} className={styles.item} item={item} active={item === activeItem} onClick={onSwitch} /> ))} </div> </div> ); } } ================================================ FILE: client/components/SwitcherItem.jsx ================================================ import PropTypes from "prop-types"; import PureComponent from "../lib/PureComponent.jsx"; import Button from "./Button.jsx"; import { SwitcherItemType } from "./types.js"; export default class SwitcherItem extends PureComponent { static propTypes = { active: PropTypes.bool.isRequired, item: SwitcherItemType.isRequired, onClick: PropTypes.func.isRequired, }; render({ item, ...props }) { return ( <Button {...props} onClick={this.handleClick}> {item.label} </Button> ); } handleClick = () => { this.props.onClick(this.props.item); }; } ================================================ FILE: client/components/ThemeToggle.css ================================================ .themeToggle { background: transparent; border: none; cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background-color 0.2s ease; } .themeToggle:hover { background: rgba(0, 0, 0, 0.1); } [data-theme="dark"] .themeToggle:hover { background: rgba(255, 255, 255, 0.1); } ================================================ FILE: client/components/ThemeToggle.jsx ================================================ import { observer } from "mobx-react"; import { Component } from "preact"; import { store } from "../store.js"; import Button from "./Button.jsx"; import Icon from "./Icon.jsx"; import * as styles from "./ThemeToggle.css"; class ThemeToggle extends Component { render() { const { darkMode } = store; return ( <Button type="button" title={darkMode ? "Switch to Light Mode" : "Switch to Dark Mode"} className={styles.themeToggle} onClick={this.handleToggle} > <Icon name={darkMode ? "sun" : "moon"} size={16} /> </Button> ); } handleToggle = () => { store.toggleDarkMode(); }; } export default observer(ThemeToggle); ================================================ FILE: client/components/Tooltip.css ================================================ .container { font: var(--main-font); position: absolute; padding: 5px 10px; border-radius: 4px; background: #fff; border: 1px solid #aaa; opacity: 0.9; white-space: nowrap; visibility: visible; transition: opacity 0.2s ease, visibility 0.2s ease; } .hidden { opacity: 0; visibility: hidden; } :global(html[data-theme="dark"]) .container { background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border-color); } ================================================ FILE: client/components/Tooltip.jsx ================================================ import cls from "classnames"; import { Component } from "preact"; import PropTypes from "prop-types"; import * as styles from "./Tooltip.css"; export default class Tooltip extends Component { static propTypes = { visible: PropTypes.bool.isRequired, children: PropTypes.node.isRequired, }; static marginX = 10; static marginY = 30; mouseCoords = { x: 0, y: 0, }; state = { left: 0, top: 0, }; componentDidMount() { document.addEventListener("mousemove", this.handleMouseMove, true); } shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible; } componentWillUnmount() { document.removeEventListener("mousemove", this.handleMouseMove, true); } render() { const { children, visible } = this.props; const className = cls({ [styles.container]: true, [styles.hidden]: !visible, }); return ( <div ref={this.saveNode} className={className} style={this.getStyle()}> {children} </div> ); } handleMouseMove = (event) => { Object.assign(this.mouseCoords, { x: event.pageX, y: event.pageY, }); if (this.props.visible) { this.updatePosition(); } }; saveNode = (node) => (this.node = node); getStyle() { return { left: this.state.left, top: this.state.top, }; } updatePosition() { if (!this.props.visible) return; const pos = { left: this.mouseCoords.x + Tooltip.marginX, top: this.mouseCoords.y + Tooltip.marginY, }; const boundingRect = this.node.getBoundingClientRect(); if (pos.left + boundingRect.width > window.innerWidth) { // Shifting horizontally pos.left = window.innerWidth - boundingRect.width; } if (pos.top + boundingRect.height > window.innerHeight) { // Flipping vertically pos.top = this.mouseCoords.y - Tooltip.marginY - boundingRect.height; } this.setState(pos); } } ================================================ FILE: client/components/Treemap.jsx ================================================ import FoamTree from "@carrotsearch/foamtree"; import { Component } from "preact"; import PropTypes from "prop-types"; import { SizeType, ViewerDataType } from "./types.js"; /** * @param {Event} event event */ function preventDefault(event) { event.preventDefault(); } /** * @param {string} str string * @returns {number} hash */ function hashCode(str) { let hash = 0; for (let i = 0; i < str.length; i++) { const code = str.charCodeAt(i); hash = (hash << 5) - hash + code; hash &= hash; } return hash; } export default class Treemap extends Component { static propTypes = { classname: PropTypes.string, data: ViewerDataType.isRequired, highlightGroups: PropTypes.instanceOf(Set).isRequired, weightProp: SizeType.isRequired, onGroupHover: PropTypes.func, onGroupSecondaryClick: PropTypes.func, onMouseLeave: PropTypes.func, onResize: PropTypes.func, }; constructor(props) { super(props); this.treemap = null; this.zoomOutDisabled = false; this.findChunkNamePartIndex(); } componentDidMount() { this.treemap = this.createTreemap(); window.addEventListener("resize", this.resize); } componentWillReceiveProps(nextProps) { if (nextProps.data !== this.props.data) { this.findChunkNamePartIndex(); this.treemap.set({ dataObject: this.getTreemapDataObject(nextProps.data), }); } else if (nextProps.highlightGroups !== this.props.highlightGroups) { setTimeout(() => this.treemap.redraw()); } } shouldComponentUpdate() { return false; } componentWillUnmount() { window.removeEventListener("resize", this.resize); this.treemap.dispose(); } render() { return <div {...this.props} ref={this.saveNodeRef} />; } saveNodeRef = (node) => (this.node = node); getTreemapDataObject(data = this.props.data) { return { groups: data }; } createTreemap() { const component = this; const { props } = this; return new FoamTree({ element: this.node, layout: "squarified", stacking: "flattened", pixelRatio: window.devicePixelRatio || 1, maxGroups: Infinity, maxGroupLevelsDrawn: Infinity, maxGroupLabelLevelsDrawn: Infinity, maxGroupLevelsAttached: Infinity, wireframeLabelDrawing: "always", groupMinDiameter: 0, groupLabelVerticalPadding: 0.2, rolloutDuration: 0, pullbackDuration: 0, fadeDuration: 0, groupExposureZoomMargin: 0.2, zoomMouseWheelDuration: 300, openCloseDuration: 200, dataObject: this.getTreemapDataObject(), titleBarDecorator(opts, props, vars) { vars.titleBarShown = false; }, groupColorDecorator(options, properties, variables) { const root = component.getGroupRoot(properties.group); const chunkName = component.getChunkNamePart(root.label); const hash = /[^0-9]/u.test(chunkName) ? hashCode(chunkName) : (Number.parseInt(chunkName, 10) / 1000) * 360; variables.groupColor = { model: "hsla", h: Math.round(Math.abs(hash) % 360), s: 60, l: 50, a: 0.9, }; const { highlightGroups } = component.props; const module = properties.group; if (highlightGroups && highlightGroups.has(module)) { variables.groupColor = { model: "rgba", r: 255, g: 0, b: 0, a: 0.8, }; } else if (highlightGroups && highlightGroups.size > 0) { // this means a search (e.g.) is active, but this module // does not match; gray it out // https://github.com/webpack/webpack-bundle-analyzer/issues/553 variables.groupColor.s = 10; } }, /** * Handle Foamtree's "group clicked" event * @param {FoamtreeEvent} event foamtree event object (see https://get.carrotsearch.com/foamtree/demo/api/index.html#event-details) * @returns {void} */ onGroupClick(event) { preventDefault(event); if ((event.ctrlKey || event.secondary) && props.onGroupSecondaryClick) { props.onGroupSecondaryClick.call(component, event); return; } component.zoomOutDisabled = false; this.zoom(event.group); }, onGroupDoubleClick: preventDefault, onGroupHover(event) { // Ignoring hovering on `FoamTree` branding group and the root group if ( event.group && (event.group.attribution || event.group === this.get("dataObject")) ) { event.preventDefault(); if (props.onMouseLeave) { props.onMouseLeave.call(component, event); } return; } if (props.onGroupHover) { props.onGroupHover.call(component, event); } }, onGroupMouseWheel(event) { const { scale } = this.get("viewport"); const isZoomOut = event.delta < 0; if (isZoomOut) { if (component.zoomOutDisabled) return preventDefault(event); if (scale < 1) { component.zoomOutDisabled = true; preventDefault(event); } } else { component.zoomOutDisabled = false; } }, }); } getGroupRoot(group) { let nextParent; while ( !group.isAsset && (nextParent = this.treemap.get("hierarchy", group).parent) ) { group = nextParent; } return group; } zoomToGroup(group) { this.zoomOutDisabled = false; while (group && !this.treemap.get("state", group).revealed) { group = this.treemap.get("hierarchy", group).parent; } if (group) { this.treemap.zoom(group); } } isGroupRendered(group) { const groupState = this.treemap.get("state", group); return Boolean(groupState) && groupState.revealed; } update() { this.treemap.update(); } resize = () => { const { props } = this; this.treemap.resize(); if (props.onResize) { props.onResize(); } }; /** * Finds patterns across all chunk names to identify the unique "name" part. */ findChunkNamePartIndex() { const splitChunkNames = this.props.data.map((chunk) => chunk.label.split(/[^a-z0-9]/iu), ); const longestSplitName = Math.max( ...splitChunkNames.map((parts) => parts.length), ); const namePart = { index: 0, votes: 0, }; for (let i = longestSplitName - 1; i >= 0; i--) { const identifierVotes = { name: 0, hash: 0, ext: 0, }; let lastChunkPart = ""; for (const splitChunkName of splitChunkNames) { const part = splitChunkName[i]; if (part === undefined || part === "") { continue; } if (part === lastChunkPart) { identifierVotes.ext++; } else if ( /[a-z]/u.test(part) && /[0-9]/u.test(part) && part.length === lastChunkPart.length ) { identifierVotes.hash++; } else if (/^[a-z]+$/iu.test(part) || /^[0-9]+$/u.test(part)) { identifierVotes.name++; } lastChunkPart = part; } if (identifierVotes.name >= namePart.votes) { namePart.index = i; namePart.votes = identifierVotes.name; } } this.chunkNamePartIndex = namePart.index; } getChunkNamePart(chunkLabel) { return ( chunkLabel.split(/[^a-z0-9]/iu)[this.chunkNamePartIndex] || chunkLabel ); } } ================================================ FILE: client/components/types.js ================================================ import PropTypes from "prop-types"; export const GroupType = PropTypes.shape({ cid: PropTypes.number.isRequired, label: PropTypes.string.isRequired, path: PropTypes.string.isRequired, // eslint-disable-next-line new-cap groups: PropTypes.arrayOf((...args) => GroupType(...args)), statSize: PropTypes.number.isRequired, parsedSize: PropTypes.number.isRequired, gzipSize: PropTypes.number, brotliSize: PropTypes.number, zstdSize: PropTypes.number, }); export const ViewerDataItemType = PropTypes.shape({ cid: PropTypes.number.isRequired, label: PropTypes.string.isRequired, isAsset: PropTypes.bool, statSize: PropTypes.number.isRequired, parsedSize: PropTypes.number.isRequired, gzipSize: PropTypes.number, brotliSize: PropTypes.number, zstdSize: PropTypes.number, groups: PropTypes.arrayOf(GroupType).isRequired, isInitialByEntrypoint: PropTypes.objectOf(PropTypes.bool), }); export const ViewerDataType = PropTypes.arrayOf(ViewerDataItemType); export const ModuleType = PropTypes.shape({ cid: PropTypes.number.isRequired, label: PropTypes.string.isRequired, path: PropTypes.string, statSize: PropTypes.number.isRequired, parsedSize: PropTypes.number.isRequired, gzipSize: PropTypes.number, brotliSize: PropTypes.number, zstdSize: PropTypes.number, weight: PropTypes.number.isRequired, }); export const SizeType = PropTypes.oneOf(["statSize", "parsedSize", "gzipSize"]); export const SwitcherItemType = PropTypes.shape({ label: PropTypes.string, prop: SizeType, }); ================================================ FILE: client/lib/PureComponent.jsx ================================================ import { Component } from "preact"; /** * @param {object} obj1 obj1 * @param {object} obj2 obj2 * @returns {boolean} true when the same, otherwise false */ function isEqual(obj1, obj2) { if (obj1 === obj2) return true; const keys = Object.keys(obj1); if (keys.length !== Object.keys(obj2).length) return false; for (let i = 0; i < keys.length; i++) { const key = keys[i]; if (obj1[key] !== obj2[key]) return false; } return true; } export default class PureComponent extends Component { shouldComponentUpdate(nextProps, nextState) { return !isEqual(nextProps, this.props) || !isEqual(this.state, nextState); } } ================================================ FILE: client/localStorage.js ================================================ const KEY_PREFIX = "wba"; export default { getItem(key) { try { return JSON.parse( globalThis.localStorage.getItem(`${KEY_PREFIX}.${key}`), ); } catch { return null; } }, setItem(key, value) { try { globalThis.localStorage.setItem( `${KEY_PREFIX}.${key}`, JSON.stringify(value), ); } catch { /* ignored */ } }, removeItem(key) { try { globalThis.localStorage.removeItem(`${KEY_PREFIX}.${key}`); } catch { /* ignored */ } }, }; ================================================ FILE: client/store.js ================================================ import { action, computed, makeObservable, observable } from "mobx"; import localStorage from "./localStorage.js"; import { isChunkParsed, walkModules } from "./utils.js"; export class Store { cid = 0; sizes = new Set([ "statSize", "parsedSize", "gzipSize", "brotliSize", "zstdSize", ]); allChunks; selectedChunks; searchQuery = ""; defaultSize; selectedSize; showConcatenatedModulesContent = localStorage.getItem("showConcatenatedModulesContent") === true; darkMode = (() => { const systemPrefersDark = globalThis.matchMedia( "(prefers-color-scheme: dark)", ).matches; try { const saved = localStorage.getItem("darkMode"); if (saved !== null) return saved === "true"; } catch { // Some browsers might not have localStorage available and we can fail silently } return systemPrefersDark; })(); constructor() { makeObservable(this, { allChunks: observable.ref, selectedChunks: observable.shallow, searchQuery: observable, defaultSize: observable, selectedSize: observable, showConcatenatedModulesContent: observable, darkMode: observable, toggleDarkMode: action, setModules: action, setSelectedChunks: action, setSelectedSize: action, setSearchQuery: action, hasParsedSizes: computed, activeSize: computed, visibleChunks: computed, allChunksSelected: computed, totalChunksSize: computed, searchQueryRegexp: computed, isSearching: computed, foundModulesByChunk: computed, foundModules: computed, hasFoundModules: computed, hasConcatenatedModules: computed, foundModulesSize: computed, }); } setModules(modules) { walkModules(modules, (module) => { module.cid = this.cid++; }); this.allChunks = modules; this.selectedChunks = this.allChunks; } setEntrypoints(entrypoints) { this.entrypoints = entrypoints; } get hasParsedSizes() { return this.allChunks.some(isChunkParsed); } setSelectedSize(selectedSize) { this.selectedSize = selectedSize; } get activeSize() { const activeSize = this.selectedSize || this.defaultSize; if (!this.hasParsedSizes || !this.sizes.has(activeSize)) { return "statSize"; } return activeSize; } setSelectedChunks(chunks) { this.selectedChunks = chunks; } get visibleChunks() { const visibleChunks = this.allChunks.filter((chunk) => this.selectedChunks.includes(chunk), ); return this.filterModulesForSize(visibleChunks, this.activeSize); } get allChunksSelected() { return this.visibleChunks.length === this.allChunks.length; } get totalChunksSize() { return this.allChunks.reduce( (totalSize, chunk) => totalSize + (chunk[this.activeSize] || 0), 0, ); } get searchQueryRegexp() { const query = this.searchQuery.trim(); if (!query) { return null; } try { return new RegExp(query, "iu"); } catch { return null; } } get isSearching() { return Boolean(this.searchQueryRegexp); } get foundModulesByChunk() { if (!this.isSearching) { return []; } const query = this.searchQueryRegexp; return this.visibleChunks .map((chunk) => { let foundGroups = []; walkModules(chunk.groups, (module) => { let weight = 0; /** * Splitting found modules/directories into groups: * * 1) Module with matched label (weight = 4) * 2) Directory with matched label (weight = 3) * 3) Module with matched path (weight = 2) * 4) Directory with matched path (weight = 1) */ if (query.test(module.label)) { weight += 3; } else if (module.path && query.test(module.path)) { weight++; } if (!weight) return; if (!module.groups) { weight += 1; } const foundModules = (foundGroups[weight - 1] = foundGroups[weight - 1] || []); foundModules.push(module); }); const { activeSize } = this; // Filtering out missing groups foundGroups = foundGroups.filter(Boolean).reverse(); // Sorting each group by active size for (const modules of foundGroups) { modules.sort((m1, m2) => m2[activeSize] - m1[activeSize]); } return { chunk, modules: foundGroups.flat(), }; }) .filter((result) => result.modules.length > 0) .toSorted((c1, c2) => c1.modules.length - c2.modules.length); } setSearchQuery(query) { this.searchQuery = query; } get foundModules() { return this.foundModulesByChunk.reduce( (arr, chunk) => [...arr, ...chunk.modules], [], ); } get hasFoundModules() { return this.foundModules.length > 0; } get hasConcatenatedModules() { let result = false; walkModules(this.visibleChunks, (module) => { if (module.concatenated) { result = true; return false; } }); return result; } get foundModulesSize() { return this.foundModules.reduce( (summ, module) => summ + module[this.activeSize], 0, ); } filterModulesForSize(modules, sizeProp) { return modules.reduce((filteredModules, module) => { if (module[sizeProp]) { if (module.groups) { const showContent = !module.concatenated || this.showConcatenatedModulesContent; module = { ...module, groups: showContent ? this.filterModulesForSize(module.groups, sizeProp) : null, }; } module.weight = module[sizeProp]; filteredModules.push(module); } return filteredModules; }, []); } toggleDarkMode() { this.darkMode = !this.darkMode; try { localStorage.setItem("darkMode", this.darkMode); } catch { // Some browsers might not have localStorage available and we can fail silently } this.updateTheme(); } updateTheme() { if (this.darkMode) { document.documentElement.dataset.theme = "dark"; } else { delete document.documentElement.dataset.theme; } } } export const store = new Store(); ================================================ FILE: client/utils.js ================================================ /** * @param {Chunk} chunk chunk * @returns {boolean} true when chunk is parser, otherwise false */ export function isChunkParsed(chunk) { return typeof chunk.parsedSize === "number"; } /** * @param {Module[]} modules modules * @param {(module: Module) => boolean} cb callback * @returns {boolean} state */ export function walkModules(modules, cb) { for (const module of modules) { if (cb(module) === false) return false; if (module.groups && walkModules(module.groups, cb) === false) { return false; } } } /** * @template T * @param {T} elem element * @param {T[]} container container * @returns {boolean} true when element is outside, otherwise false */ export function elementIsOutside(elem, container) { return !(elem === container || container.contains(elem)); } ================================================ FILE: client/viewer.css ================================================ :root { --main-font: normal 11px Verdana, sans-serif; --bg-primary: #fff; --bg-secondary: #f5f5f5; --text-primary: #000; --text-secondary: #666; --border-color: #aaa; --border-light: #ddd; --shadow: rgba(0, 0, 0, 0.1); --hover-bg: rgba(0, 0, 0, 0.05); } [data-theme="dark"] { --bg-primary: #1e1e1e; --bg-secondary: #252525; --text-primary: #e0e0e0; --text-secondary: #a0a0a0; --border-color: #404040; --border-light: #333; --shadow: rgba(0, 0, 0, 0.3); --hover-bg: rgba(255, 255, 255, 0.05); } :global html, :global body, :global #app { height: 100%; margin: 0; overflow: hidden; padding: 0; width: 100%; background: var(--bg-primary); color: var(--text-primary); transition: background-color 0.3s ease, color 0.3s ease; } :global body.resizing { user-select: none !important; } :global body.resizing * { pointer-events: none; } :global body.resizing.col { cursor: col-resize !important; } ================================================ FILE: client/viewer.jsx ================================================ import { render } from "preact"; import ModulesTreemap from "./components/ModulesTreemap.jsx"; import { store } from "./store.js"; import "./viewer.css"; // Initializing WebSocket for live treemap updates let ws; try { if (globalThis.enableWebSocket) { ws = new WebSocket(`ws://${location.host}`); } } catch { // eslint-disable-next-line no-console console.warn( "Couldn't connect to analyzer websocket server so you'll have to reload page manually to see updates in the treemap", ); } window.addEventListener( "load", () => { store.defaultSize = `${globalThis.defaultSizes}Size`; store.setModules(globalThis.chartData); store.setEntrypoints(globalThis.entrypoints); store.updateTheme(); render(<ModulesTreemap />, document.querySelector("#app")); if (ws) { ws.addEventListener("message", (event) => { const msg = JSON.parse(event.data); if (msg.event === "chartDataUpdated") { store.setModules(msg.data); } }); } }, false, ); ================================================ FILE: eslint.config.mjs ================================================ import { defineConfig, globalIgnores } from "eslint/config"; import config from "eslint-config-webpack"; import configs from "eslint-config-webpack/configs.js"; export default defineConfig([ globalIgnores([ // Ignore some test files "lib/**/*", "public/**/*", "test/src/**/*", "test/dev-server/**/*", "test/bundles/**/*", "test/stats/**/*", "test/output/**/*", ]), { ignores: ["client/**/*", "src/tree/**/*", "src/sizeUtils.js"], extends: [config], rules: { // We use babel so it will be applied by default strict: "off", }, }, { files: ["src/bin/**/*"], rules: { "no-console": "off", "n/hashbang": "off", "n/no-process-exit": "off", "unicorn/prefer-top-level-await": "off", }, }, { files: ["src/tree/**/*", "src/sizeUtils.js"], extends: [configs["node-recommended-module"]], }, { files: ["client/**/*"], extends: [configs["browser-recommended"]], rules: { // TODO fix me in future "react/no-deprecated": "off", }, }, ]); ================================================ FILE: jest.config.js ================================================ "use strict"; // Jest configuration // Reference: https://jestjs.io/docs/configuration module.exports = { testTimeout: 15000, testMatch: ["**/test/*.js"], testPathIgnorePatterns: ["<rootDir>/test/helpers.js"], setupFilesAfterEnv: ["<rootDir>/test/helpers.js"], coveragePathIgnorePatterns: ["<rootDir>/test"], watchPathIgnorePatterns: [ // Ignore the output generated by plugin tests // when watching for changes to avoid the test // runner continuously re-running tests "<rootDir>/test/output", ], }; ================================================ FILE: package.json ================================================ { "name": "webpack-bundle-analyzer", "version": "5.2.0", "description": "Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap", "keywords": [ "webpack", "bundle", "analyzer", "modules", "size", "interactive", "chart", "treemap", "zoomable", "zoom" ], "homepage": "https://github.com/webpack/webpack-bundle-analyzer", "bugs": { "url": "https://github.com/webpack/webpack-bundle-analyzer/issues" }, "repository": { "type": "git", "url": "git+https://github.com/webpack/webpack-bundle-analyzer.git" }, "license": "MIT", "author": "Yury Grunin <grunin.ya@ya.ru>", "main": "lib/index.js", "bin": "lib/bin/analyzer.js", "files": [ "public", "lib" ], "scripts": { "clean:analyzer": "del-cli lib", "clean:viewer": "del-cli public", "clean": "npm run clean:analyzer && npm run clean:viewer", "build:analyzer": "npm run clean:analyzer && babel src -d lib --copy-files", "build:viewer": "npm run clean:viewer && webpack-cli --node-env=production", "build": "npm run build:analyzer && npm run build:viewer", "watch:analyzer": "npm run build:analyzer -- --watch", "watch:viewer": "npm run build:viewer -- --node-env=development --watch", "npm-publish": "npm run lint && npm run build && npm test && npm publish", "lint": "npm run lint:code && npm run lint:types && npm run fmt:check", "lint:code": "eslint --cache .", "lint:types": "tsc --pretty --noEmit", "fmt": "npm run fmt:base -- --log-level warn --write", "fmt:check": "npm run fmt:base -- --check", "fmt:base": "prettier --cache --ignore-unknown .", "fix": "npm run fix:code && npm run fmt", "test": "NODE_OPTIONS=--openssl-legacy-provider jest --runInBand", "test:coverage": "npm run test -- --coverage", "test-dev": "NODE_OPTIONS=--openssl-legacy-provider jest --watch --runInBand" }, "dependencies": { "@discoveryjs/json-ext": "^0.6.3", "acorn": "^8.0.4", "acorn-walk": "^8.0.0", "commander": "^14.0.2", "escape-string-regexp": "^5.0.0", "html-escaper": "^3.0.3", "opener": "^1.5.2", "picocolors": "^1.0.0", "sirv": "^3.0.2", "ws": "^8.19.0" }, "devDependencies": { "@babel/cli": "^7.28.6", "@babel/core": "^7.26.9", "@babel/plugin-transform-class-properties": "^7.27.1", "@babel/plugin-transform-runtime": "^7.26.9", "@babel/preset-env": "^7.26.9", "@babel/preset-react": "^7.26.3", "@babel/runtime": "^7.26.9", "@carrotsearch/foamtree": "^3.5.0", "@types/html-escaper": "^3.0.4", "@types/opener": "^1.4.3", "autoprefixer": "^10.2.5", "babel-eslint": "^10.1.0", "babel-loader": "^10.0.0", "classnames": "^2.3.1", "core-js": "^3.12.1", "css-loader": "^7.1.3", "cssnano": "^7.1.2", "debounce": "^3.0.0", "del-cli": "^7.0.0", "eslint": "^9.39.2", "eslint-config-webpack": "^4.9.3", "filesize": "^11.0.13", "jest": "^30.2.0", "mobx": "^6.15.0", "mobx-react": "^9.2.1", "postcss": "^8.3.0", "postcss-loader": "^8.2.0", "preact": "^10.5.13", "prettier": "^3.8.0", "prop-types": "^15.8.1", "puppeteer": "^24.30.0", "style-loader": "^4.0.0", "terser-webpack-plugin": "^5.1.2", "tinyglobby": "^0.2.15", "typescript": "^5.9.3", "webpack": "^5.105.2", "webpack-4": "npm:webpack@^4", "webpack-cli": "^6.0.1", "webpack-dev-server": "^5.2.0" }, "packageManager": "npm@10.1.0", "engines": { "node": ">= 20.9.0" }, "changelog": "https://github.com/webpack/webpack-bundle-analyzer/blob/main/CHANGELOG.md" } ================================================ FILE: prettier.config.mjs ================================================ export default { printWidth: 80, tabWidth: 2, trailingComma: "all", arrowParens: "always", }; ================================================ FILE: src/BundleAnalyzerPlugin.js ================================================ const fs = require("node:fs"); const path = require("node:path"); const { bold } = require("picocolors"); const Logger = require("./Logger"); const { writeStats } = require("./statsUtils"); const utils = require("./utils"); const viewer = require("./viewer"); /** @typedef {import("net").AddressInfo} AddressInfo */ /** @typedef {import("webpack").Compiler} Compiler */ /** @typedef {import("webpack").OutputFileSystem} OutputFileSystem */ /** @typedef {import("webpack").Stats} Stats */ /** @typedef {import("webpack").StatsOptions} StatsOptions */ /** @typedef {import("webpack").StatsAsset} StatsAsset */ /** @typedef {import("webpack").StatsCompilation} StatsCompilation */ /** @typedef {import("./sizeUtils").Algorithm} CompressionAlgorithm */ /** @typedef {import("./Logger").Level} LogLever */ /** @typedef {import("./viewer").ViewerServerObj} ViewerServerObj */ /** @typedef {string | boolean | StatsOptions} PluginStatsOptions */ // eslint-disable-next-line jsdoc/reject-any-type /** @typedef {any} EXPECTED_ANY */ /** @typedef {"static" | "json" | "server" | "disabled"} Mode */ /** @typedef {string | RegExp | ((asset: string) => void)} Pattern */ /** @typedef {null | Pattern | Pattern[]} ExcludeAssets */ /** @typedef {"stat" | "parsed" | "gzip" | "brotli" | "zstd"} Sizes */ /** @typedef {string | (() => string)} ReportTitle */ /** @typedef {(options: { listenHost: string, listenPort: number, boundAddress: string | AddressInfo | null }) => string} AnalyzerUrl */ /** * @typedef {object} Options * @property {Mode=} analyzerMode analyzer mode * @property {string=} analyzerHost analyzer host * @property {"auto" | number=} analyzerPort analyzer port * @property {CompressionAlgorithm=} compressionAlgorithm compression algorithm * @property {string | null=} reportFilename report filename * @property {ReportTitle=} reportTitle report title * @property {Sizes=} defaultSizes default sizes * @property {boolean=} openAnalyzer open analyzer * @property {boolean=} generateStatsFile generate stats file * @property {string=} statsFilename stats filename * @property {PluginStatsOptions=} statsOptions stats options * @property {ExcludeAssets=} excludeAssets exclude assets * @property {LogLever=} logLevel exclude assets * @property {boolean=} startAnalyzer start analyzer * @property {AnalyzerUrl=} analyzerUrl start analyzer */ class BundleAnalyzerPlugin { /** * @param {Options=} opts options */ constructor(opts = {}) { /** @type {Required<Omit<Options, "analyzerPort" | "statsOptions">> & { analyzerPort: number, statsOptions: undefined | PluginStatsOptions }} */ this.opts = { analyzerMode: "server", analyzerHost: "127.0.0.1", compressionAlgorithm: "gzip", reportFilename: null, reportTitle: utils.defaultTitle, defaultSizes: "parsed", openAnalyzer: true, generateStatsFile: false, statsFilename: "stats.json", statsOptions: undefined, excludeAssets: null, logLevel: "info", // TODO deprecated startAnalyzer: true, analyzerUrl: utils.defaultAnalyzerUrl, ...opts, analyzerPort: opts.analyzerPort === "auto" ? 0 : (opts.analyzerPort ?? 8888), }; /** @type {Compiler | null} */ this.compiler = null; /** @type {Promise<ViewerServerObj> | null} */ this.server = null; this.logger = new Logger(this.opts.logLevel); } /** * @param {Compiler} compiler compiler */ apply(compiler) { this.compiler = compiler; /** * @param {Stats} stats stats * @param {(err?: Error) => void} callback callback */ const done = (stats, callback) => { callback ||= () => {}; /** @type {(() => Promise<void>)[]} */ const actions = []; if (this.opts.generateStatsFile) { actions.push(() => this.generateStatsFile(stats.toJson(this.opts.statsOptions)), ); } // Handling deprecated `startAnalyzer` flag if (this.opts.analyzerMode === "server" && !this.opts.startAnalyzer) { this.opts.analyzerMode = "disabled"; } if (this.opts.analyzerMode === "server") { actions.push(() => this.startAnalyzerServer(stats.toJson())); } else if (this.opts.analyzerMode === "static") { actions.push(() => this.generateStaticReport(stats.toJson())); } else if (this.opts.analyzerMode === "json") { actions.push(() => this.generateJSONReport(stats.toJson())); } if (actions.length) { // Making analyzer logs to be after all webpack logs in the console setImmediate(async () => { try { await Promise.all(actions.map((action) => action())); callback(); } catch (err) { callback(/** @type {Error} */ (err)); } }); } else { callback(); } }; if (compiler.hooks) { compiler.hooks.done.tapAsync("webpack-bundle-analyzer", done); } else { // @ts-expect-error old webpack@4 API compiler.plugin("done", done); } } /** * @param {StatsCompilation} stats stats * @returns {Promise<void>} */ async generateStatsFile(stats) { const statsFilepath = path.resolve( /** @type {Compiler} */ (this.compiler).outputPath, this.opts.statsFilename, ); await fs.promises.mkdir(path.dirname(statsFilepath), { recursive: true }); try { await writeStats(stats, statsFilepath); this.logger.info( `${bold("Webpack Bundle Analyzer")} saved stats file to ${bold(statsFilepath)}`, ); } catch (error) { this.logger.error( `${bold("Webpack Bundle Analyzer")} error saving stats file to ${bold(statsFilepath)}: ${error}`, ); } } /** * @param {StatsCompilation} stats stats * @returns {Promise<void>} */ async startAnalyzerServer(stats) { if (this.server) { (await this.server).updateChartData(stats); } else { this.server = viewer.startServer(stats, { openBrowser: this.opts.openAnalyzer, host: this.opts.analyzerHost, port: this.opts.analyzerPort, reportTitle: this.opts.reportTitle, compressionAlgorithm: this.opts.compressionAlgorithm, bundleDir: this.getBundleDirFromCompiler(), logger: this.logger, defaultSizes: this.opts.defaultSizes, excludeAssets: this.opts.excludeAssets, analyzerUrl: this.opts.analyzerUrl, }); } } /** * @param {StatsCompilation} stats stats * @returns {Promise<void>} */ async generateJSONReport(stats) { await viewer.generateJSONReport(stats, { reportFilename: path.resolve( /** @type {Compiler} */ (this.compiler).outputPath, this.opts.reportFilename || "report.json", ), compressionAlgorithm: this.opts.compressionAlgorithm, bundleDir: this.getBundleDirFromCompiler(), logger: this.logger, excludeAssets: this.opts.excludeAssets, }); } /** * @param {StatsCompilation} stats stats * @returns {Promise<void>} */ async generateStaticReport(stats) { await viewer.generateReport(stats, { openBrowser: this.opts.openAnalyzer, reportFilename: path.resolve( /** @type {Compiler} */ (this.compiler).outputPath, this.opts.reportFilename || "report.html", ), reportTitle: this.opts.reportTitle, compressionAlgorithm: this.opts.compressionAlgorithm, bundleDir: this.getBundleDirFromCompiler(), logger: this.logger, defaultSizes: this.opts.defaultSizes, excludeAssets: this.opts.excludeAssets, }); } getBundleDirFromCompiler() { const outputFileSystemConstructor = /** @type {OutputFileSystem} */ (/** @type {Compiler} */ (this.compiler).outputFileSystem).constructor; if (typeof outputFileSystemConstructor === "undefined") { return /** @type {Compiler} */ (this.compiler).outputPath; } switch (outputFileSystemConstructor.name) { case "MemoryFileSystem": return null; // Detect AsyncMFS used by Nuxt 2.5 that replaces webpack's MFS during development // Related: #274 case "AsyncMFS": return null; default: return /** @type {Compiler} */ (this.compiler).outputPath; } } } module.exports = BundleAnalyzerPlugin; ================================================ FILE: src/Logger.js ================================================ /** @typedef {import("./BundleAnalyzerPlugin").EXPECTED_ANY} EXPECTED_ANY */ /** @typedef {"debug" | "info" | "warn" | "error" | "silent"} Level */ /** @type {Level[]} */ const LEVELS = ["debug", "info", "warn", "error", "silent"]; /** @type {Map<Level, string>} */ const LEVEL_TO_CONSOLE_METHOD = new Map([ ["debug", "log"], ["info", "log"], ["warn", "log"], ]); class Logger { /** @type {Level[]} */ static levels = LEVELS; /** @type {Level} */ static defaultLevel = "info"; /** * @param {Level=} level level */ constructor(level = Logger.defaultLevel) { /** @type {Set<Level>} */ this.activeLevels = new Set(); this.setLogLevel(level); } /** * @param {Level} level level */ setLogLevel(level) { const levelIndex = LEVELS.indexOf(level); if (levelIndex === -1) { throw new Error( `Invalid log level "${level}". Use one of these: ${LEVELS.join(", ")}`, ); } this.activeLevels.clear(); for (const [i, level] of LEVELS.entries()) { if (i >= levelIndex) this.activeLevels.add(level); } } /** * @template {EXPECTED_ANY[]} T * @param {T} args args */ debug(...args) { if (!this.activeLevels.has("debug")) return; this._log("debug", ...args); } /** * @template {EXPECTED_ANY[]} T * @param {T} args args */ info(...args) { if (!this.activeLevels.has("info")) return; this._log("info", ...args); } /** * @template {EXPECTED_ANY[]} T * @param {T} args args */ error(...args) { if (!this.activeLevels.has("error")) return; this._log("error", ...args); } /** * @template {EXPECTED_ANY[]} T * @param {T} args args */ warn(...args) { if (!this.activeLevels.has("warn")) return; this._log("warn", ...args); } /** * @template {EXPECTED_ANY[]} T * @param {Level} level level * @param {T} args args */ _log(level, ...args) { // eslint-disable-next-line no-console console[ /** @type {Exclude<Level, "silent">} */ (LEVEL_TO_CONSOLE_METHOD.get(level) || level) ](...args); } } module.exports = Logger; ================================================ FILE: src/analyzer.js ================================================ const fs = require("node:fs"); const path = require("node:path"); const { parseChunked } = require("@discoveryjs/json-ext"); const Logger = require("./Logger"); const { parseBundle } = require("./parseUtils"); const { getCompressedSize } = require("./sizeUtils"); const Folder = require("./tree/Folder").default; const { createAssetsFilter } = require("./utils"); const FILENAME_QUERY_REGEXP = /\?.*$/u; const FILENAME_EXTENSIONS = /\.(js|mjs|cjs|bundle)$/iu; /** @typedef {import("webpack").StatsCompilation} StatsCompilation */ /** @typedef {import("webpack").StatsModule} StatsModule */ /** @typedef {import("webpack").StatsAsset} StatsAsset */ /** @typedef {import("./BundleAnalyzerPlugin").CompressionAlgorithm} CompressionAlgorithm */ /** @typedef {import("./BundleAnalyzerPlugin").ExcludeAssets} ExcludeAssets */ /** * @typedef {object} AnalyzerOptions * @property {"gzip" | "brotli" | "zstd"} compressionAlgorithm compression algorithm */ /** * @param {StatsModule[]} modules modules * @param {AnalyzerOptions} options options * @returns {Folder} a folder class */ function createModulesTree(modules, options) { const root = new Folder(".", options); for (const module of modules) { root.addModule(module); } root.mergeNestedFolders(); return root; } /** * arr-flatten <https://github.com/jonschlinkert/arr-flatten> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. * * Modified by Sukka <https://skk.moe> * * Replace recursively flatten with one-level deep flatten to match lodash.flatten * * TODO: replace with Array.prototype.flat once Node.js 10 support is dropped */ /** * Flattens an array by one level. * @template T * @param {(T | T[])[]} arr the array to flatten * @returns {T[]} a new array containing the flattened elements */ function flatten(arr) { if (!arr) return []; const len = arr.length; if (!len) return []; let cur; const res = []; for (let i = 0; i < len; i++) { cur = arr[i]; if (Array.isArray(cur)) { res.push(...cur); } else { res.push(cur); } } return res; } /** * @param {StatsCompilation} bundleStats bundle stats * @param {string} assetName asset name * @returns {boolean} child asset bundlers */ function getChildAssetBundles(bundleStats, assetName) { return flatten( (bundleStats.children || /** @type {StatsCompilation} */ ([])).find( /** * @param {StatsCompilation} child child stats * @returns {string[][]} assets by chunk name */ (child) => Object.values(child.assetsByChunkName || []), ), ).includes(assetName); } /** * @param {StatsAsset} statsAsset stats asset * @param {StatsModule} statsModule stats modules * @returns {boolean} true when asset has a module */ function assetHasModule(statsAsset, statsModule) { // Checking if this module is the part of asset chunks return (statsModule.chunks || []).some( (moduleChunk) => statsAsset.chunks && statsAsset.chunks.includes(moduleChunk), ); } /** * @param {StatsModule} statsModule stats Module * @returns {boolean} true when runtime modules, otherwise false */ function isRuntimeModule(statsModule) { return statsModule.moduleType === "runtime"; } /** * @param {StatsCompilation} bundleStats bundle stats * @returns {StatsModule[]} modules */ function getBundleModules(bundleStats) { /** @type {Set<string | number>} */ const seenIds = new Set(); const modules = /** @type {StatsModule[]} */ ([ ...(bundleStats.chunks?.map((chunk) => chunk.modules) || []), ...(bundleStats.modules || []), ]).filter(Boolean); return flatten(modules).filter((mod) => { // Filtering out Webpack's runtime modules as they don't have ids and can't be parsed (introduced in Webpack 5) if (isRuntimeModule(mod)) { return false; } if (seenIds.has(mod.id)) { return false; } seenIds.add(mod.id); return true; }); } /** @typedef {Record<string, Record<string, boolean>>} ChunkToInitialByEntrypoint */ /** * @param {StatsCompilation} bundleStats bundle stats * @returns {ChunkToInitialByEntrypoint} chunk to initial by entrypoint */ function getChunkToInitialByEntrypoint(bundleStats) { if (bundleStats === null || bundleStats === undefined) { return {}; } /** @type {ChunkToInitialByEntrypoint} */ const chunkToEntrypointInititalMap = {}; for (const entrypoint of Object.values(bundleStats.entrypoints || {})) { for (const asset of entrypoint.assets || []) { chunkToEntrypointInititalMap[asset.name] ??= {}; chunkToEntrypointInititalMap[asset.name][ /** @type {string} */ (entrypoint.name) ] = true; } } return chunkToEntrypointInititalMap; } /** * @param {StatsModule} statsModule stats modules * @returns {boolean} true when entry module, otherwise false */ function isEntryModule(statsModule) { return statsModule.depth === 0; } /** * @typedef {object} ViewerDataOptions * @property {Logger} logger logger * @property {CompressionAlgorithm} compressionAlgorithm compression algorithm * @property {ExcludeAssets} excludeAssets exclude assets */ /** @typedef {import("./tree/Module").ModuleChartData} ModuleChartData */ /** @typedef {import("./tree/ContentModule").ContentModuleChartData} ContentModuleChartData */ /** @typedef {import("./tree/ConcatenatedModule").ConcatenatedModuleChartData} ConcatenatedModuleChartData */ /** @typedef {import("./tree/ContentFolder").ContentFolderChartData} ContentFolderChartData */ /** @typedef {import("./tree/Folder").FolderChartData} FolderChartData */ /** * @typedef {object} ChartDataItem * @property {string} label label * @property {true} isAsset true when is asset, otherwise false * @property {number} statSize stat size * @property {number | undefined} parsedSize stat size * @property {number | undefined} gzipSize gzip size * @property {number | undefined} brotliSize brotli size * @property {number | undefined} zstdSize zstd size * @property {(ModuleChartData | ContentModuleChartData | ConcatenatedModuleChartData | ContentFolderChartData | FolderChartData)[]} groups groups * @property {Record<string, boolean>} isInitialByEntrypoint record with initial entrypoints */ /** * @typedef {ChartDataItem[]} ChartData */ /** * @param {StatsCompilation} bundleStats bundle stats * @param {string | null} bundleDir bundle dir * @param {ViewerDataOptions=} opts options * @returns {ChartData} chart data */ function getViewerData(bundleStats, bundleDir, opts) { const { logger = new Logger(), compressionAlgorithm = "gzip", excludeAssets = null, } = opts || {}; const isAssetIncluded = createAssetsFilter(excludeAssets); // Sometimes all the information is located in `children` array (e.g. problem in #10) if ( (bundleStats.assets === null || bundleStats.assets === undefined || bundleStats.assets.length === 0) && bundleStats.children && bundleStats.children.length > 0 ) { const { children } = bundleStats; [bundleStats] = bundleStats.children; // Sometimes if there are additional child chunks produced add them as child assets, // leave the 1st one as that is considered the 'root' asset. for (let i = 1; i < children.length; i++) { for (const asset of children[i].assets || []) { asset.isChild = true; /** @type {StatsAsset[]} */ (bundleStats.assets).push(asset); } } } else if (bundleStats.children && bundleStats.children.length > 0) { // Sometimes if there are additional child chunks produced add them as child assets for (const child of bundleStats.children) { for (const asset of child.assets || []) { asset.isChild = true; /** @type {StatsAsset[]} */ (bundleStats.assets).push(asset); } } } // Picking only `*.js, *.cjs or *.mjs` assets from bundle that has non-empty `chunks` array bundleStats.assets = (bundleStats.assets || []).filter((asset) => { // Filter out non 'asset' type asset if type is provided (Webpack 5 add a type to indicate asset types) if (asset.type && asset.type !== "asset") { return false; } // Removing query part from filename (yes, somebody uses it for some reason and Webpack supports it) // See #22 asset.name = asset.name.replace(FILENAME_QUERY_REGEXP, ""); return ( FILENAME_EXTENSIONS.test(asset.name) && asset.chunks && asset.chunks.length > 0 && isAssetIncluded(asset.name) ); }); // Trying to parse bundle assets and get real module sizes if `bundleDir` is provided /** @type {Record<string, { src: string, runtimeSrc: string }> | null} */ let bundlesSources = null; /** @type {Record<string | number, boolean> | null} */ let parsedModules = null; if (bundleDir) { bundlesSources = {}; parsedModules = {}; for (const statAsset of bundleStats.assets) { const assetFile = path.join(bundleDir, statAsset.name); let bundleInfo; try { bundleInfo = parseBundle(assetFile, { sourceType: statAsset.info.javascriptModule ? "module" : "script", }); } catch (err) { const msg = /** @type {NodeJS.ErrnoException} */ (err).code === "ENOENT" ? "no such file" : /** @type {Error} */ (err).message; logger.warn(`Error parsing bundle asset "${assetFile}": ${msg}`, { cause: err, }); continue; } bundlesSources[statAsset.name] = { src: bundleInfo.src, runtimeSrc: bundleInfo.runtimeSrc, }; Object.assign(parsedModules, bundleInfo.modules); } if (Object.keys(bundlesSources).length === 0) { bundlesSources = null; parsedModules = null; logger.warn( "\nNo bundles were parsed. Analyzer will show only original module sizes from stats file.\n", ); } } /** @typedef {{ size: number, parsedSize?: number, gzipSize?: number, brotliSize?: number, zstdSize?: number, modules: StatsModule[], tree: Folder }} Asset */ const assets = bundleStats.assets.reduce((result, statAsset) => { // If asset is a childAsset, then calculate appropriate bundle modules by looking through stats.children const assetBundles = statAsset.isChild ? getChildAssetBundles(bundleStats, statAsset.name) : bundleStats; /** @type {StatsModule[]} */ const modules = assetBundles ? // @ts-expect-error TODO looks like we have a bug with child compilation parsing, need to add test cases getBundleModules(assetBundles) : []; const asset = (result[statAsset.name] = /** @type {Asset} */ ({ size: statAsset.size, })); const assetSources = bundlesSources && Object.hasOwn(bundlesSources, statAsset.name) ? bundlesSources[statAsset.name] : null; if (assetSources) { asset.parsedSize = Buffer.byteLength(assetSources.src); if (compressionAlgorithm === "gzip") { asset.gzipSize = getCompressedSize("gzip", assetSources.src); } if (compressionAlgorithm === "brotli") { asset.brotliSize = getCompressedSize("brotli", assetSources.src); } if (compressionAlgorithm === "zstd") { asset.zstdSize = getCompressedSize("zstd", assetSources.src); } } // Picking modules from current bundle script /** @type {StatsModule[]} */ let assetModules = (modules || []).filter((statModule) => assetHasModule(statAsset, statModule), ); // Adding parsed sources if (parsedModules) { /** @type {StatsModule[]} */ const unparsedEntryModules = []; for (const statsModule of assetModules) { if ( typeof statsModule.id !== "undefined" && parsedModules[statsModule.id] ) { statsModule.parsedSrc = parsedModules[statsModule.id]; } else if (isEntryModule(statsModule)) { unparsedEntryModules.push(statsModule); } } // Webpack 5 changed bundle format and now entry modules are concatenated and located at the end of it. // Because of this they basically become a concatenated module, for which we can't even precisely determine its // parsed source as it's located in the same scope as all Webpack runtime helpers. if (unparsedEntryModules.length && assetSources) { if (unparsedEntryModules.length === 1) { // So if there is only one entry we consider its parsed source to be all the bundle code excluding code // from parsed modules. unparsedEntryModules[0].parsedSrc = assetSources.runtimeSrc; } else { // If there are multiple entry points we move all of them under synthetic concatenated module. assetModules = (assetModules || []).filter( (mod) => !unparsedEntryModules.includes(mod), ); assetModules.unshift({ identifier: "./entry modules", name: "./entry modules", modules: unparsedEntryModules, size: unparsedEntryModules.reduce( (totalSize, module) => totalSize + /** @type {number} */ (module.size), 0, ), parsedSrc: assetSources.runtimeSrc, }); } } } asset.modules = assetModules; asset.tree = createModulesTree(asset.modules, { compressionAlgorithm }); return result; }, /** @type {Record<string, Asset>} */ ({})); const chunkToInitialByEntrypoint = getChunkToInitialByEntrypoint(bundleStats); return Object.entries(assets).map(([filename, asset]) => ({ label: filename, isAsset: true, // Not using `asset.size` here provided by Webpack because it can be very confusing when `UglifyJsPlugin` is used. // In this case all module sizes from stats file will represent unminified module sizes, but `asset.size` will // be the size of minified bundle. // Using `asset.size` only if current asset doesn't contain any modules (resulting size equals 0) statSize: asset.tree.size || asset.size, parsedSize: asset.parsedSize, gzipSize: asset.gzipSize, brotliSize: asset.brotliSize, zstdSize: asset.zstdSize, groups: Object.values(asset.tree.children).map((i) => i.toChartData()), isInitialByEntrypoint: chunkToInitialByEntrypoint[filename] ?? {}, })); } /** * @param {string} filename filename * @returns {Promise<StatsCompilation>} result */ function readStatsFromFile(filename) { return parseChunked(fs.createReadStream(filename, { encoding: "utf8" })); } module.exports = { getViewerData, readStatsFromFile, }; ================================================ FILE: src/bin/analyzer.js ================================================ #! /usr/bin/env node const { dirname, resolve } = require("node:path"); const { program: commanderProgram } = require("commander"); const { magenta } = require("picocolors"); const Logger = require("../Logger"); const analyzer = require("../analyzer"); const { isZstdSupported } = require("../sizeUtils"); const utils = require("../utils"); const viewer = require("../viewer"); const SIZES = new Set(["stat", "parsed", "gzip"]); const COMPRESSION_ALGORITHMS = new Set( isZstdSupported ? ["gzip", "brotli", "zstd"] : ["gzip", "brotli"], ); /** * @param {string} str string * @returns {string} break with string */ function br(str) { return `\n${" ".repeat(32)}${str}`; } /** * @template T * @returns {(val: T) => T[]} array */ function array() { /** @type {T[]} */ const arr = []; return (val) => { arr.push(val); return arr; }; } const program = commanderProgram .version(require("../../package.json").version) .argument("<bundleStatsFile>", "Path to Webpack Stats JSON file.") .argument( "[bundleDir]", "Directory containing all generated bundles. You should provided it if you want analyzer to show you the real parsed module sizes. By default a directory of stats file is used.", ) .option( "-m, --mode <mode>", `Analyzer mode. Should be \`server\`,\`static\` or \`json\`.${br( "In `server` mode analyzer will start HTTP server to show bundle report.", )}${br( "In `static` mode single HTML file with bundle report will be generated.", )}${br( "In `json` mode single JSON file with bundle report will be generated.", )}`, "server", ) .option( // Had to make `host` parameter optional in order to let `-h` flag output help message // Fixes https://github.com/webpack/webpack-bundle-analyzer/issues/239 "-h, --host [host]", "Host that will be used in `server` mode to start HTTP server.", "127.0.0.1", ) .option( "-p, --port <n>", "Port that will be used in `server` mode to start HTTP server.", "8888", ) .option( "-r, --report <file>", "Path to bundle report file that will be generated in `static` mode.", ) .option( "-t, --title <title>", "String to use in title element of html report.", ) .option( "-s, --default-sizes <type>", `Module sizes to show in treemap by default.${br( `Possible values: ${[...SIZES].join(", ")}`, )}`, "parsed", ) .option( "--compression-algorithm <type>", `Compression algorithm that will be used to calculate the compressed module sizes.${br( `Possible values: ${[...COMPRESSION_ALGORITHMS].join(", ")}`, )}`, "gzip", ) .option( "-O, --no-open", "Don't open report in default browser automatically.", ) .option( "-e, --exclude <regexp>", `Assets that should be excluded from the report.${br( "Can be specified multiple times.", )}`, array(), ) .option( "-l, --log-level <level>", `Log level.${br(`Possible values: ${[...Logger.levels].join(", ")}`)}`, Logger.defaultLevel, ) .parse(); let [bundleStatsFile, bundleDir] = program.args; let { mode, host, port, report: reportFilename, title: reportTitle, defaultSizes, compressionAlgorithm, logLevel, open: openBrowser, exclude: excludeAssets, } = program.opts(); const logger = new Logger(logLevel); if (typeof reportTitle === "undefined") { reportTitle = utils.defaultTitle; } /** * @param {string} error error message */ function showHelp(error) { if (error) console.log(`\n ${magenta(error)}\n`); program.outputHelp(); process.exit(1); } if (!bundleStatsFile) { showHelp("Provide path to Webpack Stats file as first argument"); } if (mode !== "server" && mode !== "static" && mode !== "json") { showHelp("Invalid mode. Should be either `server`, `static` or `json`."); } if (mode === "server") { if (!host) showHelp("Invalid host name"); port = port === "auto" ? 0 : Number(port); if (Number.isNaN(port)) { showHelp("Invalid port. Should be a number or `auto`"); } } if (!COMPRESSION_ALGORITHMS.has(compressionAlgorithm)) { showHelp( `Invalid compression algorithm option. Possible values are: ${[...COMPRESSION_ALGORITHMS].join(", ")}`, ); } if (!SIZES.has(defaultSizes)) { showHelp( `Invalid default sizes option. Possible values are: ${[...SIZES].join(", ")}`, ); } bundleStatsFile = resolve(bundleStatsFile); if (!bundleDir) bundleDir = dirname(bundleStatsFile); /** * @param {string} bundleStatsFile bundle stats file * @returns {Promise<void>} */ async function parseAndAnalyse(bundleStatsFile) { try { const bundleStats = await analyzer.readStatsFromFile(bundleStatsFile); if (mode === "server") { viewer.startServer(bundleStats, { openBrowser, port, host, defaultSizes, compressionAlgorithm, reportTitle, bundleDir, excludeAssets, logger: new Logger(logLevel), analyzerUrl: utils.defaultAnalyzerUrl, }); } else if (mode === "static") { viewer.generateReport(bundleStats, { openBrowser, reportFilename: resolve(reportFilename || "report.html"), reportTitle, defaultSizes, compressionAlgorithm, bundleDir, excludeAssets, logger: new Logger(logLevel), }); } else if (mode === "json") { viewer.generateJSONReport(bundleStats, { reportFilename: resolve(reportFilename || "report.json"), compressionAlgorithm, bundleDir, excludeAssets, logger: new Logger(logLevel), }); } } catch (err) { logger.error( `Couldn't read webpack bundle stats from "${bundleStatsFile}":\n${err}`, ); logger.debug(/** @type {Error} */ (err).stack); process.exit(1); } } parseAndAnalyse(bundleStatsFile); ================================================ FILE: src/index.js ================================================ const { start } = require("./viewer"); module.exports = { start, BundleAnalyzerPlugin: require("./BundleAnalyzerPlugin"), }; ================================================ FILE: src/parseUtils.js ================================================ /** @typedef {import("acorn").Node} Node */ /** @typedef {import("acorn").CallExpression} CallExpression */ /** @typedef {import("acorn").ExpressionStatement} ExpressionStatement */ /** @typedef {import("acorn").Expression} Expression */ /** @typedef {import("acorn").SpreadElement} SpreadElement */ const fs = require("node:fs"); const acorn = require("acorn"); const walk = require("acorn-walk"); /** * @param {Expression} node node * @returns {boolean} true when id is numeric, otherwise false */ function isNumericId(node) { return ( node.type === "Literal" && node.value !== null && node.value !== undefined && Number.isInteger(node.value) && /** @type {number} */ (node.value) >= 0 ); } /** * @param {Expression | SpreadElement | null} node node * @returns {boolean} true when module id, otherwise false */ function isModuleId(node) { return ( node !== null && node.type === "Literal" && (isNumericId(node) || typeof node.value === "string") ); } /** * @param {Expression | SpreadElement} node node * @returns {boolean} true when module wrapper, otherwise false */ function isModuleWrapper(node) { return ( // It's an anonymous function expression that wraps module ((node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression") && !node.id) || // If `DedupePlugin` is used it can be an ID of duplicated module... isModuleId(node) || // or an array of shape [<module_id>, ...args] (node.type === "ArrayExpression" && node.elements.length > 1 && isModuleId(node.elements[0])) ); } /** * @param {Expression | SpreadElement | null} node node * @returns {boolean} true when module hash, otherwise false */ function isModulesHash(node) { return ( node !== null && node.type === "ObjectExpression" && node.properties .filter((property) => property.type !== "SpreadElement") .map((node) => node.value) .every(isModuleWrapper) ); } /** * @param {Expression | SpreadElement | null} node node * @returns {boolean} true when module array, otherwise false */ function isModulesArray(node) { return ( node !== null && node.type === "ArrayExpression" && node.elements.every( (elem) => // Some of array items may be skipped because there is no module with such id !elem || isModuleWrapper(elem), ) ); } /** * @param {Expression | SpreadElement | null} node node * @returns {boolean} true when simple modules list, otherwise false */ function isSimpleModulesList(node) { return ( // Modules are contained in hash. Keys are module ids. isModulesHash(node) || // Modules are contained in array. Indexes are module ids. isModulesArray(node) ); } /** * @param {Expression | SpreadElement | null} node node * @returns {boolean} true when optimized modules array, otherwise false */ function isOptimizedModulesArray(node) { // Checking whether modules are contained in `Array(<minimum ID>).concat(...modules)` array: // https://github.com/webpack/webpack/blob/v1.14.0/lib/Template.js#L91 // The `<minimum ID>` + array indexes are module ids return ( node !== null && node.type === "CallExpression" && node.callee.type === "MemberExpression" && // Make sure the object called is `Array(<some number>)` node.callee.object.type === "CallExpression" && node.callee.object.callee.type === "Identifier" && node.callee.object.callee.name === "Array" && node.callee.object.arguments.length === 1 && node.callee.object.arguments[0].type !== "SpreadElement" && isNumericId(node.callee.object.arguments[0]) && // Make sure the property X called for `Array(<some number>).X` is `concat` node.callee.property.type === "Identifier" && node.callee.property.name === "concat" && // Make sure exactly one array is passed in to `concat` node.arguments.length === 1 && isModulesArray(node.arguments[0]) ); } /** * @param {Expression | SpreadElement | null} node node * @returns {boolean} true when modules list, otherwise false */ function isModulesList(node) { return ( isSimpleModulesList(node) || // Modules are contained in expression `Array([minimum ID]).concat([<module>, <module>, ...])` isOptimizedModulesArray(node) ); } /** @typedef {{ start: number, end: number }} Location */ /** * @param {Node} node node * @returns {Location} location */ function getModuleLocation(node) { return { start: node.start, end: node.end, }; } /** @typedef {Record<number, Location>} ModulesLocations */ /** * @param {Expression | SpreadElement} node node * @returns {ModulesLocations} modules locations */ function getModulesLocations(node) { if (node.type === "ObjectExpression") { // Modules hash const modulesNodes = node.properties; return modulesNodes.reduce((result, moduleNode) => { if (moduleNode.type !== "Property") { return result; } const moduleId = moduleNode.key.type === "Identifier" ? moduleNode.key.name : // @ts-expect-error need verify why we need it, tests not cover it case moduleNode.key.value; if (moduleId === "undefined") { return result; } result[moduleId] = getModuleLocation(moduleNode.value); return result; }, /** @type {ModulesLocations} */ ({})); } const isOptimizedArray = node.type === "CallExpression"; if (node.type === "ArrayExpression" || isOptimizedArray) { // Modules array or optimized array const minId = isOptimizedArray && node.callee.type === "MemberExpression" && node.callee.object.type === "CallExpression" && node.callee.object.arguments[0].type === "Literal" ? // Get the [minId] value from the Array() call first argument literal value /** @type {number} */ (node.callee.object.arguments[0].value) : // `0` for simple array 0; const modulesNodes = isOptimizedArray ? // The modules reside in the `concat()` function call arguments node.arguments[0].type === "ArrayExpression" ? node.arguments[0].elements : [] : node.elements; return modulesNodes.reduce((result, moduleNode, i) => { if (moduleNode) { result[i + minId] = getModuleLocation(moduleNode); } return result; }, /** @type {ModulesLocations} */ ({})); } return {}; } /** * @param {ExpressionStatement} node node * @returns {boolean} true when IIFE, otherwise false */ function isIIFE(node) { return ( node.type === "ExpressionStatement" && (node.expression.type === "CallExpression" || (node.expression.type === "UnaryExpression" && node.expression.argument.type === "CallExpression")) ); } /** * @param {ExpressionStatement} node node * @returns {Expression} IIFE call expression */ function getIIFECallExpression(node) { if (node.expression.type === "UnaryExpression") { return node.expression.argument; } return node.expression; } /** * @param {Expression} node node * @returns {boolean} true when chunks ids, otherwose false */ function isChunkIds(node) { // Array of numeric or string ids. Chunk IDs are strings when NamedChunksPlugin is used return node.type === "ArrayExpression" && node.elements.every(isModuleId); } /** * @param {(Expression | SpreadElement | null)[]} args arguments * @returns {boolean} true when async chunk arguments, otherwise false */ function mayBeAsyncChunkArguments(args) { return ( args.length >= 2 && args[0] !== null && args[0].type !== "SpreadElement" && isChunkIds(args[0]) ); } /** * Returns bundle source except modules * @param {string} content content * @param {ModulesLocations | null} modulesLocations modules locations * @returns {string} runtime code */ function getBundleRuntime(content, modulesLocations) { const sortedLocations = Object.values(modulesLocations || {}).toSorted( (a, b) => a.start - b.start, ); let result = ""; let lastIndex = 0; for (const { start, end } of sortedLocations) { result += content.slice(lastIndex, start); lastIndex = end; } return result + content.slice(lastIndex); } /** * @param {CallExpression} node node * @returns {boolean} true when is async chunk push expression, otheriwse false */ function isAsyncChunkPushExpression(node) { const { callee, arguments: args } = node; return ( callee.type === "MemberExpression" && callee.property.type === "Identifier" && callee.property.name === "push" && callee.object.type === "AssignmentExpression" && args.length === 1 && args[0].type === "ArrayExpression" && mayBeAsyncChunkArguments(args[0].elements) && isModulesList(args[0].elements[1]) ); } /** * @param {CallExpression} node node * @returns {boolean} true when is async web worker, otherwise false */ function isAsyncWebWorkerChunkExpression(node) { const { callee, type, arguments: args } = node; return ( type === "CallExpression" && callee.type === "MemberExpression" && args.length === 2 && args[0].type !== "SpreadElement" && isChunkIds(args[0]) && isModulesList(args[1]) ); } /** @typedef {Record<string, string>} Modules */ /** * @param {string} bundlePath bundle path * @param {{ sourceType: "script" | "module" }} opts options * @returns {{ modules: Modules, src: string, runtimeSrc: string }} parsed result */ module.exports.parseBundle = function parseBundle(bundlePath, opts) { const { sourceType = "script" } = opts || {}; const content = fs.readFileSync(bundlePath, "utf8"); const ast = acorn.parse(content, { sourceType, ecmaVersion: "latest", }); /** @type {{ locations: ModulesLocations | null, expressionStatementDepth: number }} */ const walkState = { locations: null, expressionStatementDepth: 0, }; walk.recursive(ast, walkState, { ExpressionStatement(node, state, callback) { if (state.locations) return; state.expressionStatementDepth++; if ( // Webpack 5 stores modules in the the top-level IIFE state.expressionStatementDepth === 1 && ast.body.includes(node) && isIIFE(node) ) { const fn = getIIFECallExpression(node); if ( fn.type === "CallExpression" && // It should not contain neither arguments fn.arguments.length === 0 && (fn.callee.type === "FunctionExpression" || fn.callee.type === "ArrowFunctionExpression") && // ...nor parameters fn.callee.params.length === 0 && fn.callee.body.type === "BlockStatement" ) { // Modules are stored in the very first variable declaration as hash const firstVariableDeclaration = fn.callee.body.body.find( (node) => node.type === "VariableDeclaration", ); if (firstVariableDeclaration) { for (const declaration of firstVariableDeclaration.declarations) { if (declaration.init && isModulesList(declaration.init)) { state.locations = getModulesLocations(declaration.init); if (state.locations) { break; } } } } } } if (!state.locations) { callback(node.expression, state); } state.expressionStatementDepth--; }, AssignmentExpression(node, state) { if (state.locations) return; // Modules are stored in exports.modules: // exports.modules = {}; const { left, right } = node; if ( left && left.type === "MemberExpression" && left.object && left.object.type === "Identifier" && left.object.name === "exports" && left.property && left.property.type === "Identifier" && left.property.name === "modules" && isModulesHash(right) ) { state.locations = getModulesLocations(right); } }, CallExpression(node, state, callback) { if (state.locations) return; const args = node.arguments; // Main chunk with webpack loader. // Modules are stored in first argument: // (function (...) {...})(<modules>) if ( node.callee.type === "FunctionExpression" && !node.callee.id && args.length === 1 && isSimpleModulesList(args[0]) ) { state.locations = getModulesLocations(args[0]); return; } // Async Webpack < v4 chunk without webpack loader. // webpackJsonp([<chunks>], <modules>, ...) // As function name may be changed with `output.jsonpFunction` option we can't rely on it's default name. if ( node.callee.type === "Identifier" && mayBeAsyncChunkArguments(args) && args[1].type !== "SpreadElement" && isModulesList(args[1]) ) { state.locations = getModulesLocations(args[1]); return; } // Async Webpack v4 chunk without webpack loader. // (window.webpackJsonp=window.webpackJsonp||[]).push([[<chunks>], <modules>, ...]); // As function name may be changed with `output.jsonpFunction` option we can't rely on it's default name. if ( isAsyncChunkPushExpression(node) && args[0].type === "ArrayExpression" && args[0].elements[1] ) { state.locations = getModulesLocations(args[0].elements[1]); return; } // Webpack v4 WebWorkerChunkTemplatePlugin // globalObject.chunkCallbackName([<chunks>],<modules>, ...); // Both globalObject and chunkCallbackName can be changed through the config, so we can't check them. if (isAsyncWebWorkerChunkExpression(node)) { state.locations = getModulesLocations(args[1]); return; } // Walking into arguments because some of plugins (e.g. `DedupePlugin`) or some Webpack // features (e.g. `umd` library output) can wrap modules list into additional IIFE. for (const arg of args) { callback(arg, state); } }, }); /** @type {Modules} */ const modules = {}; if (walkState.locations) { for (const [id, loc] of Object.entries(walkState.locations)) { modules[id] = content.slice(loc.start, loc.end); } } return { modules, src: content, runtimeSrc: getBundleRuntime(content, walkState.locations), }; }; ================================================ FILE: src/sizeUtils.js ================================================ import zlib from "node:zlib"; export const isZstdSupported = "createZstdCompress" in zlib; /** @typedef {"gzip" | "brotli" | "zstd"} Algorithm */ /** * @param {Algorithm} algorithm compression algorithm * @param {string} input input * @returns {number} compressed size */ export function getCompressedSize(algorithm, input) { if (algorithm === "gzip") { return zlib.gzipSync(input, { level: 9 }).length; } if (algorithm === "brotli") { return zlib.brotliCompressSync(input).length; } if (algorithm === "zstd" && isZstdSupported) { // eslint-disable-next-line n/no-unsupported-features/node-builtins return zlib.zstdCompressSync(input).length; } throw new Error(`Unsupported compression algorithm: ${algorithm}.`); } ================================================ FILE: src/statsUtils.js ================================================ const { createWriteStream } = require("node:fs"); const { Readable } = require("node:stream"); const { pipeline } = require("node:stream/promises"); /** @typedef {import("./BundleAnalyzerPlugin").EXPECTED_ANY} EXPECTED_ANY */ /** @typedef {import("webpack").StatsCompilation} StatsCompilation */ class StatsSerializeStream extends Readable { /** * @param {StatsCompilation} stats stats */ constructor(stats) { super(); this._indentLevel = 0; this._stringifier = this._stringify(stats); } get _indent() { return " ".repeat(this._indentLevel); } _read() { let readMore = true; while (readMore) { const { value, done } = this._stringifier.next(); if (done) { this.push(null); readMore = false; } else { readMore = this.push(value); } } } /** * @param {EXPECTED_ANY} obj obj * @returns {Generator<string, undefined, unknown>} stringified result * @private */ *_stringify(obj) { if ( typeof obj === "string" || typeof obj === "number" || typeof obj === "boolean" || obj === null ) { yield JSON.stringify(obj); } else if (Array.isArray(obj)) { yield "["; this._indentLevel++; let isFirst = true; for (let item of obj) { if (item === undefined) { item = null; } yield `${isFirst ? "" : ","}\n${this._indent}`; yield* this._stringify(item); isFirst = false; } this._indentLevel--; yield obj.length ? `\n${this._indent}]` : "]"; } else { yield "{"; this._indentLevel++; let isFirst = true; const entries = Object.entries(obj); for (const [itemKey, itemValue] of entries) { if (itemValue === undefined) { continue; } yield `${isFirst ? "" : ","}\n${this._indent}${JSON.stringify(itemKey)}: `; yield* this._stringify(itemValue); isFirst = false; } this._indentLevel--; yield entries.length ? `\n${this._indent}}` : "}"; } } } /** * @param {StatsCompilation} stats stats * @param {string} filepath filepath file path * @returns {Promise<void>} */ async function writeStats(stats, filepath) { await pipeline(new StatsSerializeStream(stats), createWriteStream(filepath)); } module.exports = { StatsSerializeStream, writeStats }; ================================================ FILE: src/template.js ================================================ const fs = require("node:fs"); const path = require("node:path"); const { escape } = require("html-escaper"); const projectRoot = path.resolve(__dirname, ".."); const assetsRoot = path.join(projectRoot, "public"); /** @typedef {import("./BundleAnalyzerPlugin").EXPECTED_ANY} EXPECTED_ANY */ /** @typedef {import("./BundleAnalyzerPlugin").Mode} Mode */ /** @typedef {import("./BundleAnalyzerPlugin").Sizes} Sizes */ /** @typedef {import("./BundleAnalyzerPlugin").CompressionAlgorithm} CompressionAlgorithm */ /** @typedef {import("./analyzer").ChartData} ChartData */ /** @typedef {import("./viewer").Entrypoints} Entrypoints */ /** * Escapes `<` characters in JSON to safely use it in `<script>` tag. * @param {EXPECTED_ANY} json json * @returns {string} escaped json */ function escapeJson(json) { return JSON.stringify(json).replaceAll("<", "\\u003c"); } /** * @param {string} filename filename * @returns {string} content the text content of the specified file. */ function getAssetContent(filename) { const assetPath = path.join(assetsRoot, filename); if (!assetPath.startsWith(assetsRoot)) { throw new Error(`"${filename}" is outside of the assets root`); } return fs.readFileSync(assetPath, "utf8"); } /** * @template {EXPECTED_ANY} T * @param {TemplateStringsArray} strings strings * @param {...T} values values * @returns {string} HTML */ function html(strings, ...values) { return strings .map((string, index) => `${string}${values[index] || ""}`) .join(""); } /** * @param {string} filename filename * @param {Mode} mode mode * @returns {string} script tag */ function getScript(filename, mode) { if (mode === "static") { return `<!-- ${escape(filename)} --> <script>${getAssetContent(filename)}</script>`; } return `<script src="${escape(filename)}"></script>`; } /** * @typedef {object} ViewerOptions * @property {string} title title * @property {boolean} enableWebSocket true when need to enable, otherwise false * @property {ChartData} chartData chart data * @property {Entrypoints} entrypoints entrypoints * @property {Sizes} defaultSizes default sizes * @property {CompressionAlgorithm} compressionAlgorithm compression algorithm * @property {Mode} mode mode */ /** * @param {ViewerOptions} options viewer Options * @returns {string} content for viewer */ function renderViewer({ title, enableWebSocket, chartData, entrypoints, defaultSizes, compressionAlgorithm, mode, }) { return html`<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>${escape(title)} ${getScript("viewer.js", mode)}
`; } module.exports = { renderViewer }; ================================================ FILE: src/tree/BaseFolder.js ================================================ import Node from "./Node.js"; /** @typedef {import("./Folder").default} Folder */ /** @typedef {import("./Module").default} Module */ /** @typedef {import("./Module").ModuleChartData} ModuleChartData */ /** @typedef {import("./ConcatenatedModule").default} ConcatenatedModule */ /** @typedef {import("./ContentModule").default} ContentModule */ /** @typedef {import("./ContentFolder").default} ContentFolder */ /** @typedef {import("./ContentFolder").ContentFolderChartData} ContentFolderChartData */ /** @typedef {import("./Folder").FolderChartData} FolderChartData */ /** * @typedef {object} BaseFolderChartData * @property {string} label label * @property {string} path path * @property {number} statSize stat size * @property {(FolderChartData | ModuleChartData | ContentFolderChartData)[]} groups groups */ /** @typedef {Module | ContentModule | ConcatenatedModule | ContentFolder | Folder} Children */ export default class BaseFolder extends Node { /** * @param {string} name name * @param {Node=} parent parent */ constructor(name, parent) { super(name, parent); /** @type {Record} */ this.children = Object.create(null); } /** * @returns {string} src */ get src() { if (!Object.hasOwn(this, "_src")) { this._src = this.walk( (node, src) => (src += node.src || ""), /** @type {string} */ (""), false, ); } return /** @type {string} */ (this._src); } /** * @returns {number} size */ get size() { if (!Object.hasOwn(this, "_size")) { this._size = this.walk( (node, size) => size + node.size, /** @type {number} */ (0), false, ); } return /** @type {number} */ (this._size); } /** * @param {string} name name * @returns {Children} child */ getChild(name) { return this.children[name]; } /** * @param {Module | ContentModule | ConcatenatedModule} module module */ addChildModule(module) { const { name } = module; const currentChild = this.children[name]; // For some reason we already have this node in children and it's a folder. if (currentChild && currentChild instanceof BaseFolder) return; if (currentChild) { // We already have this node in children and it's a module. // Merging it's data. currentChild.mergeData(module.data); } else { // Pushing new module module.parent = this; this.children[name] = module; } delete this._size; delete this._src; } /** * @param {ContentFolder | Folder} folder folder * @returns {ContentFolder | Folder} folder */ addChildFolder(folder) { folder.parent = this; this.children[folder.name] = folder; delete this._size; delete this._src; return folder; } /** * @template T * @param {(node: Children, state: T, stop: (state: T) => void) => T} walker walker function * @param {T} state state state * @param {boolean | ((state: T) => T)=} deep true when need to deep walk, otherwise false * @returns {T} state */ walk(walker, state = /** @type T */ ({}), deep = true) { let stopped = false; /** * @param {T} finalState final state * @returns {T} final state */ function stop(finalState) { stopped = true; return finalState; } for (const child of Object.values(this.children)) { state = deep && /** @type {BaseFolder} */ (child).walk ? /** @type {BaseFolder} */ (child).walk(walker, state, stop) : walker(child, state, stop); if (stopped) return /** @type {T} */ (false); } return state; } mergeNestedFolders() { if (!this.isRoot) { let childNames; while ((childNames = Object.keys(this.children)).length === 1) { const [childName] = childNames; const onlyChild = this.children[childName]; if (onlyChild instanceof this.constructor) { this.name += `/${onlyChild.name}`; this.children = /** @type {BaseFolder} */ (onlyChild).children; } else { break; } } } this.walk( (child, state) => { child.parent = this; if ( /** @type {Folder | ContentFolder | ConcatenatedModule} */ (child).mergeNestedFolders ) { /** @type {Folder | ContentFolder | ConcatenatedModule} */ (child).mergeNestedFolders(); } return state; }, null, false, ); } /** * @returns {BaseFolderChartData} base folder chart data */ toChartData() { return { label: this.name, path: this.path, statSize: this.size, groups: Object.values(this.children).map((child) => child.toChartData()), }; } } ================================================ FILE: src/tree/ConcatenatedModule.js ================================================ import ContentFolder from "./ContentFolder.js"; import ContentModule from "./ContentModule.js"; import Module from "./Module.js"; import { getModulePathParts } from "./utils.js"; /** @typedef {import("webpack").StatsModule} StatsModule */ /** @typedef {import("./Node").default} NodeType */ /** @typedef {import("./Module").ModuleChartData} ModuleChartData */ /** @typedef {import("./Module").SizeType} SizeType */ /** @typedef {import("./Folder").default} Folder */ /** @typedef {import("./BaseFolder").Children} Children */ /** @typedef {import("./ContentFolder").ContentFolderChartData} ContentFolderChartData */ /** @typedef {import("./ContentModule").ContentModuleChartData} ContentModuleChartData */ /** @typedef {import("../sizeUtils").Algorithm} CompressionAlgorithm */ /** * @typedef {object} OwnConcatenatedModuleChartData * @property {boolean} concatenated true when concatenated, otherwise false * @property {(ConcatenatedModuleChartData | ContentFolderChartData | ContentModuleChartData)[]} groups groups */ /** @typedef {ModuleChartData & OwnConcatenatedModuleChartData} ConcatenatedModuleChartData */ export default class ConcatenatedModule extends Module { /** * @param {string} name name * @param {StatsModule} data data * @param {NodeType} parent parent * @param {{ compressionAlgorithm: CompressionAlgorithm }} opts options */ constructor(name, data, parent, opts) { super(name, data, parent, opts); this.name += " (concatenated)"; /** @type {Record} */ this.children = Object.create(null); this.fillContentModules(); } get parsedSize() { return this.getParsedSize() ?? this.getEstimatedSize("parsedSize"); } get gzipSize() { return this.getGzipSize() ?? this.getEstimatedSize("gzipSize"); } get brotliSize() { return this.getBrotliSize() ?? this.getEstimatedSize("brotliSize"); } get zstdSize() { return this.getZstdSize() ?? this.getEstimatedSize("zstdSize"); } /** * @param {SizeType} sizeType size type * @returns {number | undefined} size */ getEstimatedSize(sizeType) { const parentModuleSize = /** @type {Folder} */ (this.parent)[sizeType]; if (parentModuleSize !== undefined) { return Math.floor( (this.size / /** @type {Folder} */ (this.parent).size) * parentModuleSize, ); } } fillContentModules() { for (const moduleData of this.data.modules || []) { this.addContentModule(moduleData); } } /** * @param {StatsModule} moduleData module data */ addContentModule(moduleData) { const pathParts = getModulePathParts(moduleData); if (!pathParts) { return; } const [folders, fileName] = [ pathParts.slice(0, -1), pathParts[pathParts.length - 1], ]; /** @type {ConcatenatedModule | ContentFolder} */ let currentFolder = this; for (const folderName of folders) { /** @type {Children} */ let childFolder = currentFolder.getChild(folderName); if (!childFolder) { childFolder = currentFolder.addChildFolder( new ContentFolder(folderName, this), ); } currentFolder = /** @type {ConcatenatedModule | ContentFolder} */ (childFolder); } const ModuleConstructor = moduleData.modules ? ConcatenatedModule : ContentModule; const module = new ModuleConstructor(fileName, moduleData, this, this.opts); currentFolder.addChildModule(module); } /** * @param {string} name name * @returns {ConcatenatedModule | ContentModule | ContentFolder} child folder */ getChild(name) { return this.children[name]; } /** * @param {ConcatenatedModule | ContentModule} module child module */ addChildModule(module) { module.parent = this; this.children[module.name] = module; } /** * @param {ContentFolder} folder child folder * @returns {ContentFolder} child folder */ addChildFolder(folder) { folder.parent = this; this.children[folder.name] = folder; return folder; } mergeNestedFolders() { for (const child of Object.values(this.children)) { if ( /** @type {Folder | ContentFolder | ConcatenatedModule} */ (child).mergeNestedFolders ) { /** @type {Folder | ContentFolder | ConcatenatedModule} */ (child).mergeNestedFolders(); } } } /** * @returns {ConcatenatedModuleChartData} chart data */ toChartData() { return { ...super.toChartData(), concatenated: true, groups: Object.values(this.children).map((child) => child.toChartData()), }; } } ================================================ FILE: src/tree/ContentFolder.js ================================================ import BaseFolder from "./BaseFolder.js"; /** @typedef {import("./Node").default} Node */ /** @typedef {import("./ConcatenatedModule").default} ConcatenatedModule */ /** @typedef {import("./BaseFolder").BaseFolderChartData} BaseFolderChartData */ /** @typedef {import("./Module").SizeType} SizeType */ /** * @typedef {object} OwnContentFolderChartData * @property {number | undefined} parsedSize parsed size * @property {number | undefined} gzipSize gzip size * @property {number | undefined} brotliSize brotli size * @property {number | undefined} zstdSize zstd size * @property {boolean} inaccurateSizes true when inaccurate sizes, otherwise false */ /** @typedef {BaseFolderChartData & OwnContentFolderChartData} ContentFolderChartData */ export default class ContentFolder extends BaseFolder { /** * @param {string} name name * @param {ConcatenatedModule} ownerModule owner module * @param {Node=} parent v */ constructor(name, ownerModule, parent) { super(name, parent); this.ownerModule = ownerModule; } get parsedSize() { return this.getSize("parsedSize"); } get gzipSize() { return this.getSize("gzipSize"); } get brotliSize() { return this.getSize("brotliSize"); } get zstdSize() { return this.getSize("zstdSize"); } /** * @param {SizeType} sizeType size type * @returns {number | undefined} size */ getSize(sizeType) { const ownerModuleSize = this.ownerModule[sizeType]; if (ownerModuleSize !== undefined) { return Math.floor((this.size / this.ownerModule.size) * ownerModuleSize); } } /** * @returns {ContentFolderChartData} chart data */ toChartData() { return { ...super.toChartData(), parsedSize: this.parsedSize, gzipSize: this.gzipSize, brotliSize: this.brotliSize, zstdSize: this.zstdSize, inaccurateSizes: true, }; } } ================================================ FILE: src/tree/ContentModule.js ================================================ import Module from "./Module.js"; /** @typedef {import("webpack").StatsModule} StatsModule */ /** @typedef {import("./Node").default} NodeType */ /** @typedef {import("./Module").ModuleChartData} ModuleChartData */ /** @typedef {import("./Module").ModuleOptions} ModuleOptions */ /** @typedef {import("./Module").SizeType} SizeType */ /** @typedef {import("./ConcatenatedModule").default} ConcatenatedModule */ /** * @typedef {object} OwnContentModuleChartData * @property {boolean} inaccurateSizes true when inaccurate sizes, otherwise false */ /** @typedef {ModuleChartData & OwnContentModuleChartData} ContentModuleChartData */ export default class ContentModule extends Module { /** * @param {string} name name * @param {StatsModule} data data * @param {ConcatenatedModule} ownerModule owner module * @param {ModuleOptions} opts options */ constructor(name, data, ownerModule, opts) { super(name, data, undefined, opts); /** @type {ConcatenatedModule} */ this.ownerModule = ownerModule; } get parsedSize() { return this.getSize("parsedSize"); } get gzipSize() { return this.getSize("gzipSize"); } get brotliSize() { return this.getSize("brotliSize"); } get zstdSize() { return this.getSize("zstdSize"); } /** * @param {SizeType} sizeType size type * @returns {number | undefined} size */ getSize(sizeType) { const ownerModuleSize = this.ownerModule[sizeType]; if (ownerModuleSize !== undefined) { return Math.floor((this.size / this.ownerModule.size) * ownerModuleSize); } } /** * @returns {ContentModuleChartData} chart data */ toChartData() { return { ...super.toChartData(), inaccurateSizes: true, }; } } ================================================ FILE: src/tree/Folder.js ================================================ import { getCompressedSize } from "../sizeUtils.js"; import BaseFolder from "./BaseFolder.js"; import ConcatenatedModule from "./ConcatenatedModule.js"; import Module from "./Module.js"; import { getModulePathParts } from "./utils.js"; /** @typedef {import("webpack").StatsModule} StatsModule */ /** @typedef {import("../analyzer").AnalyzerOptions} AnalyzerOptions */ /** @typedef {import("../analyzer").CompressionAlgorithm} CompressionAlgorithm */ /** @typedef {import("./Module").SizeFields} SizeFields */ /** @typedef {import("./BaseFolder").BaseFolderChartData} BaseFolderChartData */ /** * @typedef {object} OwnFolderChartData * @property {number} parsedSize parsed size * @property {number | undefined} gzipSize gzip size * @property {number | undefined} brotliSize brotli size * @property {number | undefined} zstdSize zstd size */ /** @typedef {BaseFolderChartData & OwnFolderChartData} FolderChartData */ export default class Folder extends BaseFolder { /** * @param {string} name name * @param {AnalyzerOptions} opts options */ constructor(name, opts) { super(name); /** @type {AnalyzerOptions} */ this.opts = opts; } get parsedSize() { return this.src ? this.src.length : 0; } get gzipSize() { return this.opts.compressionAlgorithm === "gzip" ? this.getCompressedSize("gzip") : undefined; } get brotliSize() { return this.opts.compressionAlgorithm === "brotli" ? this.getCompressedSize("brotli") : undefined; } get zstdSize() { return this.opts.compressionAlgorithm === "zstd" ? this.getCompressedSize("zstd") : undefined; } /** * @param {CompressionAlgorithm} compressionAlgorithm compression algorithm * @returns {number | undefined} compressed size */ getCompressedSize(compressionAlgorithm) { const key = /** @type {`_${CompressionAlgorithm}Size`} */ (`_${compressionAlgorithm}Size`); if (!Object.hasOwn(this, key)) { /** @type {Folder & SizeFields} */ (this)[key] = this.src ? getCompressedSize(compressionAlgorithm, this.src) : 0; } return /** @type {Folder & SizeFields} */ (this)[key]; } /** * @param {StatsModule} moduleData stats module */ addModule(moduleData) { const pathParts = getModulePathParts(moduleData); if (!pathParts) { return; } const [folders, fileName] = [ pathParts.slice(0, -1), pathParts[pathParts.length - 1], ]; /** @type {BaseFolder} */ let currentFolder = this; for (const folderName of folders) { let childNode = currentFolder.getChild(folderName); if ( // Folder is not created yet !childNode || // In some situations (invalid usage of dynamic `require()`) webpack generates a module with empty require // context, but it's moduleId points to a directory in filesystem. // In this case we replace this `File` node with `Folder`. // See `test/stats/with-invalid-dynamic-require.json` as an example. !(childNode instanceof Folder) ) { childNode = currentFolder.addChildFolder( new Folder(folderName, this.opts), ); } currentFolder = childNode; } const ModuleConstructor = moduleData.modules ? ConcatenatedModule : Module; const module = new ModuleConstructor(fileName, moduleData, this, this.opts); currentFolder.addChildModule(module); } /** * @returns {FolderChartData} chart data */ toChartData() { return { ...super.toChartData(), parsedSize: this.parsedSize, gzipSize: this.gzipSize, brotliSize: this.brotliSize, zstdSize: this.zstdSize, }; } } ================================================ FILE: src/tree/Module.js ================================================ import { getCompressedSize } from "../sizeUtils.js"; import Node from "./Node.js"; /** @typedef {import("webpack").StatsModule} StatsModule */ /** @typedef {import("../sizeUtils").Algorithm} CompressionAlgorithm */ /** @typedef {{ compressionAlgorithm: CompressionAlgorithm }} ModuleOptions */ /** @typedef {"parsedSize" | "gzipSize" | "brotliSize" | "zstdSize"} SizeType */ /** * @typedef {object} ModuleChartData * @property {string | number | undefined} id id * @property {string} label label * @property {string} path path * @property {number | undefined} statSize stat size * @property {number | undefined} parsedSize parsed size * @property {number | undefined} gzipSize gzip size * @property {number | undefined} brotliSize brotli size * @property {number | undefined} zstdSize zstd size */ /** * @typedef {object} SizeFields * @property {number=} _gzipSize gzip size * @property {number=} _brotliSize brotli size * @property {number=} _zstdSize zstd size */ export default class Module extends Node { /** * @param {string} name name * @param {StatsModule} data data * @param {Node | undefined} parent parent * @param {ModuleOptions} opts options */ constructor(name, data, parent, opts) { super(name, parent); /** @type {StatsModule} */ this.data = data; /** @type {ModuleOptions} */ this.opts = opts; } get src() { return this.data.parsedSrc; } set src(value) { this.data.parsedSrc = value; delete (/** @type {Module & SizeFields} */ (this)._gzipSize); delete (/** @type {Module & SizeFields} */ (this)._brotliSize); delete (/** @type {Module & SizeFields} */ (this)._zstdSize); } /** * @returns {number} size */ get size() { return /** @type {number} */ (this.data.size); } set size(value) { this.data.size = value; } get parsedSize() { return this.getParsedSize(); } get gzipSize() { return this.getGzipSize(); } get brotliSize() { return this.getBrotliSize(); } get zstdSize() { return this.getZstdSize(); } getParsedSize() { return this.src ? this.src.length : undefined; } getGzipSize() { return this.opts.compressionAlgorithm === "gzip" ? this.getCompressedSize("gzip") : undefined; } getBrotliSize() { return this.opts.compressionAlgorithm === "brotli" ? this.getCompressedSize("brotli") : undefined; } getZstdSize() { return this.opts.compressionAlgorithm === "zstd" ? this.getCompressedSize("zstd") : undefined; } /** * @param {CompressionAlgorithm} compressionAlgorithm compression algorithm * @returns {number | undefined} compressed size */ getCompressedSize(compressionAlgorithm) { const key = /** @type {`_${CompressionAlgorithm}Size`} */ (`_${compressionAlgorithm}Size`); if (!(key in this)) { /** @type {Module & SizeFields} */ (this)[key] = this.src ? getCompressedSize(compressionAlgorithm, this.src) : undefined; } return /** @type {Module & SizeFields} */ (this)[key]; } /** * @param {StatsModule} data data */ mergeData(data) { if (data.size) { /** @type {number} */ (this.size) += data.size; } if (data.parsedSrc) { this.src = (this.src || "") + data.parsedSrc; } } /** * @returns {ModuleChartData} module chart data */ toChartData() { return { id: this.data.id, label: this.name, path: this.path, statSize: this.size, parsedSize: this.parsedSize, gzipSize: this.gzipSize, brotliSize: this.brotliSize, zstdSize: this.zstdSize, }; } } ================================================ FILE: src/tree/Node.js ================================================ export default class Node { /** * @param {string} name name * @param {Node=} parent parent */ constructor(name, parent) { /** @type {string} */ this.name = name; /** @type {Node | undefined} */ this.parent = parent; } get path() { /** @type {string[]} */ const path = []; /** @type {Node | undefined} */ let node = this; while (node) { path.push(node.name); node = node.parent; } return path.reverse().join("/"); } get isRoot() { return !this.parent; } } ================================================ FILE: src/tree/utils.js ================================================ const MULTI_MODULE_REGEXP = /^multi /u; /** @typedef {import("webpack").StatsModule} StatsModule */ /** * @param {StatsModule} moduleData moduleData * @returns {string[] | null} module path parts */ export function getModulePathParts(moduleData) { if ( moduleData.identifier && MULTI_MODULE_REGEXP.test(moduleData.identifier) ) { return [moduleData.identifier]; } if (!moduleData.name) { return null; } const loaders = moduleData.name.split("!"); // Removing loaders from module path: they're joined by `!` and the last part is a raw module path const parsedPath = loaders[loaders.length - 1] // Splitting module path into parts .split("/") // Removing first `.` .slice(1) // Replacing `~` with `node_modules` .map((part) => (part === "~" ? "node_modules" : part)); return parsedPath.length ? parsedPath : null; } ================================================ FILE: src/utils.js ================================================ /** @typedef {import("net").AddressInfo} AddressInfo */ /** @typedef {import("webpack").StatsAsset} StatsAsset */ const { inspect, types } = require("node:util"); const opener = require("opener"); /** @typedef {import("./BundleAnalyzerPlugin").ExcludeAssets} ExcludeAssets */ /** @typedef {import("./BundleAnalyzerPlugin").AnalyzerUrl} AnalyzerUrl */ /** @typedef {import("./Logger")} Logger */ const MONTHS = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ]; /** * @param {ExcludeAssets} excludePatterns exclude patterns * @returns {(asset: string) => boolean} function to filter */ function createAssetsFilter(excludePatterns) { /** @type {((asset: string) => void | boolean)[]} */ const excludeFunctions = ( Array.isArray(excludePatterns) ? excludePatterns : [excludePatterns] ) .filter(Boolean) .map((pattern) => { if (typeof pattern === "string") { pattern = new RegExp(pattern, "u"); } if (types.isRegExp(pattern)) { return ( /** * @param {string} asset asset * @returns {boolean} true when need to exclude, otherwise false */ (asset) => pattern.test(asset) ); } if (typeof pattern !== "function") { throw new TypeError( `Pattern should be either string, RegExp or a function, but "${inspect(pattern, { depth: 0 })}" got.`, ); } return pattern; }); if (excludeFunctions.length) { return (asset) => excludeFunctions.every((fn) => fn(asset) !== true); } return () => true; } /** @type {AnalyzerUrl} */ function defaultAnalyzerUrl(options) { const { listenHost, boundAddress } = options; return `http://${listenHost}:${/** @type {AddressInfo} */ (boundAddress).port}`; } /** * get string of current time, format: dd/MMM HH:mm * @returns {string} default title */ function defaultTitle() { const time = new Date(); const year = time.getFullYear(); const month = MONTHS[time.getMonth()]; const day = time.getDate(); const hour = `0${time.getHours()}`.slice(-2); const minute = `0${time.getMinutes()}`.slice(-2); const currentTime = `${day} ${month} ${year} at ${hour}:${minute}`; return `${process.env.npm_package_name || "Webpack Bundle Analyzer"} [${currentTime}]`; } /** * Calls opener on a URI, but silently try / catches it. * @param {string} uri URI * @param {Logger} logger logger */ function open(uri, logger) { try { opener(uri); } catch (err) { logger.debug(`Opener failed to open "${uri}":\n${err}`); } } module.exports = { createAssetsFilter, defaultAnalyzerUrl, defaultTitle, open }; ================================================ FILE: src/viewer.js ================================================ const fs = require("node:fs"); const http = require("node:http"); const path = require("node:path"); const { bold } = require("picocolors"); const sirv = require("sirv"); const WebSocket = require("ws"); const Logger = require("./Logger"); const analyzer = require("./analyzer"); const { renderViewer } = require("./template"); const { open } = require("./utils"); /** @typedef {import("http").Server} Server */ /** @typedef {import("ws").WebSocketServer} WebSocketServer */ /** @typedef {import("webpack").StatsCompilation} StatsCompilation */ /** @typedef {import("./BundleAnalyzerPlugin").Sizes} Sizes */ /** @typedef {import("./BundleAnalyzerPlugin").CompressionAlgorithm} CompressionAlgorithm */ /** @typedef {import("./BundleAnalyzerPlugin").ReportTitle} ReportTitle */ /** @typedef {import("./BundleAnalyzerPlugin").AnalyzerUrl} AnalyzerUrl */ /** @typedef {import("./BundleAnalyzerPlugin").ExcludeAssets} ExcludeAssets */ /** @typedef {import("./analyzer").ViewerDataOptions} ViewerDataOptions */ /** @typedef {import("./analyzer").ChartData} ChartData */ const projectRoot = path.resolve(__dirname, ".."); /** * @param {string | (() => string)} reportTitle report title * @returns {string} resolved title */ function resolveTitle(reportTitle) { if (typeof reportTitle === "function") { return reportTitle(); } return reportTitle; } /** * @param {Sizes} defaultSizes default sizes * @param {CompressionAlgorithm} compressionAlgorithm compression algorithm * @returns {Sizes} default sizes */ function resolveDefaultSizes(defaultSizes, compressionAlgorithm) { if (["gzip", "brotli", "zstd"].includes(defaultSizes)) { return compressionAlgorithm; } return defaultSizes; } /** @typedef {(string | undefined | null)[]} Entrypoints */ /** * @param {StatsCompilation} bundleStats bundle stats * @returns {Entrypoints} entrypoints */ function getEntrypoints(bundleStats) { if ( bundleStats === null || bundleStats === undefined || !bundleStats.entrypoints ) { return []; } return Object.values(bundleStats.entrypoints).map( (entrypoint) => entrypoint.name, ); } /** * @param {ViewerDataOptions} analyzerOpts analyzer options * @param {StatsCompilation} bundleStats bundle stats * @param {string | null} bundleDir bundle dir * @returns {ChartData | null} chart data */ function getChartData(analyzerOpts, bundleStats, bundleDir) { /** @type {ChartData | undefined | null} */ let chartData; const { logger } = analyzerOpts; try { chartData = analyzer.getViewerData(bundleStats, bundleDir, analyzerOpts); } catch (err) { logger.error(`Couldn't analyze webpack bundle:\n${err}`); logger.debug(/** @type {Error} */ (err).stack); chartData = null; } // chartData can either be an array (bundleInfo[]) or null. It can't be an plain object anyway if ( // analyzer.getViewerData() doesn't failed in the previous step chartData && !Array.isArray(chartData) ) { logger.error("Couldn't find any javascript bundles in provided stats file"); chartData = null; } return chartData; } /** * @typedef {object} ServerOptions * @property {number} port port * @property {string} host host * @property {boolean} openBrowser true when need to open browser, otherwise false * @property {string | null} bundleDir bundle dir * @property {Logger} logger logger * @property {Sizes} defaultSizes default sizes * @property {CompressionAlgorithm} compressionAlgorithm compression algorithm * @property {ExcludeAssets | null} excludeAssets exclude assets * @property {ReportTitle} reportTitle report title * @property {AnalyzerUrl} analyzerUrl analyzer url */ /** @typedef {{ ws: WebSocketServer, http: Server, updateChartData: (bundleStats: StatsCompilation) => void }} ViewerServerObj */ /** * @param {StatsCompilation} bundleStats bundle stats * @param {ServerOptions} opts options * @returns {Promise} server */ async function startServer(bundleStats, opts) { const { port = 8888, host = "127.0.0.1", openBrowser = true, bundleDir = null, logger = new Logger(), defaultSizes = "parsed", compressionAlgorithm, excludeAssets = null, reportTitle, analyzerUrl, } = opts || {}; const analyzerOpts = { logger, excludeAssets, compressionAlgorithm }; let chartData = getChartData(analyzerOpts, bundleStats, bundleDir); if (!chartData) { throw new Error("Can't get chart data"); } const sirvMiddleware = sirv(`${projectRoot}/public`, { // disables caching and traverse the file system on every request dev: true, }); const entrypoints = getEntrypoints(bundleStats); const server = http.createServer((req, res) => { if (req.method === "GET" && req.url === "/") { const html = renderViewer({ mode: "server", title: resolveTitle(reportTitle), chartData: /** @type {ChartData} */ (chartData), entrypoints, defaultSizes: resolveDefaultSizes(defaultSizes, compressionAlgorithm), compressionAlgorithm, enableWebSocket: true, }); res.writeHead(200, { "Content-Type": "text/html" }); res.end(html); } else { sirvMiddleware(req, res); } }); await new Promise( /** * @param {(value: void) => void} resolve resolve */ (resolve) => { server.listen(port, host, () => { resolve(); const url = analyzerUrl({ listenPort: port, listenHost: host, boundAddress: server.address(), }); logger.info( `${bold("Webpack Bundle Analyzer")} is started at ${bold(url)}\n` + `Use ${bold("Ctrl+C")} to close it`, ); if (openBrowser) { open(url, logger); } }); }, ); const wss = new WebSocket.Server({ server }); wss.on("connection", (ws) => { ws.on("error", (err) => { // Ignore network errors like `ECONNRESET`, `EPIPE`, etc. if (/** @type {NodeJS.ErrnoException} */ (err).errno) return; logger.info(err.message); }); }); /** * @param {StatsCompilation} bundleStats bundle stats */ function updateChartData(bundleStats) { const newChartData = getChartData(analyzerOpts, bundleStats, bundleDir); if (!newChartData) return; chartData = newChartData; for (const client of wss.clients) { if (client.readyState === WebSocket.OPEN) { client.send( JSON.stringify({ event: "chartDataUpdated", data: newChartData, }), ); } } } return { ws: wss, http: server, updateChartData, }; } /** * @typedef {object} GenerateReportOptions * @property {boolean} openBrowser true when need to open browser, otherwise false * @property {string} reportFilename report filename * @property {ReportTitle} reportTitle report title * @property {string | null} bundleDir bundle dir * @property {Logger} logger logger * @property {Sizes} defaultSizes default sizes * @property {CompressionAlgorithm} compressionAlgorithm compression algorithm * @property {ExcludeAssets} excludeAssets exclude assets */ /** * @param {StatsCompilation} bundleStats bundle stats * @param {GenerateReportOptions} opts opts * @returns {Promise} */ async function generateReport(bundleStats, opts) { const { openBrowser = true, reportFilename, reportTitle, bundleDir = null, logger = new Logger(), defaultSizes = "parsed", compressionAlgorithm, excludeAssets = null, } = opts || {}; const chartData = getChartData( { logger, excludeAssets, compressionAlgorithm }, bundleStats, bundleDir, ); const entrypoints = getEntrypoints(bundleStats); if (!chartData) return; const reportHtml = renderViewer({ mode: "static", title: resolveTitle(reportTitle), chartData, entrypoints, defaultSizes: resolveDefaultSizes(defaultSizes, compressionAlgorithm), compressionAlgorithm, enableWebSocket: false, }); const reportFilepath = path.resolve( bundleDir || process.cwd(), reportFilename, ); fs.mkdirSync(path.dirname(reportFilepath), { recursive: true }); fs.writeFileSync(reportFilepath, reportHtml); logger.info( `${bold("Webpack Bundle Analyzer")} saved report to ${bold(reportFilepath)}`, ); if (openBrowser) { open(`file://${reportFilepath}`, logger); } } /** * @typedef {object} GenerateJSONReportOptions * @property {string} reportFilename report filename * @property {string | null} bundleDir bundle dir * @property {Logger} logger logger * @property {ExcludeAssets} excludeAssets exclude assets * @property {CompressionAlgorithm} compressionAlgorithm compression algorithm */ /** * @param {StatsCompilation} bundleStats bundle stats * @param {GenerateJSONReportOptions} opts options * @returns {Promise} */ async function generateJSONReport(bundleStats, opts) { const { reportFilename, bundleDir = null, logger = new Logger(), excludeAssets = null, compressionAlgorithm, } = opts || {}; const chartData = getChartData( { logger, excludeAssets, compressionAlgorithm }, bundleStats, bundleDir, ); if (!chartData) return; await fs.promises.mkdir(path.dirname(reportFilename), { recursive: true }); await fs.promises.writeFile(reportFilename, JSON.stringify(chartData)); logger.info( `${bold("Webpack Bundle Analyzer")} saved JSON report to ${bold(reportFilename)}`, ); } module.exports = { generateJSONReport, generateReport, getEntrypoints, // deprecated start: startServer, startServer, }; ================================================ FILE: test/.eslintrc.json ================================================ { "extends": "../.eslintrc.json", "env": { "jest": true, "browser": true }, "globals": { "makeWebpackConfig": true, "webpackCompile": true, "forEachWebpackVersion": true } } ================================================ FILE: test/.gitignore ================================================ output # Sandbox config /webpack.config.js # Output of sandbox config /dist ================================================ FILE: test/Logger.js ================================================ const Logger = require("../src/Logger"); class TestLogger extends Logger { constructor(level) { super(level); this.logs = []; } clear() { this.logs = []; } _log(level, ...args) { this.logs.push([level, ...args]); } } function expectLoggerLevel(logger, level) { logger.clear(); const levels = Logger.levels.filter((level) => level !== "silent"); for (const level of levels) { logger[level]("msg1", "msg2"); } const expectedLogs = levels .filter( (testLevel) => Logger.levels.indexOf(testLevel) >= Logger.levels.indexOf(level), ) .map((testLevel) => [testLevel, "msg1", "msg2"]); expect(logger.logs).toEqual(expectedLogs); } function invalidLogLevelMessage(level) { return `Invalid log level "${level}". Use one of these: ${Logger.levels.join(", ")}`; } let logger; describe("Logger", () => { describe("level", () => { for (const testingLevel of Logger.levels) { /* eslint-disable no-loop-func */ describe(`"${testingLevel}"`, () => { beforeEach(() => { logger = new TestLogger(testingLevel); }); for (const level of Logger.levels.filter( (level) => level !== "silent", )) { if ( Logger.levels.indexOf(level) >= Logger.levels.indexOf(testingLevel) ) { it(`should log "${level}" message`, () => { logger[level]("msg1", "msg2"); expect(logger.logs).toEqual([[level, "msg1", "msg2"]]); }); } else { it(`should not log "${level}" message`, () => { logger[level]("msg1", "msg2"); expect(logger.logs).toHaveLength(0); }); } } }); } it('should be set to "info" by default', () => { logger = new TestLogger(); expectLoggerLevel(logger, "info"); }); it("should allow to change level", () => { logger = new TestLogger("warn"); expectLoggerLevel(logger, "warn"); logger.setLogLevel("info"); expectLoggerLevel(logger, "info"); logger.setLogLevel("silent"); expectLoggerLevel(logger, "silent"); }); it("should throw if level is invalid on instance creation", () => { expect(() => new TestLogger("invalid")).toThrow( invalidLogLevelMessage("invalid"), ); }); it("should throw if level is invalid on `setLogLevel`", () => { expect(() => new TestLogger().setLogLevel("invalid")).toThrow( invalidLogLevelMessage("invalid"), ); }); }); }); ================================================ FILE: test/analyzer.js ================================================ const childProcess = require("node:child_process"); const fs = require("node:fs"); const path = require("node:path"); const url = require("node:url"); const puppeteer = require("puppeteer"); const { isZstdSupported } = require("../src/sizeUtils"); let browser; function generateReportFrom(statsFilename, additionalOptions = "") { childProcess.execSync( `../lib/bin/analyzer.js ${additionalOptions} -m static -r output/report.html -O stats/${statsFilename}`, { cwd: __dirname, }, ); } async function getTitleFromReport() { const page = await browser.newPage(); await page.goto( url.pathToFileURL(path.resolve(__dirname, "./output/report.html")), ); return await page.title(); } function forEachChartItem(chartData, cb) { for (const item of chartData) { cb(item); if (item.groups) { forEachChartItem(item.groups, cb); } } } async function getChartData() { const page = await browser.newPage(); await page.goto( url.pathToFileURL(path.resolve(__dirname, "./output/report.html")), ); return await page.evaluate(() => globalThis.chartData); } async function getCompressionAlgorithm() { const page = await browser.newPage(); await page.goto( url.pathToFileURL(path.resolve(__dirname, "./output/report.html")), ); return await page.evaluate(() => globalThis.compressionAlgorithm); } async function expectValidReport(opts) { const { bundleLabel = "bundle.js", statSize = 141 } = opts || {}; expect(fs.existsSync(path.resolve(__dirname, "./output/report.html"))).toBe( true, ); const chartData = await getChartData(); expect(chartData[0]).toMatchObject({ label: bundleLabel, statSize, }); } function generateJSONReportFrom(statsFilename) { childProcess.execSync( `../lib/bin/analyzer.js -m json -r output/report.json stats/${statsFilename}`, { cwd: __dirname, }, ); } describe("Analyzer", () => { beforeAll(async () => { browser = await puppeteer.launch(); await fs.promises.rm(path.resolve(__dirname, "./output"), { force: true, recursive: true, }); }); afterEach(async () => { await fs.promises.rm(path.resolve(__dirname, "./output"), { force: true, recursive: true, }); }); afterAll(async () => { await browser.close(); }); it("should support stats files with all the information in `children` array", async () => { generateReportFrom("with-children-array.json"); await expectValidReport(); }); it("should generate report containing worker bundles", async () => { generateReportFrom("with-worker-loader/stats.json"); const chartData = await getChartData(); expect(chartData[1]).toMatchObject({ label: "bundle.worker.js", }); }); it("should generate report for array webpack.config.js", async () => { generateReportFrom("with-array-config/stats.json"); const chartData = await getChartData(); expect(chartData).toHaveLength(2); expect(chartData[0]).toMatchObject({ label: "config-1-main.js", }); expect(chartData[1]).toMatchObject({ label: "config-2-main.js", }); }); it("should generate report when worker bundles have dynamic imports", async () => { generateReportFrom("with-worker-loader-dynamic-import/stats.json"); const chartData = await getChartData(); expect(chartData[1]).toMatchObject({ label: "1.bundle.worker.js", }); }); it("should support stats files with modules inside `chunks` array", async () => { generateReportFrom("with-modules-in-chunks/stats.json"); const chartData = await getChartData(); expect(chartData).toMatchObject( require("./stats/with-modules-in-chunks/expected-chart-data"), ); }); it("should record accurate byte lengths for sources with special chars", async () => { generateReportFrom("with-special-chars/stats.json"); const chartData = await getChartData(); expect(chartData).toMatchObject( require("./stats/with-special-chars/expected-chart-data"), ); }); it("should support bundles with invalid dynamic require calls", async () => { generateReportFrom("with-invalid-dynamic-require.json"); await expectValidReport({ statSize: 136 }); }); it("should use information about concatenated modules generated by webpack 4", async () => { generateReportFrom("with-module-concatenation-info/stats.json"); const chartData = await getChartData(); expect(chartData[0].groups[0]).toMatchObject( require("./stats/with-module-concatenation-info/expected-chart-data"), ); }); it("should handle stats with minimal configuration", async () => { generateReportFrom("minimal-stats/stats.json"); const chartData = await getChartData(); expect(chartData).toHaveLength(0); }); // eslint-disable-next-line jest/no-disabled-tests it.skip("should not filter out modules that we couldn't find during parsing", async () => { generateReportFrom("with-missing-parsed-module/stats.json"); const chartData = await getChartData(); let unparsedModules = 0; forEachChartItem(chartData, (item) => { if (typeof item.parsedSize !== "number") { unparsedModules++; } }); expect(unparsedModules).toBe(1); }); // eslint-disable-next-line jest/no-disabled-tests it.skip("should gracefully parse invalid chunks", async () => { generateReportFrom("with-invalid-chunk/stats.json"); const chartData = await getChartData(); const invalidChunk = chartData.find((i) => i.label === "invalid-chunk.js"); expect(invalidChunk.groups).toMatchObject([ { id: 1, label: "invalid.js", path: "./invalid.js", statSize: 24, }, ]); expect(invalidChunk.statSize).toBe(24); expect(invalidChunk.parsedSize).toBe(30); }); // eslint-disable-next-line jest/no-disabled-tests it.skip("should gracefully process missing chunks", async () => { generateReportFrom("with-missing-chunk/stats.json"); const chartData = await getChartData(); const invalidChunk = chartData.find((i) => i.label === "invalid-chunk.js"); expect(invalidChunk).toBeDefined(); expect(invalidChunk.statSize).toBe(24); forEachChartItem([invalidChunk], (item) => { expect(typeof item.statSize).toBe("number"); expect(item.parsedSize).toBeUndefined(); }); const validChunk = chartData.find((i) => i.label === "valid-chunk.js"); forEachChartItem([validChunk], (item) => { expect(typeof item.statSize).toBe("number"); expect(typeof item.parsedSize).toBe("number"); }); }); // eslint-disable-next-line jest/no-disabled-tests it.skip("should gracefully process missing module chunks", async () => { generateReportFrom("with-missing-module-chunks/stats.json"); const chartData = await getChartData(); const invalidChunk = chartData.find((i) => i.label === "invalid-chunk.js"); expect(invalidChunk).toBeDefined(); expect(invalidChunk.statSize).toBe(568); forEachChartItem([invalidChunk], (item) => { expect(typeof item.statSize).toBe("number"); expect(item.parsedSize).toBeUndefined(); }); const validChunk = chartData.find((i) => i.label === "valid-chunk.js"); forEachChartItem([validChunk], (item) => { expect(typeof item.statSize).toBe("number"); expect(typeof item.parsedSize).toBe("number"); }); }); it("should support stats files with js modules chunk", async () => { generateReportFrom("with-modules-chunk.json"); await expectValidReport({ bundleLabel: "bundle.mjs" }); }); it("should support stats files with cjs chunk", async () => { generateReportFrom("with-cjs-chunk.json"); await expectValidReport({ bundleLabel: "bundle.cjs" }); }); it("should properly parse extremely optimized bundle from webpack 5", async () => { generateReportFrom("extremely-optimized-webpack-5-bundle/stats.json"); const chartData = await getChartData(); expect(chartData).toMatchObject( require("./stats/extremely-optimized-webpack-5-bundle/expected-chart-data"), ); }); it("should properly parse webpack 5 bundle with single entry", async () => { generateReportFrom("webpack-5-bundle-with-single-entry/stats.json"); const chartData = await getChartData(); expect(chartData).toMatchObject( require("./stats/webpack-5-bundle-with-single-entry/expected-chart-data"), ); }); it("should properly parse webpack 5 bundle with multiple entries", async () => { generateReportFrom("webpack-5-bundle-with-multiple-entries/stats.json"); const chartData = await getChartData(); expect(chartData).toMatchObject( require("./stats/webpack-5-bundle-with-multiple-entries/expected-chart-data"), ); }); it("should properly parse webpack 5 bundle with an entry module that is a concatenated module", async () => { generateReportFrom( "webpack-5-bundle-with-concatenated-entry-module/stats.json", ); const chartData = await getChartData(); expect(chartData).toMatchObject( require("./stats/webpack-5-bundle-with-concatenated-entry-module/expected-chart-data.json"), ); }); it("should support generating JSON output for the report", async () => { generateJSONReportFrom("with-modules-in-chunks/stats.json"); const chartData = require(path.resolve(__dirname, "output/report.json")); expect(chartData).toMatchObject( require("./stats/with-modules-in-chunks/expected-chart-data"), ); }); it("should support stats files with non-asset asset", async () => { generateReportFrom("with-non-asset-asset/stats.json"); await expectValidReport({ bundleLabel: "bundle.js" }); }); it("should map chunks correctly to entrypoints", async () => { generateReportFrom("with-multiple-entrypoints/stats.json"); const chartData = await getChartData(); expect(chartData).toMatchObject( require("./stats/with-multiple-entrypoints/expected-chart-data"), ); }); it("should return empty chartData if there are no entrypoints", async () => { generateReportFrom("with-no-entrypoints/stats.json"); const chartData = await getChartData(); expect(chartData).toHaveLength(0); }); describe("options", () => { describe("title", () => { it("should take the --title option", async () => { const reportTitle = "A string report title"; generateReportFrom( "with-modules-chunk.json", `--title "${reportTitle}"`, ); const generatedReportTitle = await getTitleFromReport(); expect(generatedReportTitle).toBe(reportTitle); }); it("should take the -t option", async () => { const reportTitle = "A string report title"; generateReportFrom("with-modules-chunk.json", `-t "${reportTitle}"`); const generatedReportTitle = await getTitleFromReport(); expect(generatedReportTitle).toBe(reportTitle); }); it("should use a suitable default title", async () => { generateReportFrom("with-modules-chunk.json"); const generatedReportTitle = await getTitleFromReport(); expect(generatedReportTitle).toMatch( /^webpack-bundle-analyzer \[.* at \d{2}:\d{2}\]/u, ); }); }); describe("compression algorithm", () => { it("should accept --compression-algorithm brotli", async () => { generateReportFrom( "with-modules-chunk.json", "--compression-algorithm brotli", ); expect(await getCompressionAlgorithm()).toBe("brotli"); }); it("should accept --compression-algorithm gzip", async () => { generateReportFrom( "with-modules-chunk.json", "--compression-algorithm gzip", ); expect(await getCompressionAlgorithm()).toBe("gzip"); }); if (isZstdSupported) { it("should accept --compression-algorithm zstd", async () => { generateReportFrom( "with-modules-chunk.json", "--compression-algorithm zstd", ); expect(await getCompressionAlgorithm()).toBe("zstd"); }); } it("should default to gzip", async () => { generateReportFrom("with-modules-chunk.json"); expect(await getCompressionAlgorithm()).toBe("gzip"); }); }); }); }); ================================================ FILE: test/bundles/invalidBundle.js ================================================ module.exports = 'invalid bundle'; ================================================ FILE: test/bundles/validBundleWithArrowFunction.js ================================================ webpackJsonp([0],[(t,e,r)=>{ console.log("Hello world!"); }]); ================================================ FILE: test/bundles/validBundleWithArrowFunction.modules.json ================================================ { "modules": { "0": "(t,e,r)=>{\n console.log(\"Hello world!\");\n}" } } ================================================ FILE: test/bundles/validBundleWithEsNextFeatures.js ================================================ webpackJsonp([0],[function(t,e,r){ async function asyncFn() { return await Promise.resolve(1); } const arrowFn = arg => arg * 2; function* generatorFn() { yield 1; } class TestClass { static staticMethod() {} constructor() {} testMethod() {} } for (const i of [1, 2, 3]) { console.log(i); } let obj = { ['a' + 'b']: 1, func() {} }; const [var1, var2] = [1, 2]; }]); ================================================ FILE: test/bundles/validBundleWithEsNextFeatures.modules.json ================================================ { "modules": { "0": "function(t,e,r){\n async function asyncFn() {\n return await Promise.resolve(1);\n }\n\n const arrowFn = arg => arg * 2;\n\n function* generatorFn() {\n yield 1;\n }\n\n class TestClass {\n static staticMethod() {}\n constructor() {}\n testMethod() {}\n }\n\n for (const i of [1, 2, 3]) {\n console.log(i);\n }\n\n let obj = {\n ['a' + 'b']: 1,\n func() {}\n };\n\n const [var1, var2] = [1, 2];\n}" } } ================================================ FILE: test/bundles/validBundleWithIIFE.js ================================================ (()=>{const e=console.log("foo");})(); ================================================ FILE: test/bundles/validBundleWithIIFE.modules.json ================================================ { "modules": {} } ================================================ FILE: test/bundles/validCommonBundleWithDedupePlugin.js ================================================ !function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}(function(t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))switch(typeof t[r]){case"function":break;case"object":t[r]=function(r){var e=r.slice(1),n=t[r[0]];return function(t,r,o){n.apply(this,[t,r,o].concat(e))}}(t[r]);break;default:t[r]=t[t[r]]}return t}([function(t,r,e){e(1),e(2)},function(t,r){t.exports=1},1,,[2, 'arg1', 'arg2'],,['module-id', 'arg']])); ================================================ FILE: test/bundles/validCommonBundleWithDedupePlugin.modules.json ================================================ { "modules": { "0": "function(t,r,e){e(1),e(2)}", "1": "function(t,r){t.exports=1}", "2": "1", "4": "[2, 'arg1', 'arg2']", "6": "['module-id', 'arg']" } } ================================================ FILE: test/bundles/validCommonBundleWithModulesAsArray.js ================================================ !function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(i,a){for(var s,u,l=0,c=[];l{var r={631:r=>{r.exports="module a"},85:r=>{r.exports="module a"},326:r=>{r.exports="module b"}},e={};function o(t){if(e[t])return e[t].exports;var p=e[t]={exports:{}};return r[t](p,p.exports,o),p.exports}o(85),o(326),o(631)})(); ================================================ FILE: test/bundles/validWebpack5ModernBundle.modules.json ================================================ { "modules": { "631": "r=>{r.exports=\"module a\"}", "85": "r=>{r.exports=\"module a\"}", "326": "r=>{r.exports=\"module b\"}" } } ================================================ FILE: test/dev-server/.gitignore ================================================ output ================================================ FILE: test/dev-server/src.js ================================================ export const chuck = "norris"; ================================================ FILE: test/dev-server/webpack.config.js ================================================ "use strict"; const path = require("node:path"); const BundleAnalyzerPlugin = require("../../src/BundleAnalyzerPlugin"); module.exports = { mode: "development", entry: path.resolve(__dirname, "./src.js"), output: { path: path.resolve(__dirname, "./output"), filename: "bundle.js", }, plugins: [ new BundleAnalyzerPlugin({ analyzerMode: "static", reportFilename: "report.html", openAnalyzer: false, }), ], }; ================================================ FILE: test/dev-server.js ================================================ const { spawn } = require("node:child_process"); const fs = require("node:fs"); const path = require("node:path"); const ROOT = path.resolve(__dirname, "./dev-server"); const WEBPACK_CONFIG_PATH = `${ROOT}/webpack.config.js`; const webpackConfig = require(WEBPACK_CONFIG_PATH); const timeout = 15000; async function deleteOutputDirectory() { await fs.promises.rm(webpackConfig.output.path, { force: true, recursive: true, }); } describe("Webpack Dev Server", () => { beforeAll(deleteOutputDirectory); afterEach(deleteOutputDirectory); it("should save report file to the output directory", (done) => { const startedAt = Date.now(); const devServer = spawn( path.resolve(__dirname, "../node_modules/.bin/webpack-dev-server"), ["--config", WEBPACK_CONFIG_PATH], { cwd: ROOT, }, ); function finish(errorMessage) { // eslint-disable-next-line no-use-before-define clearInterval(reportCheckIntervalId); devServer.kill(); done(errorMessage ? new Error(errorMessage) : null); } const reportCheckIntervalId = setInterval(() => { if ( fs.existsSync(path.resolve(webpackConfig.output.path, "./report.html")) ) { expect(true).toBe(true); finish(); } else if (Date.now() - startedAt > timeout - 1000) { finish( `report file wasn't found in "${webpackConfig.output.path}" directory`, ); } }, 300); }); }); ================================================ FILE: test/helpers.js ================================================ const path = require("node:path"); const webpack = require("webpack"); const BundleAnalyzerPlugin = require("../src/BundleAnalyzerPlugin"); /* global it */ /** * @param {number} ms ms * @returns {Promise} wait */ function wait(ms) { return new Promise((resolve) => { setTimeout(resolve, ms); }); } const webpackVersions = { 4: path.resolve(__dirname, "../node_modules/webpack-4"), 5: path.resolve(__dirname, "../node_modules/webpack"), }; /** * @param {import("webpack").Configuration} config configuration * @param {string} version version * @returns {Promise} */ async function webpackCompile(config, version) { if (version === undefined || version === null) { throw new Error("Webpack version is not specified"); } if (!webpackVersions[version]) { throw new Error( `Webpack version "${version}" is not available for testing`, ); } let webpack; try { webpack = require(webpackVersions[version]); } catch (err) { throw new Error( `Error requiring Webpack ${version}:\n${err}\n\n` + 'Try running "npm run install-test-webpack-versions".', { cause: err }, ); } await new Promise((resolve, reject) => { webpack(config, (err, stats) => { if (err) { return reject(err); } if (stats.hasErrors()) { return reject(stats.toJson({ source: false }).errors); } resolve(); }); }); // Waiting for the next tick (for analyzer report to be generated) await wait(1); } /** * @param {{ minify: boolean, multipleChunks: boolean, analyzerOpts: import("../src/BundleAnalyzerPlugin").Options }} opts options * @returns {import("webpack").Configuration} configuration */ function makeWebpackConfig(opts = {}) { opts = { ...opts, minify: false, multipleChunks: false, analyzerOpts: { analyzerMode: "static", openAnalyzer: false, logLevel: "error", ...opts.analyzerOpts, }, }; return { context: __dirname, mode: "development", entry: { bundle: "./src", }, output: { path: path.resolve(__dirname, "./output"), filename: "[name].js", }, optimization: { runtimeChunk: { name: "manifest", }, }, plugins: ((plugins) => { plugins.push(new BundleAnalyzerPlugin(opts.analyzerOpts)); if (opts.minify) { plugins.push( new webpack.optimize.UglifyJsPlugin({ comments: false, mangle: true, compress: { warnings: false, // eslint-disable-next-line camelcase negate_iife: false, }, }), ); } return plugins; })([]), }; } /** * @param {("4", "5")[] | (() => "4" | "5")} versions versions * @param {() => void} cb callback */ function forEachWebpackVersion(versions, cb) { const availableVersions = Object.keys(webpackVersions); if (typeof versions === "function") { cb = versions; versions = availableVersions; } else { const notFoundVersions = versions.filter( (version) => !availableVersions.includes(version), ); if (notFoundVersions.length) { throw new Error( `These Webpack versions are not currently available for testing: ${notFoundVersions.join(", ")}\n` + 'You need to install them manually into "test/webpack-versions" directory.', ); } } for (const version of versions) { // eslint-disable-next-line func-style const itFn = function itFn(testDescription, ...args) { return it.call(this, `${testDescription} (Webpack ${version})`, ...args); }; itFn.only = function only(testDescription, ...args) { return it.only.call( this, `${testDescription} (Webpack ${version})`, ...args, ); }; cb({ it: itFn, version, webpackCompile: (config) => webpackCompile(config, version), }); } } module.exports = { forEachWebpackVersion, makeWebpackConfig, webpackCompile }; ================================================ FILE: test/parseUtils.js ================================================ const fs = require("node:fs"); const path = require("node:path"); const { parseBundle } = require("../src/parseUtils"); const BUNDLES_DIR = path.resolve(__dirname, "./bundles"); describe("parseBundle", () => { const bundles = fs .readdirSync(BUNDLES_DIR) .filter((filename) => filename.endsWith(".js")) .map((filename) => filename.replace(/\.js$/u, "")); for (const bundleName of bundles.filter((bundleName) => bundleName.startsWith("valid"), )) { it(`should parse ${bundleName.toLocaleLowerCase()}`, () => { const bundleFile = `${BUNDLES_DIR}/${bundleName}.js`; const bundle = parseBundle(bundleFile); const expectedModules = JSON.parse( fs.readFileSync(`${BUNDLES_DIR}/${bundleName}.modules.json`), ); expect(bundle.src).toBe(fs.readFileSync(bundleFile, "utf8")); expect(bundle.modules).toEqual(expectedModules.modules); }); } it("should parse invalid bundle and return it's content and empty modules hash", () => { const bundleFile = `${BUNDLES_DIR}/invalidBundle.js`; const bundle = parseBundle(bundleFile); expect(bundle.src).toBe(fs.readFileSync(bundleFile, "utf8")); expect(bundle.modules).toEqual({}); }); }); ================================================ FILE: test/plugin.js ================================================ const fs = require("node:fs"); const path = require("node:path"); const url = require("node:url"); const puppeteer = require("puppeteer"); const BundleAnalyzerPlugin = require("../src/BundleAnalyzerPlugin"); const { isZstdSupported } = require("../src/sizeUtils"); const { forEachWebpackVersion, makeWebpackConfig, webpackCompile, } = require("./helpers"); function getChartDataFromJSONReport(reportFilename = "report.json") { return require(path.resolve(__dirname, `output/${reportFilename}`)); } describe("Plugin options", () => { describe("options", () => { it("should be optional", () => { expect(() => new BundleAnalyzerPlugin()).not.toThrow(); }); }); }); describe("Plugin", () => { let browser; async function getTitleFromReport(reportFilename = "report.html") { const page = await browser.newPage(); await page.goto( url.pathToFileURL(path.resolve(__dirname, `./output/${reportFilename}`)), ); return await page.title(); } async function getChartDataFromReport(reportFilename = "report.html") { const page = await browser.newPage(); await page.goto( url.pathToFileURL(path.resolve(__dirname, `./output/${reportFilename}`)), ); return await page.evaluate(() => globalThis.chartData); } async function expectValidReport(opts) { const { bundleFilename = "bundle.js", reportFilename = "report.html", bundleLabel = "bundle.js", statSize = 141, parsedSize = 2821, gzipSize, } = { gzipSize: 770, ...opts }; expect( fs.existsSync(path.resolve(__dirname, `./output/${bundleFilename}`)), ).toBe(true); expect( fs.existsSync(path.resolve(__dirname, `./output/${reportFilename}`)), ).toBe(true); const chartData = await getChartDataFromReport(reportFilename); const expected = { label: bundleLabel, statSize, parsedSize, }; if (typeof gzipSize !== "undefined") { expected.gzipSize = gzipSize; } if (typeof opts.brotliSize !== "undefined") { expected.brotliSize = opts.brotliSize; } if (typeof opts.zstdSize !== "undefined") { expected.zstdSize = opts.zstdSize; } expect(chartData[0]).toMatchObject(expected); } beforeEach(async () => { browser = await puppeteer.launch(); await fs.promises.rm(path.resolve(__dirname, "./output"), { force: true, recursive: true, }); }); afterEach(async () => { await browser.close(); await fs.promises.rm(path.resolve(__dirname, "./output"), { force: true, recursive: true, }); }); forEachWebpackVersion(["4"], ({ it, webpackCompile }) => { // Webpack 5 doesn't support `jsonpFunction` option it("should support webpack config with custom `jsonpFunction` name", async () => { const config = makeWebpackConfig({ multipleChunks: true, }); config.output.jsonpFunction = "somethingCompletelyDifferent"; await webpackCompile(config); await expectValidReport({ parsedSize: 1349, gzipSize: 358, }); }); }); /* eslint jest/no-standalone-expect: ["error", { additionalTestBlockFunctions: ["forEachWebpackVersion"] }] */ forEachWebpackVersion(({ it, webpackCompile }) => { it("should allow to generate json report", async () => { const config = makeWebpackConfig({ analyzerOpts: { analyzerMode: "json", }, }); await webpackCompile(config); const chartData = await getChartDataFromJSONReport(); expect(chartData).toBeDefined(); }); it("should support webpack config with `multi` module", async () => { const config = makeWebpackConfig(); config.entry.bundle = ["./src/a.js", "./src/b.js"]; await webpackCompile(config); const chartData = await getChartDataFromReport(); const bundleGroup = chartData.find( (group) => group.label === "bundle.js", ); expect(bundleGroup.groups).toEqual( expect.arrayContaining([ expect.objectContaining({ label: "src", path: "./src", groups: expect.arrayContaining([ expect.objectContaining({ label: "a.js", path: "./src/a.js", }), expect.objectContaining({ label: "b.js", path: "./src/b.js", }), ]), }), ]), ); }); }); describe("options", () => { describe("excludeAssets", () => { forEachWebpackVersion(({ it, webpackCompile }) => { it("should filter out assets from the report", async () => { const config = makeWebpackConfig({ multipleChunks: true, analyzerOpts: { excludeAssets: "manifest", }, }); await webpackCompile(config); const chartData = await getChartDataFromReport(); expect(chartData.map((i) => i.label)).toEqual(["bundle.js"]); }); }); }); describe("reportTitle", () => { it("should have a sensible default", async () => { const config = makeWebpackConfig(); await webpackCompile(config, "4"); const generatedReportTitle = await getTitleFromReport(); expect(generatedReportTitle).toMatch( /^webpack-bundle-analyzer \[.* at \d{2}:\d{2}\]/u, ); }); it("should support a string value", async () => { const reportTitle = "A string report title"; const config = makeWebpackConfig({ analyzerOpts: { reportTitle, }, }); await webpackCompile(config, "4"); const generatedReportTitle = await getTitleFromReport(); expect(generatedReportTitle).toBe(reportTitle); }); it("should support a function value", async () => { const reportTitleResult = "A string report title"; const config = makeWebpackConfig({ analyzerOpts: { reportTitle: () => reportTitleResult, }, }); await webpackCompile(config, "4"); const generatedReportTitle = await getTitleFromReport(); expect(generatedReportTitle).toBe(reportTitleResult); }); it("should propagate an error in a function", async () => { const reportTitleError = new Error("test"); const config = makeWebpackConfig({ analyzerOpts: { reportTitle: () => { throw reportTitleError; }, }, }); let error = null; try { await webpackCompile(config, "4"); } catch (err) { error = err; } expect(error).toBe(reportTitleError); }); }); describe("compressionAlgorithm", () => { it("should default to gzip", async () => { const config = makeWebpackConfig({ analyzerOpts: {} }); await webpackCompile(config, "4"); await expectValidReport({ parsedSize: 1317, gzipSize: 341 }); }); it("should support gzip", async () => { const config = makeWebpackConfig({ analyzerOpts: { compressionAlgorithm: "gzip" }, }); await webpackCompile(config, "4"); await expectValidReport({ parsedSize: 1317, gzipSize: 341 }); }); it("should support brotli", async () => { const config = makeWebpackConfig({ analyzerOpts: { compressionAlgorithm: "brotli" }, }); await webpackCompile(config, "4"); await expectValidReport({ gzipSize: undefined, parsedSize: 1317, brotliSize: 295, }); }); if (isZstdSupported) { it("should support zstd", async () => { const config = makeWebpackConfig({ analyzerOpts: { compressionAlgorithm: "zstd" }, }); await webpackCompile(config, "4"); await expectValidReport({ parsedSize: 1317, gzipSize: undefined, brotliSize: undefined, zstdSize: 345, }); }); } }); }); }); ================================================ FILE: test/src/a-clone.js ================================================ module.exports = "module a"; ================================================ FILE: test/src/a.js ================================================ module.exports = "module a"; ================================================ FILE: test/src/b.js ================================================ module.exports = "module b"; ================================================ FILE: test/src/index.js ================================================ require("./a"); require("./b"); require("./a-clone"); ================================================ FILE: test/stats/extremely-optimized-webpack-5-bundle/bundle.js ================================================ (()=>{"use strict";console.log("module a","module b")})(); ================================================ FILE: test/stats/extremely-optimized-webpack-5-bundle/expected-chart-data.js ================================================ module.exports = [ { 'label': 'bundle.js', 'isAsset': true, 'statSize': 142, 'parsedSize': 58, 'gzipSize': 71, 'groups': [ { 'label': 'src', 'path': './src', 'statSize': 142, 'groups': [ { 'id': 602, 'label': 'index.js + 2 modules (concatenated)', 'path': './src/index.js + 2 modules (concatenated)', 'statSize': 142, 'parsedSize': 58, 'gzipSize': 71, 'concatenated': true, 'groups': [ { 'label': 'src', 'path': './src/index.js + 2 modules (concatenated)/src', 'statSize': 142, 'groups': [ { 'id': null, 'label': 'index.js', 'path': './src/index.js + 2 modules (concatenated)/src/index.js', 'statSize': 62, 'parsedSize': 25, 'gzipSize': 30, 'inaccurateSizes': true }, { 'id': null, 'label': 'a.js', 'path': './src/index.js + 2 modules (concatenated)/src/a.js', 'statSize': 40, 'parsedSize': 16, 'gzipSize': 20, 'inaccurateSizes': true }, { 'id': null, 'label': 'b.js', 'path': './src/index.js + 2 modules (concatenated)/src/b.js', 'statSize': 40, 'parsedSize': 16, 'gzipSize': 20, 'inaccurateSizes': true } ], 'parsedSize': 58, 'gzipSize': 71, 'inaccurateSizes': true } ] } ], 'parsedSize': 58, 'gzipSize': 71 } ] } ]; ================================================ FILE: test/stats/extremely-optimized-webpack-5-bundle/stats.json ================================================ { "hash": "3d86243b5bbeac1fe1cc", "version": "5.3.2", "time": 151, "builtAt": 1604593377239, "publicPath": "auto", "outputPath": "/Volumes/Work/webpack-bundle-analyzer/test/dist", "assetsByChunkName": { "main": [ "bundle.js" ] }, "assets": [ { "type": "asset", "name": "bundle.js", "size": 58, "chunkNames": [ "main" ], "chunkIdHints": [ ], "auxiliaryChunkNames": [ ], "auxiliaryChunkIdHints": [ ], "emitted": true, "comparedForEmit": false, "cached": false, "info": { "javascriptModule": false, "minimized": true, "size": 58 }, "related": { }, "chunks": [ 179 ], "auxiliaryChunks": [ ], "isOverSizeLimit": false } ], "chunks": [ { "rendered": true, "initial": true, "entry": true, "recorded": false, "size": 142, "sizes": { "javascript": 142 }, "names": [ "main" ], "idHints": [ ], "runtime": [ "main" ], "files": [ "bundle.js" ], "auxiliaryFiles": [ ], "hash": "fcb2ee0c4674c34c0042", "childrenByOrder": { }, "id": 179, "siblings": [ ], "parents": [ ], "children": [ ], "modules": [ { "type": "module", "moduleType": "javascript/esm", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js|24bc130325be4ac663fff0f1126040b7", "name": "./src/index.js + 2 modules", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "size": 142, "sizes": { "javascript": 142 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": 602, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./src/index.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ ], "depth": 0, "modules": [ { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "size": 62, "sizes": { "javascript": 62 }, "cacheable": true, "built": true, "codeGenerated": false, "cached": false, "optional": false, "orphan": false, "dependent": true, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [ ], "assets": [ ], "reasons": [ ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "index": 1, "preOrderIndex": 1, "index2": 0, "postOrderIndex": 0, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": false, "cached": false, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [ ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": null, "resolvedModuleId": null }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "index": 2, "preOrderIndex": 2, "index2": 1, "postOrderIndex": 1, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": false, "cached": false, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [ ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": null, "resolvedModuleId": null }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 } ] } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "./src/index.js" } ] } ], "modules": [ { "type": "module", "moduleType": "javascript/esm", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js|24bc130325be4ac663fff0f1126040b7", "name": "./src/index.js + 2 modules", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "size": 142, "sizes": { "javascript": 142 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": 602, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./src/index.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ ], "depth": 0, "modules": [ { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "size": 62, "sizes": { "javascript": 62 }, "cacheable": true, "built": true, "codeGenerated": false, "cached": false, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [ ], "assets": [ ], "reasons": [ ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "index": 1, "preOrderIndex": 1, "index2": 0, "postOrderIndex": 0, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": false, "cached": false, "optional": false, "orphan": false, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [ ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": null, "resolvedModuleId": null }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "index": 2, "preOrderIndex": 2, "index2": 1, "postOrderIndex": 1, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": false, "cached": false, "optional": false, "orphan": false, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [ ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": null, "resolvedModuleId": null }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 } ] }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "index": 1, "preOrderIndex": 1, "index2": 0, "postOrderIndex": 0, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": false, "cached": false, "optional": false, "orphan": true, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [ ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": null, "resolvedModuleId": null }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "index": 2, "preOrderIndex": 2, "index2": 1, "postOrderIndex": 1, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": false, "cached": false, "optional": false, "orphan": true, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [ ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": null, "resolvedModuleId": null }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 } ], "entrypoints": { "main": { "name": "main", "chunks": [ 179 ], "assets": [ { "name": "bundle.js", "size": 58 } ], "filteredAssets": 0, "assetsSize": 58, "auxiliaryAssets": [ ], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": { }, "childAssets": { }, "isOverSizeLimit": false } }, "namedChunkGroups": { "main": { "name": "main", "chunks": [ 179 ], "assets": [ { "name": "bundle.js", "size": 58 } ], "filteredAssets": 0, "assetsSize": 58, "auxiliaryAssets": [ ], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": { }, "childAssets": { }, "isOverSizeLimit": false } }, "errors": [ ], "errorsCount": 0, "warnings": [ ], "warningsCount": 0, "children": [ ] } ================================================ FILE: test/stats/minimal-stats/stats.json ================================================ {"logging":{"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./simple-entry.js":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/viewer.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/store.js":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/ModulesTreemap.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/utils.js":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/localStorage.js":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Tooltip.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Treemap.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Sidebar.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/CheckboxList.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Checkbox.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Dropdown.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Switcher.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/ModulesList.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Search.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/ContextMenu.jsx":{"entries":[],"filteredEntries":3,"debug":false},"webpack.DefinePlugin":{"entries":[],"filteredEntries":137,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/SwitcherItem.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Button.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/ModuleItem.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/Icon.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/CheckboxListItem.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/components/ContextMenuItem.jsx":{"entries":[],"filteredEntries":3,"debug":false},"./node_modules/babel-loader/lib/index.js babel-loader ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0]!./client/lib/PureComponent.jsx":{"entries":[],"filteredEntries":3,"debug":false},"webpack.Compiler":{"entries":[],"filteredEntries":7,"debug":false},"webpack.Compilation":{"entries":[],"filteredEntries":27,"debug":false},"webpack.FlagDependencyExportsPlugin":{"entries":[],"filteredEntries":4,"debug":false},"webpack.InnerGraphPlugin":{"entries":[],"filteredEntries":1,"debug":false},"webpack.SideEffectsFlagPlugin":{"entries":[],"filteredEntries":1,"debug":false},"webpack.FlagDependencyUsagePlugin":{"entries":[],"filteredEntries":2,"debug":false},"webpack.buildChunkGraph":{"entries":[],"filteredEntries":9,"debug":false},"webpack.SplitChunksPlugin":{"entries":[],"filteredEntries":4,"debug":false},"webpack.ModuleConcatenationPlugin":{"entries":[],"filteredEntries":8,"debug":false},"webpack.FileSystemInfo":{"entries":[],"filteredEntries":11,"debug":false},"webpack.Watching":{"entries":[],"filteredEntries":1,"debug":false}},"version":"5.102.1","time":4182,"assetsByChunkName":{"main":["viewer.js"]},"filteredAssets":1,"filteredModules":172,"filteredErrorDetailsCount":0,"errors":[],"errorsCount":0,"filteredWarningDetailsCount":0,"warnings":[],"warningsCount":0} ================================================ FILE: test/stats/webpack-5-bundle-with-concatenated-entry-module/app.js ================================================ (()=>{"use strict";console.log("foo.js"),console.log("bar.js")})(),console.log("baz.js"); ================================================ FILE: test/stats/webpack-5-bundle-with-concatenated-entry-module/expected-chart-data.json ================================================ [{"groups": [{"concatenated": true, "groups": [{"gzipSize": 8, "id": 613, "inaccurateSizes": true, "label": "baz.js", "parsedSize": 10, "path": "./entry modules (concatenated)/baz.js", "statSize": 23}, {"concatenated": true, "groups": [{"gzipSize": 5, "id": null, "inaccurateSizes": true, "label": "index.js", "parsedSize": 6, "path": "./entry modules (concatenated)/index.js + 3 modules (concatenated)/index.js", "statSize": 14}, {"groups": [{"gzipSize": 12, "id": null, "inaccurateSizes": true, "label": "index.js", "parsedSize": 14, "path": "./entry modules (concatenated)/index.js + 3 modules (concatenated)/dep/index.js", "statSize": 32}, {"gzipSize": 25, "id": null, "inaccurateSizes": true, "label": "foo.js", "parsedSize": 29, "path": "./entry modules (concatenated)/index.js + 3 modules (concatenated)/dep/foo.js", "statSize": 66}, {"gzipSize": 25, "id": null, "inaccurateSizes": true, "label": "bar.js", "parsedSize": 29, "path": "./entry modules (concatenated)/index.js + 3 modules (concatenated)/dep/bar.js", "statSize": 66}], "gzipSize": 62, "inaccurateSizes": true, "label": "dep", "parsedSize": 72, "path": "./entry modules (concatenated)/index.js + 3 modules (concatenated)/dep", "statSize": 164}], "gzipSize": 68, "id": 469, "label": "index.js + 3 modules (concatenated)", "parsedSize": 79, "path": "./entry modules (concatenated)/index.js + 3 modules (concatenated)", "statSize": 178}], "gzipSize": 77, "label": "entry modules (concatenated)", "parsedSize": 90, "path": "./entry modules (concatenated)", "statSize": 201}], "gzipSize": 77, "isAsset": true, "isInitialByEntrypoint": {"app": true}, "label": "app.js", "parsedSize": 90, "statSize": 201}] ================================================ FILE: test/stats/webpack-5-bundle-with-concatenated-entry-module/stats.json ================================================ { "hash": "9b3a9bf7f15684e8eb22", "version": "5.72.1", "time": 116, "builtAt": 1685518072786, "publicPath": "auto", "outputPath": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/build", "assetsByChunkName": { "app": [ "app.js" ] }, "assets": [ { "type": "asset", "name": "app.js", "size": 89, "emitted": true, "comparedForEmit": false, "cached": false, "info": { "javascriptModule": false, "minimized": true, "size": 89 }, "chunkNames": [ "app" ], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "related": {}, "chunks": [ 143 ], "auxiliaryChunks": [], "isOverSizeLimit": false } ], "chunks": [ { "rendered": true, "initial": true, "entry": true, "recorded": false, "size": 201, "sizes": { "javascript": 201 }, "names": [ "app" ], "idHints": [], "runtime": [ "app" ], "files": [ "app.js" ], "auxiliaryFiles": [], "hash": "f27a9d9e4859c54b46bf", "childrenByOrder": {}, "id": 143, "siblings": [], "parents": [], "children": [], "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 23, "sizes": { "javascript": 23 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/baz.js", "name": "./baz.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/baz.js", "index": 4, "preOrderIndex": 4, "index2": 4, "postOrderIndex": 4, "cacheable": true, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 613, "issuerId": null, "chunks": [ 143 ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./baz.js", "loc": "app", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": null, "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 1:0-22", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/esm", "layer": null, "size": 178, "sizes": { "javascript": 178 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js|7d6b74ccf4470678a84315f5e2796055", "name": "./index.js + 3 modules", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "index": 0, "preOrderIndex": 0, "index2": 3, "postOrderIndex": 3, "cacheable": true, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": 469, "chunks": [ 143 ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./index.js", "loc": "app", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 14, "sizes": { "javascript": 14 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "index": 0, "preOrderIndex": 0, "index2": 3, "postOrderIndex": 3, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Dependency (harmony side effect evaluation) with side effects at 1:0-13" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 32, "sizes": { "javascript": 32 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "index": 1, "preOrderIndex": 1, "index2": 2, "postOrderIndex": 2, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "issuerName": "./index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "module": "./index.js", "moduleName": "./index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "resolvedModule": "./index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "dep", "loc": "1:0-13", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Dependency (harmony side effect evaluation) with side effects at 1:0-15" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 66, "sizes": { "javascript": 66 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/foo.js", "name": "../dep/foo.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/foo.js", "index": 2, "preOrderIndex": 2, "index2": 0, "postOrderIndex": 0, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "issuerName": "../dep/index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null }, { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "module": "../dep/index.js", "moduleName": "../dep/index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "resolvedModule": "../dep/index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "./foo", "loc": "1:0-15", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [ "foo" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-22" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 66, "sizes": { "javascript": 66 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/bar.js", "name": "../dep/bar.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/bar.js", "index": 3, "preOrderIndex": 3, "index2": 1, "postOrderIndex": 1, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "issuerName": "../dep/index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null }, { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "module": "../dep/index.js", "moduleName": "../dep/index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "resolvedModule": "../dep/index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "./bar", "loc": "2:0-15", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [ "bar" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-22" ], "depth": 2 } ] } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "app", "request": "./baz.js" }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "app", "request": "./index.js" } ] } ], "modules": [ { "type": "module", "moduleType": "javascript/esm", "layer": null, "size": 178, "sizes": { "javascript": 178 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js|7d6b74ccf4470678a84315f5e2796055", "name": "./index.js + 3 modules", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "index": 0, "preOrderIndex": 0, "index2": 3, "postOrderIndex": 3, "cacheable": true, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": 469, "chunks": [ 143 ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./index.js", "loc": "app", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 14, "sizes": { "javascript": 14 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "index": 0, "preOrderIndex": 0, "index2": 3, "postOrderIndex": 3, "cacheable": true, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Dependency (harmony side effect evaluation) with side effects at 1:0-13" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 32, "sizes": { "javascript": 32 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "index": 1, "preOrderIndex": 1, "index2": 2, "postOrderIndex": 2, "cacheable": true, "optional": false, "orphan": false, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "issuerName": "./index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "module": "./index.js", "moduleName": "./index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "resolvedModule": "./index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "dep", "loc": "1:0-13", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Dependency (harmony side effect evaluation) with side effects at 1:0-15" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 66, "sizes": { "javascript": 66 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/foo.js", "name": "../dep/foo.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/foo.js", "index": 2, "preOrderIndex": 2, "index2": 0, "postOrderIndex": 0, "cacheable": true, "optional": false, "orphan": false, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "issuerName": "../dep/index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null }, { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "module": "../dep/index.js", "moduleName": "../dep/index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "resolvedModule": "../dep/index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "./foo", "loc": "1:0-15", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [ "foo" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-22" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 66, "sizes": { "javascript": 66 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/bar.js", "name": "../dep/bar.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/bar.js", "index": 3, "preOrderIndex": 3, "index2": 1, "postOrderIndex": 1, "cacheable": true, "optional": false, "orphan": false, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "issuerName": "../dep/index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null }, { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "module": "../dep/index.js", "moduleName": "../dep/index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "resolvedModule": "../dep/index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "./bar", "loc": "2:0-15", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [ "bar" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-22" ], "depth": 2 } ] }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 23, "sizes": { "javascript": 23 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/baz.js", "name": "./baz.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/baz.js", "index": 4, "preOrderIndex": 4, "index2": 4, "postOrderIndex": 4, "cacheable": true, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 613, "issuerId": null, "chunks": [ 143 ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./baz.js", "loc": "app", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": null, "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 1:0-22", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 32, "sizes": { "javascript": 32 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "index": 1, "preOrderIndex": 1, "index2": 2, "postOrderIndex": 2, "cacheable": true, "optional": false, "orphan": true, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "issuerName": "./index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "module": "./index.js", "moduleName": "./index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "resolvedModule": "./index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "dep", "loc": "1:0-13", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Dependency (harmony side effect evaluation) with side effects at 1:0-15" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 66, "sizes": { "javascript": 66 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/foo.js", "name": "../dep/foo.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/foo.js", "index": 2, "preOrderIndex": 2, "index2": 0, "postOrderIndex": 0, "cacheable": true, "optional": false, "orphan": true, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "issuerName": "../dep/index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null }, { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "module": "../dep/index.js", "moduleName": "../dep/index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "resolvedModule": "../dep/index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "./foo", "loc": "1:0-15", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [ "foo" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-22" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 66, "sizes": { "javascript": 66 }, "built": true, "codeGenerated": false, "buildTimeExecuted": false, "cached": false, "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/bar.js", "name": "../dep/bar.js", "nameForCondition": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/bar.js", "index": 3, "preOrderIndex": 3, "index2": 1, "postOrderIndex": 1, "cacheable": true, "optional": false, "orphan": true, "issuer": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "issuerName": "../dep/index.js", "issuerPath": [ { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/app/index.js", "name": "./index.js", "id": null }, { "identifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "name": "../dep/index.js", "id": null } ], "failed": false, "errors": 0, "warnings": 0, "id": null, "issuerId": null, "chunks": [], "assets": [], "reasons": [ { "moduleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "module": "../dep/index.js", "moduleName": "../dep/index.js", "resolvedModuleIdentifier": "/Volumes/git/webpack-bundle-analyzer-entry-modules/packages/dep/index.js", "resolvedModule": "../dep/index.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "./bar", "loc": "2:0-15", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [ "bar" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-22" ], "depth": 2 } ], "entrypoints": { "app": { "name": "app", "chunks": [ 143 ], "assets": [ { "name": "app.js", "size": 89 } ], "filteredAssets": 0, "assetsSize": 89, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false } }, "namedChunkGroups": { "app": { "name": "app", "chunks": [ 143 ], "assets": [ { "name": "app.js", "size": 89 } ], "filteredAssets": 0, "assetsSize": 89, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false } }, "errors": [], "errorsCount": 0, "warnings": [], "warningsCount": 0, "children": [] } ================================================ FILE: test/stats/webpack-5-bundle-with-multiple-entries/bundle.js ================================================ (()=>{"use strict";var o,e,r={85:(o,e,r)=>{r.d(e,{Z:()=>t});const t="module a"},326:(o,e,r)=>{r.d(e,{Z:()=>t});const t="module b"}},t={};function n(o){if(t[o])return t[o].exports;var e=t[o]={exports:{}};return r[o](e,e.exports,n),e.exports}n.d=(o,e)=>{for(var r in e)n.o(e,r)&&!n.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:e[r]})},n.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),o=n(85),e=n(326),console.log(o.Z,e.Z),(()=>{var o=n(85),e=n(326);console.log(o.Z,e.Z)})()})(); ================================================ FILE: test/stats/webpack-5-bundle-with-multiple-entries/expected-chart-data.js ================================================ module.exports = [ { 'label': 'bundle.js', 'isAsset': true, 'statSize': 204, 'parsedSize': 488, 'gzipSize': 297, 'groups': [ { 'label': 'entry modules (concatenated)', 'path': './entry modules (concatenated)', 'statSize': 124, 'parsedSize': 396, 'gzipSize': 265, 'concatenated': true, 'groups': [ { 'label': 'src', 'path': './entry modules (concatenated)/src', 'statSize': 124, 'groups': [ { 'id': 138, 'label': 'index.js', 'path': './entry modules (concatenated)/src/index.js', 'statSize': 62, 'parsedSize': 198, 'gzipSize': 132, 'inaccurateSizes': true }, { 'id': 51, 'label': 'index2.js', 'path': './entry modules (concatenated)/src/index2.js', 'statSize': 62, 'parsedSize': 198, 'gzipSize': 132, 'inaccurateSizes': true } ], 'parsedSize': 396, 'gzipSize': 265, 'inaccurateSizes': true } ] }, { 'label': 'src', 'path': './src', 'statSize': 80, 'groups': [ { 'id': 85, 'label': 'a.js', 'path': './src/a.js', 'statSize': 40, 'parsedSize': 46, 'gzipSize': 66 }, { 'id': 326, 'label': 'b.js', 'path': './src/b.js', 'statSize': 40, 'parsedSize': 46, 'gzipSize': 66 } ], 'parsedSize': 92, 'gzipSize': 72 } ] } ]; ================================================ FILE: test/stats/webpack-5-bundle-with-multiple-entries/stats.json ================================================ { "hash": "36d4270b59839025be6f", "version": "5.3.2", "time": 173, "builtAt": 1604594140532, "publicPath": "auto", "outputPath": "/Volumes/Work/webpack-bundle-analyzer/test/dist", "assetsByChunkName": { "main": [ "bundle.js" ] }, "assets": [ { "type": "asset", "name": "bundle.js", "size": 488, "chunkNames": [ "main" ], "chunkIdHints": [ ], "auxiliaryChunkNames": [ ], "auxiliaryChunkIdHints": [ ], "emitted": true, "comparedForEmit": false, "cached": false, "info": { "javascriptModule": false, "minimized": true, "size": 488 }, "related": { }, "chunks": [ 179 ], "auxiliaryChunks": [ ], "isOverSizeLimit": false } ], "chunks": [ { "rendered": true, "initial": true, "entry": true, "recorded": false, "size": 598, "sizes": { "javascript": 204, "runtime": 394 }, "names": [ "main" ], "idHints": [ ], "runtime": [ "main" ], "files": [ "bundle.js" ], "auxiliaryFiles": [ ], "hash": "81e403b1395a353906fe", "childrenByOrder": { }, "id": 179, "siblings": [ ], "parents": [ ], "children": [ ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "index": 1, "preOrderIndex": 1, "index2": 0, "postOrderIndex": 0, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "issuerName": "./src/index2.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "name": "./src/index2.js", "id": 51 } ], "failed": false, "errors": 0, "warnings": 0, "id": 85, "issuerId": 51, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "module": "./src/index2.js", "moduleName": "./src/index2.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "resolvedModule": "./src/index2.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": 51, "resolvedModuleId": 51 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "module": "./src/index2.js", "moduleName": "./src/index2.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "resolvedModule": "./src/index2.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": 51, "resolvedModuleId": 51 } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "index": 2, "preOrderIndex": 2, "index2": 1, "postOrderIndex": 1, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "issuerName": "./src/index2.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "name": "./src/index2.js", "id": 51 } ], "failed": false, "errors": 0, "warnings": 0, "id": 326, "issuerId": 51, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "module": "./src/index2.js", "moduleName": "./src/index2.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "resolvedModule": "./src/index2.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": 51, "resolvedModuleId": 51 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "module": "./src/index2.js", "moduleName": "./src/index2.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "resolvedModule": "./src/index2.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": 51, "resolvedModuleId": 51 } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "size": 62, "sizes": { "javascript": 62 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 138, "issuerId": null, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./src/index.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ "ModuleConcatenation bailout: Cannot concat with ./src/a.js because of ./src/index2.js", "ModuleConcatenation bailout: Cannot concat with ./src/b.js because of ./src/index2.js" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "name": "./src/index2.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "index": 3, "preOrderIndex": 3, "index2": 3, "postOrderIndex": 3, "size": 62, "sizes": { "javascript": 62 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 51, "issuerId": null, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./src/index2.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ "ModuleConcatenation bailout: Cannot concat with ./src/a.js because of ./src/index.js", "ModuleConcatenation bailout: Cannot concat with ./src/b.js because of ./src/index.js" ], "depth": 0 }, { "type": "module", "moduleType": "runtime", "identifier": "webpack/runtime/define property getters", "name": "webpack/runtime/define property getters", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "size": 308, "sizes": { "runtime": 308 }, "built": false, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ 179 ], "assets": [ ], "reasons": [ ], "usedExports": null, "providedExports": [ ], "optimizationBailout": [ ], "depth": null }, { "type": "module", "moduleType": "runtime", "identifier": "webpack/runtime/hasOwnProperty shorthand", "name": "webpack/runtime/hasOwnProperty shorthand", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "size": 86, "sizes": { "runtime": 86 }, "built": false, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ 179 ], "assets": [ ], "reasons": [ ], "usedExports": null, "providedExports": [ ], "optimizationBailout": [ ], "depth": null } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "./src/index.js" }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "./src/index2.js" } ] } ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "size": 62, "sizes": { "javascript": 62 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 138, "issuerId": null, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./src/index.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ "ModuleConcatenation bailout: Cannot concat with ./src/a.js because of ./src/index2.js", "ModuleConcatenation bailout: Cannot concat with ./src/b.js because of ./src/index2.js" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "name": "./src/index2.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "index": 3, "preOrderIndex": 3, "index2": 3, "postOrderIndex": 3, "size": 62, "sizes": { "javascript": 62 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 51, "issuerId": null, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./src/index2.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ "ModuleConcatenation bailout: Cannot concat with ./src/a.js because of ./src/index.js", "ModuleConcatenation bailout: Cannot concat with ./src/b.js because of ./src/index.js" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "index": 1, "preOrderIndex": 1, "index2": 0, "postOrderIndex": 0, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "issuerName": "./src/index2.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "name": "./src/index2.js", "id": 51 } ], "failed": false, "errors": 0, "warnings": 0, "id": 85, "issuerId": 51, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "module": "./src/index2.js", "moduleName": "./src/index2.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "resolvedModule": "./src/index2.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": 51, "resolvedModuleId": 51 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "module": "./src/index2.js", "moduleName": "./src/index2.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "resolvedModule": "./src/index2.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": 51, "resolvedModuleId": 51 } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "index": 2, "preOrderIndex": 2, "index2": 1, "postOrderIndex": 1, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "issuerName": "./src/index2.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "name": "./src/index2.js", "id": 51 } ], "failed": false, "errors": 0, "warnings": 0, "id": 326, "issuerId": 51, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "module": "./src/index2.js", "moduleName": "./src/index2.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "resolvedModule": "./src/index2.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": 51, "resolvedModuleId": 51 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "module": "./src/index2.js", "moduleName": "./src/index2.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index2.js", "resolvedModule": "./src/index2.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": 51, "resolvedModuleId": 51 } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "runtime", "identifier": "webpack/runtime/define property getters", "name": "webpack/runtime/define property getters", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "size": 308, "sizes": { "runtime": 308 }, "built": false, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ 179 ], "assets": [ ], "reasons": [ ], "usedExports": null, "providedExports": [ ], "optimizationBailout": [ ], "depth": null }, { "type": "module", "moduleType": "runtime", "identifier": "webpack/runtime/hasOwnProperty shorthand", "name": "webpack/runtime/hasOwnProperty shorthand", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "size": 86, "sizes": { "runtime": 86 }, "built": false, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ 179 ], "assets": [ ], "reasons": [ ], "usedExports": null, "providedExports": [ ], "optimizationBailout": [ ], "depth": null } ], "entrypoints": { "main": { "name": "main", "chunks": [ 179 ], "assets": [ { "name": "bundle.js", "size": 488 } ], "filteredAssets": 0, "assetsSize": 488, "auxiliaryAssets": [ ], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": { }, "childAssets": { }, "isOverSizeLimit": false } }, "namedChunkGroups": { "main": { "name": "main", "chunks": [ 179 ], "assets": [ { "name": "bundle.js", "size": 488 } ], "filteredAssets": 0, "assetsSize": 488, "auxiliaryAssets": [ ], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": { }, "childAssets": { }, "isOverSizeLimit": false } }, "errors": [ ], "errorsCount": 0, "warnings": [ ], "warningsCount": 0, "children": [ ] } ================================================ FILE: test/stats/webpack-5-bundle-with-single-entry/bundle.js ================================================ !function(){"use strict";var o,t,n={85:function(o,t){t.Z="module a"},326:function(o,t){t.Z="module b"}},r={};function e(o){if(r[o])return r[o].exports;var t=r[o]={exports:{}};return n[o](t,t.exports,e),t.exports}o=e(85),t=e(326),console.log(o.Z,t.Z)}(); ================================================ FILE: test/stats/webpack-5-bundle-with-single-entry/expected-chart-data.js ================================================ module.exports = [ { 'label': 'bundle.js', 'isAsset': true, 'statSize': 142, 'parsedSize': 253, 'gzipSize': 179, 'groups': [ { 'label': 'src', 'path': './src', 'statSize': 142, 'groups': [ { 'id': 85, 'label': 'a.js', 'path': './src/a.js', 'statSize': 40, 'parsedSize': 29, 'gzipSize': 49 }, { 'id': 326, 'label': 'b.js', 'path': './src/b.js', 'statSize': 40, 'parsedSize': 29, 'gzipSize': 49 }, { 'id': 138, 'label': 'index.js', 'path': './src/index.js', 'statSize': 62, 'parsedSize': 195, 'gzipSize': 159 } ], 'parsedSize': 253, 'gzipSize': 181 } ] } ]; ================================================ FILE: test/stats/webpack-5-bundle-with-single-entry/stats.json ================================================ { "hash": "a27a519140b2590a60d9", "version": "5.3.2", "time": 152, "builtAt": 1604594809350, "publicPath": "auto", "outputPath": "/Volumes/Work/webpack-bundle-analyzer/test/dist", "assetsByChunkName": { "main": [ "bundle.js" ] }, "assets": [ { "type": "asset", "name": "bundle.js", "size": 253, "chunkNames": [ "main" ], "chunkIdHints": [ ], "auxiliaryChunkNames": [ ], "auxiliaryChunkIdHints": [ ], "emitted": true, "comparedForEmit": false, "cached": false, "info": { "javascriptModule": false, "minimized": true, "size": 253 }, "related": { }, "chunks": [ 179 ], "auxiliaryChunks": [ ], "isOverSizeLimit": false } ], "chunks": [ { "rendered": true, "initial": true, "entry": true, "recorded": false, "size": 142, "sizes": { "javascript": 142 }, "names": [ "main" ], "idHints": [ ], "runtime": [ "main" ], "files": [ "bundle.js" ], "auxiliaryFiles": [ ], "hash": "27f85d7f2fb13dec2ad9", "childrenByOrder": { }, "id": 179, "siblings": [ ], "parents": [ ], "children": [ ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "index": 1, "preOrderIndex": 1, "index2": 0, "postOrderIndex": 0, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": 138 } ], "failed": false, "errors": 0, "warnings": 0, "id": 85, "issuerId": 138, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": 138, "resolvedModuleId": 138 } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "index": 2, "preOrderIndex": 2, "index2": 1, "postOrderIndex": 1, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": true, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": 138 } ], "failed": false, "errors": 0, "warnings": 0, "id": 326, "issuerId": 138, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": 138, "resolvedModuleId": 138 } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "size": 62, "sizes": { "javascript": 62 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 138, "issuerId": null, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./src/index.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ ], "depth": 0 } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "./src/index.js" } ] } ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "size": 62, "sizes": { "javascript": 62 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 138, "issuerId": null, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./src/index.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [ ], "providedExports": [ ], "optimizationBailout": [ ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "index": 1, "preOrderIndex": 1, "index2": 0, "postOrderIndex": 0, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": 138 } ], "failed": false, "errors": 0, "warnings": 0, "id": 85, "issuerId": 138, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./a", "loc": "1:0-20", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./a", "loc": "4:12-13", "moduleId": 138, "resolvedModuleId": 138 } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "nameForCondition": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "index": 2, "preOrderIndex": 2, "index2": 1, "postOrderIndex": 1, "size": 40, "sizes": { "javascript": 40 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./src/index.js", "issuerPath": [ { "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "id": 138 } ], "failed": false, "errors": 0, "warnings": 0, "id": 326, "issuerId": 138, "chunks": [ 179 ], "assets": [ ], "reasons": [ { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "./b", "loc": "2:0-20", "moduleId": 138, "resolvedModuleId": 138 }, { "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "resolvedModuleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./src/index.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "./b", "loc": "4:15-16", "moduleId": 138, "resolvedModuleId": 138 } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 1 } ], "entrypoints": { "main": { "name": "main", "chunks": [ 179 ], "assets": [ { "name": "bundle.js", "size": 253 } ], "filteredAssets": 0, "assetsSize": 253, "auxiliaryAssets": [ ], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": { }, "childAssets": { }, "isOverSizeLimit": false } }, "namedChunkGroups": { "main": { "name": "main", "chunks": [ 179 ], "assets": [ { "name": "bundle.js", "size": 253 } ], "filteredAssets": 0, "assetsSize": 253, "auxiliaryAssets": [ ], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": { }, "childAssets": { }, "isOverSizeLimit": false } }, "errors": [ ], "errorsCount": 0, "warnings": [ ], "warningsCount": 0, "children": [ ] } ================================================ FILE: test/stats/with-array-config/config-1-main.js ================================================ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){console.log("ABC")}]); ================================================ FILE: test/stats/with-array-config/config-2-main.js ================================================ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){console.log("ABC")}]); ================================================ FILE: test/stats/with-array-config/stats.json ================================================ { "errors": [], "warnings": [], "version": "4.44.2", "hash": "a30aaa779dd06e8979b1a30aaa779dd06e8979b1", "children": [ { "errors": [], "warnings": [], "hash": "a30aaa779dd06e8979b1", "time": 105, "builtAt": 1605088887042, "publicPath": "", "outputPath": "/webpack-bundle-analyzer-example/", "assetsByChunkName": { "main": "config-1-main.js" }, "assets": [ { "name": "config-1-main.js", "size": 948, "chunks": [0], "chunkNames": ["main"], "info": {}, "emitted": true } ], "filteredAssets": 0, "entrypoints": { "main": { "chunks": [0], "assets": ["config-1-main.js"], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "main": { "chunks": [0], "assets": ["config-1-main.js"], "children": {}, "childAssets": {} } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 20, "names": ["main"], "files": ["config-1-main.js"], "hash": "0e20b5164c4e5cda6fe0", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 0, "identifier": "/webpack-bundle-analyzer-example/src/index.js", "name": "./src/index.js", "index": 0, "index2": 0, "size": 20, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "profile": { "factory": 35, "building": 38 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./src/index.js", "loc": "main" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('ABC');\n" } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "./src/index.js", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/webpack-bundle-analyzer-example/src/index.js", "name": "./src/index.js", "index": 0, "index2": 0, "size": 20, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "profile": { "factory": 35, "building": 38 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./src/index.js", "loc": "main" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('ABC');\n" } ], "filteredModules": 0, "logging": { "webpack.buildChunkGraph.visitModules": { "entries": [], "filteredEntries": 2, "debug": false } }, "children": [] }, { "errors": [], "warnings": [], "hash": "a30aaa779dd06e8979b1", "time": 88, "builtAt": 1605088887043, "publicPath": "", "outputPath": "/webpack-bundle-analyzer-example/", "assetsByChunkName": { "main": "config-2-main.js" }, "assets": [ { "name": "config-2-main.js", "size": 948, "chunks": [0], "chunkNames": ["main"], "info": {}, "emitted": true } ], "filteredAssets": 0, "entrypoints": { "main": { "chunks": [0], "assets": ["config-2-main.js"], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "main": { "chunks": [0], "assets": ["config-2-main.js"], "children": {}, "childAssets": {} } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 20, "names": ["main"], "files": ["config-2-main.js"], "hash": "0e20b5164c4e5cda6fe0", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 0, "identifier": "/webpack-bundle-analyzer-example/src/index.js", "name": "./src/index.js", "index": 0, "index2": 0, "size": 20, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "profile": { "factory": 29, "building": 9 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./src/index.js", "loc": "main" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('ABC');\n" } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "./src/index.js", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/webpack-bundle-analyzer-example/src/index.js", "name": "./src/index.js", "index": 0, "index2": 0, "size": 20, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "profile": { "factory": 29, "building": 9 }, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./src/index.js", "loc": "main" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('ABC');\n" } ], "filteredModules": 0, "logging": { "webpack.buildChunkGraph.visitModules": { "entries": [], "filteredEntries": 2, "debug": false } }, "children": [] } ] } ================================================ FILE: test/stats/with-children-array.json ================================================ { "errors": [], "warnings": [], "version": "1.14.0", "hash": "4e39ab22a848116a4c15", "children": [ { "errors": [], "warnings": [], "version": "1.14.0", "hash": "4e39ab22a848116a4c15", "time": 79, "publicPath": "", "assetsByChunkName": { "bundle": "bundle.js" }, "assets": [ { "name": "bundle.js", "size": 1735, "chunks": [ 0 ], "chunkNames": [ "bundle" ], "emitted": true } ], "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "extraAsync": false, "size": 141, "names": [ "bundle" ], "files": [ "bundle.js" ], "hash": "eb0091314b5c4ca75abf", "parents": [], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "index": 0, "index2": 3, "size": 54, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": null, "profile": { "factory": 19, "building": 15 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [], "source": "require('./a');\nrequire('./b');\nrequire('./a-clone');\n" }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 8, "building": 6 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a", "loc": "1:0-14" } ], "source": "module.exports = 'module a';\n" }, { "id": 2, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "index": 2, "index2": 1, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 9, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./b", "loc": "2:0-14" } ], "source": "module.exports = 'module b';\n" }, { "id": 3, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a-clone.js", "name": "./src/a-clone.js", "index": 3, "index2": 2, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 10, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a-clone", "loc": "3:0-20" } ], "source": "module.exports = 'module a';\n" } ], "filteredModules": 0, "origins": [ { "moduleId": 0, "module": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "moduleName": "./src/index.js", "loc": "", "name": "bundle", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "index": 0, "index2": 3, "size": 54, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": null, "profile": { "factory": 19, "building": 15 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [], "source": "require('./a');\nrequire('./b');\nrequire('./a-clone');\n" }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 8, "building": 6 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a", "loc": "1:0-14" } ], "source": "module.exports = 'module a';\n" }, { "id": 2, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "index": 2, "index2": 1, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 9, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./b", "loc": "2:0-14" } ], "source": "module.exports = 'module b';\n" }, { "id": 3, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a-clone.js", "name": "./src/a-clone.js", "index": 3, "index2": 2, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 10, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a-clone", "loc": "3:0-20" } ], "source": "module.exports = 'module a';\n" } ], "filteredModules": 0, "children": [] } ] } ================================================ FILE: test/stats/with-cjs-chunk.json ================================================ { "errors": [], "warnings": [], "version": "1.14.0", "hash": "4e39ab22a848116a4c15", "children": [ { "errors": [], "warnings": [], "version": "1.14.0", "hash": "4e39ab22a848116a4c15", "time": 79, "publicPath": "", "assetsByChunkName": { "bundle": "bundle.cjs" }, "assets": [ { "name": "bundle.cjs", "size": 1735, "chunks": [0], "chunkNames": ["bundle"], "emitted": true } ], "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "extraAsync": false, "size": 141, "names": ["bundle"], "files": ["bundle.cjs"], "hash": "eb0091314b5c4ca75abf", "parents": [], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "index": 0, "index2": 3, "size": 54, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": null, "profile": { "factory": 19, "building": 15 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [], "source": "require('./a');\nrequire('./b');\nrequire('./a-clone');\n" }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 8, "building": 6 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a", "loc": "1:0-14" } ], "source": "module.exports = 'module a';\n" }, { "id": 2, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "index": 2, "index2": 1, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 9, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./b", "loc": "2:0-14" } ], "source": "module.exports = 'module b';\n" }, { "id": 3, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a-clone.js", "name": "./src/a-clone.js", "index": 3, "index2": 2, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 10, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a-clone", "loc": "3:0-20" } ], "source": "module.exports = 'module a';\n" } ], "filteredModules": 0, "origins": [ { "moduleId": 0, "module": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "moduleName": "./src/index.js", "loc": "", "name": "bundle", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "index": 0, "index2": 3, "size": 54, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": null, "profile": { "factory": 19, "building": 15 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [], "source": "require('./a');\nrequire('./b');\nrequire('./a-clone');\n" }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 8, "building": 6 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a", "loc": "1:0-14" } ], "source": "module.exports = 'module a';\n" }, { "id": 2, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "index": 2, "index2": 1, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 9, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./b", "loc": "2:0-14" } ], "source": "module.exports = 'module b';\n" }, { "id": 3, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a-clone.js", "name": "./src/a-clone.js", "index": 3, "index2": 2, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 10, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a-clone", "loc": "3:0-20" } ], "source": "module.exports = 'module a';\n" } ], "filteredModules": 0, "children": [] } ] } ================================================ FILE: test/stats/with-invalid-chunk/invalid-chunk.js ================================================ console.log('invalid chunk'); ================================================ FILE: test/stats/with-invalid-chunk/stats.json ================================================ { "errors": [], "warnings": [], "version": "4.8.3", "hash": "9deae6a8259cab8aa857", "time": 563, "builtAt": 1526827103238, "publicPath": "", "outputPath": "/Volumes/Work/webpack-bundle-analyzer/test/output", "assetsByChunkName": { "invalid": "invalid-chunk.js", "valid": "valid-chunk.js" }, "assets": [ { "name": "invalid-chunk.js", "size": 568, "chunks": [ 0 ], "chunkNames": [ "invalid" ], "emitted": true }, { "name": "valid-chunk.js", "size": 590, "chunks": [ 1 ], "chunkNames": [ "valid" ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "valid": { "chunks": [ 1 ], "assets": [ "valid-chunk.js" ], "children": {}, "childAssets": {} }, "invalid": { "chunks": [ 0 ], "assets": [ "invalid-chunk.js" ], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "valid": { "chunks": [ 1 ], "assets": [ "valid-chunk.js" ], "children": {}, "childAssets": {} }, "invalid": { "chunks": [ 0 ], "assets": [ "invalid-chunk.js" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 24, "names": [ "invalid" ], "files": [ "invalid-chunk.js" ], "hash": "8582161dc498aae7630a", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/invalid.js", "name": "./invalid.js", "index": 2, "index2": 2, "size": 24, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./invalid.js", "loc": "invalid" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('invalid');\n" } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "invalid", "request": "./invalid.js", "reasons": [] } ] }, { "id": 1, "rendered": true, "initial": true, "entry": true, "size": 70, "names": [ "valid" ], "files": [ "valid-chunk.js" ], "hash": "7c1fb8000ed732072651", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js d378c6a2195fc2426055093c3fdde76c", "name": "./valid.js + 1 modules", "index": 0, "index2": 1, "size": 70, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 1 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js", "index": 0, "index2": 1, "size": 41, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "import { a } from './a';\nconsole.log(a);\n" }, { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/a.js", "name": "./a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "issuerId": null, "issuerName": "./valid.js", "issuerPath": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony side effect evaluation", "userRequest": "./a", "loc": "1:0-24" }, { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony import specifier", "userRequest": "./a", "loc": "2:12-13" } ], "usedExports": [ "a" ], "providedExports": [ "a" ], "optimizationBailout": [], "depth": 1, "source": "export const a = 'module a';\n" } ], "filteredModules": 0 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "valid", "request": "./valid.js", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js d378c6a2195fc2426055093c3fdde76c", "name": "./valid.js + 1 modules", "index": 0, "index2": 1, "size": 70, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 1 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js", "index": 0, "index2": 1, "size": 41, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "import { a } from './a';\nconsole.log(a);\n" }, { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/a.js", "name": "./a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "issuerId": null, "issuerName": "./valid.js", "issuerPath": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony side effect evaluation", "userRequest": "./a", "loc": "1:0-24" }, { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony import specifier", "userRequest": "./a", "loc": "2:12-13" } ], "usedExports": [ "a" ], "providedExports": [ "a" ], "optimizationBailout": [], "depth": 1, "source": "export const a = 'module a';\n" } ], "filteredModules": 0 }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/invalid.js", "name": "./invalid.js", "index": 2, "index2": 2, "size": 24, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./invalid.js", "loc": "invalid" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('invalid');\n" } ], "filteredModules": 0, "children": [] } ================================================ FILE: test/stats/with-invalid-chunk/valid-chunk.js ================================================ !function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";t.r(r);console.log("module a")}]); ================================================ FILE: test/stats/with-invalid-dynamic-require.json ================================================ { "errors": [], "warnings": [ "./src/invalid-require-usage.js\n2:9-28 Critical dependency: the request of a dependency is an expression\n at CommonJsRequireContextDependency.getWarnings (/Users/th0r/.nvm/versions/node/v7.8.0/lib/node_modules/webpack/lib/dependencies/CommonJsRequireContextDependency.js:27:4)\n at Compilation.reportDependencyErrorsAndWarnings (/Users/th0r/.nvm/versions/node/v7.8.0/lib/node_modules/webpack/lib/Compilation.js:668:24)\n at Compilation.finish (/Users/th0r/.nvm/versions/node/v7.8.0/lib/node_modules/webpack/lib/Compilation.js:531:9)\n at /Users/th0r/.nvm/versions/node/v7.8.0/lib/node_modules/webpack/lib/Compiler.js:486:16\n at /Users/th0r/.nvm/versions/node/v7.8.0/lib/node_modules/webpack/node_modules/tapable/lib/Tapable.js:225:11\n at _addModuleChain (/Users/th0r/.nvm/versions/node/v7.8.0/lib/node_modules/webpack/lib/Compilation.js:477:11)\n at processModuleDependencies.err (/Users/th0r/.nvm/versions/node/v7.8.0/lib/node_modules/webpack/lib/Compilation.js:448:13)\n at _combinedTickCallback (internal/process/next_tick.js:73:7)\n at process._tickCallback (internal/process/next_tick.js:104:9)" ], "version": "2.3.3", "hash": "6f90cfe22237ea1b46c7", "time": 161, "publicPath": "", "assetsByChunkName": { "bundle": "bundle.js" }, "assets": [ { "name": "bundle.js", "size": 793, "chunks": [ 0 ], "chunkNames": [ "bundle" ], "emitted": true } ], "entrypoints": { "bundle": { "chunks": [ 0 ], "assets": [ "bundle.js" ] } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "extraAsync": false, "size": 296, "names": [ "bundle" ], "files": [ "bundle.js" ], "hash": "af2ae029ed2063f5780c", "parents": [], "origins": [ { "moduleId": 2, "module": "/Volumes/Work/webpack-bundle-analyzer/test/src/invalid-require-usage.js", "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/invalid-require-usage.js", "moduleName": "./src/invalid-require-usage.js", "loc": "", "name": "bundle", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src", "name": "./src", "index": 1, "index2": 0, "size": 160, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/invalid-require-usage.js", "issuerId": 2, "issuerName": "./src/invalid-require-usage.js", "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 2, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/invalid-require-usage.js", "module": "./src/invalid-require-usage.js", "moduleName": "./src/invalid-require-usage.js", "type": "cjs require context", "userRequest": ".", "loc": "2:9-28" } ], "usedExports": true, "providedExports": null, "depth": 1 }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "index": 2, "index2": 1, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/invalid-require-usage.js", "issuerId": 2, "issuerName": "./src/invalid-require-usage.js", "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 2, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/invalid-require-usage.js", "module": "./src/invalid-require-usage.js", "moduleName": "./src/invalid-require-usage.js", "type": "cjs require", "userRequest": "./a", "loc": "6:0-14" } ], "usedExports": true, "providedExports": null, "depth": 1, "source": "module.exports = 'module a';\n" }, { "id": 2, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/invalid-require-usage.js", "name": "./src/invalid-require-usage.js", "index": 0, "index2": 2, "size": 107, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": null, "issuerId": null, "issuerName": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [], "usedExports": true, "providedExports": null, "depth": 0, "source": "function dynamicRequire(moduleName) {\n return require(moduleName);\n}\n\ndynamicRequire('');\nrequire('./a');\n" } ], "filteredModules": 0, "children": [] } ================================================ FILE: test/stats/with-missing-chunk/stats.json ================================================ { "errors": [], "warnings": [], "version": "4.8.3", "hash": "9deae6a8259cab8aa857", "time": 563, "builtAt": 1526827103238, "publicPath": "", "outputPath": "/Volumes/Work/webpack-bundle-analyzer/test/output", "assetsByChunkName": { "invalid": "invalid-chunk.js", "valid": "valid-chunk.js" }, "assets": [ { "name": "invalid-chunk.js", "size": 568, "chunks": [ 0 ], "chunkNames": [ "invalid" ], "emitted": true }, { "name": "valid-chunk.js", "size": 590, "chunks": [ 1 ], "chunkNames": [ "valid" ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "valid": { "chunks": [ 1 ], "assets": [ "valid-chunk.js" ], "children": {}, "childAssets": {} }, "invalid": { "chunks": [ 0 ], "assets": [ "invalid-chunk.js" ], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "valid": { "chunks": [ 1 ], "assets": [ "valid-chunk.js" ], "children": {}, "childAssets": {} }, "invalid": { "chunks": [ 0 ], "assets": [ "invalid-chunk.js" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 24, "names": [ "invalid" ], "files": [ "invalid-chunk.js" ], "hash": "8582161dc498aae7630a", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/invalid.js", "name": "./invalid.js", "index": 2, "index2": 2, "size": 24, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./invalid.js", "loc": "invalid" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('invalid');\n" } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "invalid", "request": "./invalid.js", "reasons": [] } ] }, { "id": 1, "rendered": true, "initial": true, "entry": true, "size": 70, "names": [ "valid" ], "files": [ "valid-chunk.js" ], "hash": "7c1fb8000ed732072651", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js d378c6a2195fc2426055093c3fdde76c", "name": "./valid.js + 1 modules", "index": 0, "index2": 1, "size": 70, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 1 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js", "index": 0, "index2": 1, "size": 41, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "import { a } from './a';\nconsole.log(a);\n" }, { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/a.js", "name": "./a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "issuerId": null, "issuerName": "./valid.js", "issuerPath": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony side effect evaluation", "userRequest": "./a", "loc": "1:0-24" }, { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony import specifier", "userRequest": "./a", "loc": "2:12-13" } ], "usedExports": [ "a" ], "providedExports": [ "a" ], "optimizationBailout": [], "depth": 1, "source": "export const a = 'module a';\n" } ], "filteredModules": 0 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "valid", "request": "./valid.js", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js d378c6a2195fc2426055093c3fdde76c", "name": "./valid.js + 1 modules", "index": 0, "index2": 1, "size": 70, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 1 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js", "index": 0, "index2": 1, "size": 41, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "import { a } from './a';\nconsole.log(a);\n" }, { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/a.js", "name": "./a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "issuerId": null, "issuerName": "./valid.js", "issuerPath": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony side effect evaluation", "userRequest": "./a", "loc": "1:0-24" }, { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony import specifier", "userRequest": "./a", "loc": "2:12-13" } ], "usedExports": [ "a" ], "providedExports": [ "a" ], "optimizationBailout": [], "depth": 1, "source": "export const a = 'module a';\n" } ], "filteredModules": 0 }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/invalid.js", "name": "./invalid.js", "index": 2, "index2": 2, "size": 24, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./invalid.js", "loc": "invalid" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('invalid');\n" } ], "filteredModules": 0, "children": [] } ================================================ FILE: test/stats/with-missing-chunk/valid-chunk.js ================================================ !function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";t.r(r);console.log("module a")}]); ================================================ FILE: test/stats/with-missing-module-chunks/stats.json ================================================ { "errors": [], "warnings": [], "version": "4.8.3", "hash": "9deae6a8259cab8aa857", "time": 563, "builtAt": 1526827103238, "publicPath": "", "outputPath": "/Volumes/Work/webpack-bundle-analyzer/test/output", "assetsByChunkName": { "invalid": "invalid-chunk.js", "valid": "valid-chunk.js" }, "assets": [ { "name": "invalid-chunk.js", "size": 568, "chunks": [ 0 ], "chunkNames": [ "invalid" ], "emitted": true }, { "name": "valid-chunk.js", "size": 590, "chunks": [ 1 ], "chunkNames": [ "valid" ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "valid": { "chunks": [ 1 ], "assets": [ "valid-chunk.js" ], "children": {}, "childAssets": {} }, "invalid": { "chunks": [ 0 ], "assets": [ "invalid-chunk.js" ], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "valid": { "chunks": [ 1 ], "assets": [ "valid-chunk.js" ], "children": {}, "childAssets": {} }, "invalid": { "chunks": [ 0 ], "assets": [ "invalid-chunk.js" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 24, "names": [ "invalid" ], "files": [ "invalid-chunk.js" ], "hash": "8582161dc498aae7630a", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/invalid.js", "name": "./invalid.js", "index": 2, "index2": 2, "size": 24, "cacheable": true, "built": true, "optional": false, "prefetched": false, "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./invalid.js", "loc": "invalid" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('invalid');\n" } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "invalid", "request": "./invalid.js", "reasons": [] } ] }, { "id": 1, "rendered": true, "initial": true, "entry": true, "size": 70, "names": [ "valid" ], "files": [ "valid-chunk.js" ], "hash": "7c1fb8000ed732072651", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js d378c6a2195fc2426055093c3fdde76c", "name": "./valid.js + 1 modules", "index": 0, "index2": 1, "size": 70, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 1 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js", "index": 0, "index2": 1, "size": 41, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "import { a } from './a';\nconsole.log(a);\n" }, { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/a.js", "name": "./a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "issuerId": null, "issuerName": "./valid.js", "issuerPath": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony side effect evaluation", "userRequest": "./a", "loc": "1:0-24" }, { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony import specifier", "userRequest": "./a", "loc": "2:12-13" } ], "usedExports": [ "a" ], "providedExports": [ "a" ], "optimizationBailout": [], "depth": 1, "source": "export const a = 'module a';\n" } ], "filteredModules": 0 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "valid", "request": "./valid.js", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js d378c6a2195fc2426055093c3fdde76c", "name": "./valid.js + 1 modules", "index": 0, "index2": 1, "size": 70, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 1 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js", "index": 0, "index2": 1, "size": 41, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./valid.js", "loc": "valid" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "import { a } from './a';\nconsole.log(a);\n" }, { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/a.js", "name": "./a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "issuerId": null, "issuerName": "./valid.js", "issuerPath": [ { "id": null, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "name": "./valid.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony side effect evaluation", "userRequest": "./a", "loc": "1:0-24" }, { "moduleId": null, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/valid.js", "module": "./valid.js", "moduleName": "./valid.js", "type": "harmony import specifier", "userRequest": "./a", "loc": "2:12-13" } ], "usedExports": [ "a" ], "providedExports": [ "a" ], "optimizationBailout": [], "depth": 1, "source": "export const a = 'module a';\n" } ], "filteredModules": 0 }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/invalid-chunk/invalid.js", "name": "./invalid.js", "index": 2, "index2": 2, "size": 24, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./invalid.js", "loc": "invalid" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "console.log('invalid');\n" } ], "filteredModules": 0, "children": [] } ================================================ FILE: test/stats/with-missing-module-chunks/valid-chunk.js ================================================ !function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";t.r(r);console.log("module a")}]); ================================================ FILE: test/stats/with-missing-parsed-module/bundle.js ================================================ /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/static/bundles/"; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./client/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./client/App.vue": /*!************************!*\ !*** ./client/App.vue ***! \************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _App_vue_vue_type_template_id_278f674b__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./App.vue?vue&type=template&id=278f674b */ \"./client/App.vue?vue&type=template&id=278f674b\");\n/* harmony import */ var _App_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./App.vue?vue&type=script&lang=js */ \"./client/App.vue?vue&type=script&lang=js\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _App_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _App_vue_vue_type_template_id_278f674b__WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _App_vue_vue_type_template_id_278f674b__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"client/App.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./client/App.vue?"); /***/ }), /***/ "./client/App.vue?vue&type=script&lang=js": /*!************************************************!*\ !*** ./client/App.vue?vue&type=script&lang=js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../node_modules/babel-loader/lib!../node_modules/vue-loader/lib??vue-loader-options!./App.vue?vue&type=script&lang=js */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./client/App.vue?vue&type=script&lang=js\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./client/App.vue?"); /***/ }), /***/ "./client/App.vue?vue&type=template&id=278f674b": /*!******************************************************!*\ !*** ./client/App.vue?vue&type=template&id=278f674b ***! \******************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_template_id_278f674b__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../node_modules/vue-loader/lib??vue-loader-options!./App.vue?vue&type=template&id=278f674b */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./client/App.vue?vue&type=template&id=278f674b\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_template_id_278f674b__WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_template_id_278f674b__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./client/App.vue?"); /***/ }) /******/ }); ================================================ FILE: test/stats/with-missing-parsed-module/stats.json ================================================ { "errors": [], "warnings": [], "version": "4.8.2", "hash": "3c8608aea48b794f4b86", "time": 1782, "builtAt": 1526083245813, "outputPath": "/lpdb/bundles", "publicPath": "/static/bundles/", "assetsByChunkName": { "main": [ "main.bundle.1866c96b564d4c893baa.css", "bundle.js" ] }, "assets": [ { "name": "bundle.js", "size": 335046, "chunks": [ "main" ], "chunkNames": [ "main" ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "main": { "chunks": [ "main" ], "assets": [ "main.bundle.1866c96b564d4c893baa.css", "bundle.js" ], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "main": { "chunks": [ "main" ], "assets": [ "main.bundle.1866c96b564d4c893baa.css", "bundle.js" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": "main", "rendered": true, "initial": true, "entry": true, "size": 316495, "names": [ "main" ], "files": [ "main.bundle.1866c96b564d4c893baa.css", "bundle.js" ], "hash": "6ccc2c99f7fd9d84fd66", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": "./client/App.vue", "identifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "name": "./client/App.vue", "index": 9, "index2": 13, "size": 1055, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "main" ], "issuer": "/lpdb/node_modules/babel-loader/lib/index.js!/lpdb/client/index.js", "issuerId": "./client/index.js", "issuerName": "./client/index.js", "issuerPath": [ { "id": "./client/index.js", "identifier": "/lpdb/node_modules/babel-loader/lib/index.js!/lpdb/client/index.js", "name": "./client/index.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "./client/index.js", "moduleIdentifier": "/lpdb/node_modules/babel-loader/lib/index.js!/lpdb/client/index.js", "module": "./client/index.js", "moduleName": "./client/index.js", "type": "harmony side effect evaluation", "userRequest": "./App.vue", "loc": "3:0-28" }, { "moduleId": "./client/index.js", "moduleIdentifier": "/lpdb/node_modules/babel-loader/lib/index.js!/lpdb/client/index.js", "module": "./client/index.js", "moduleName": "./client/index.js", "type": "harmony import specifier", "userRequest": "./App.vue", "loc": "7:13-16" } ], "providedExports": [ "default" ], "optimizationBailout": [], "depth": 1 }, { "id": "./client/App.vue?vue&type=script&lang=js", "identifier": "/lpdb/node_modules/vue-loader/lib/loaders/pitcher.js!/lpdb/node_modules/babel-loader/lib/index.js!/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue?vue&type=script&lang=js", "name": "./client/App.vue?vue&type=script&lang=js", "index": 12, "index2": 11, "size": 438, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "main" ], "issuer": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "issuerId": "./client/App.vue", "issuerName": "./client/App.vue", "issuerPath": [ { "id": "./client/index.js", "identifier": "/lpdb/node_modules/babel-loader/lib/index.js!/lpdb/client/index.js", "name": "./client/index.js" }, { "id": "./client/App.vue", "identifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "name": "./client/App.vue" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "./client/App.vue", "moduleIdentifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "module": "./client/App.vue", "moduleName": "./client/App.vue", "type": "harmony side effect evaluation", "userRequest": "./App.vue?vue&type=script&lang=js", "loc": "2:0-54" }, { "moduleId": "./client/App.vue", "moduleIdentifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "module": "./client/App.vue", "moduleName": "./client/App.vue", "type": "harmony side effect evaluation", "userRequest": "./App.vue?vue&type=script&lang=js", "loc": "3:0-49" }, { "moduleId": "./client/App.vue", "moduleIdentifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "module": "./client/App.vue", "moduleName": "./client/App.vue", "type": "harmony export imported specifier", "userRequest": "./App.vue?vue&type=script&lang=js", "loc": "3:0-49" }, { "moduleId": "./client/App.vue", "moduleIdentifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "module": "./client/App.vue", "moduleName": "./client/App.vue", "type": "harmony import specifier", "userRequest": "./App.vue?vue&type=script&lang=js", "loc": "9:2-8" } ], "providedExports": [ "default" ], "optimizationBailout": [], "depth": 2 }, { "id": "./client/App.vue?vue&type=template&id=278f674b", "identifier": "/lpdb/node_modules/vue-loader/lib/loaders/pitcher.js!/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue?vue&type=template&id=278f674b", "name": "./client/App.vue?vue&type=template&id=278f674b", "index": 10, "index2": 9, "size": 481, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ "main" ], "issuer": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "issuerId": "./client/App.vue", "issuerName": "./client/App.vue", "issuerPath": [ { "id": "./client/index.js", "identifier": "/lpdb/node_modules/babel-loader/lib/index.js!/lpdb/client/index.js", "name": "./client/index.js" }, { "id": "./client/App.vue", "identifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "name": "./client/App.vue" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "./client/App.vue", "moduleIdentifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "module": "./client/App.vue", "moduleName": "./client/App.vue", "type": "harmony side effect evaluation", "userRequest": "./App.vue?vue&type=template&id=278f674b", "loc": "1:0-81" }, { "moduleId": "./client/App.vue", "moduleIdentifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "module": "./client/App.vue", "moduleName": "./client/App.vue", "type": "harmony import specifier", "userRequest": "./App.vue?vue&type=template&id=278f674b", "loc": "10:2-8" }, { "moduleId": "./client/App.vue", "moduleIdentifier": "/lpdb/node_modules/vue-loader/lib/index.js??vue-loader-options!/lpdb/client/App.vue", "module": "./client/App.vue", "moduleName": "./client/App.vue", "type": "harmony import specifier", "userRequest": "./App.vue?vue&type=template&id=278f674b", "loc": "11:2-17" } ], "providedExports": [ "render", "staticRenderFns" ], "optimizationBailout": [], "depth": 2 }, { "id": 0, "identifier": "css /lpdb/node_modules/css-loader/index.js!/lpdb/node_modules/bootstrap/dist/css/bootstrap-reboot.css 0", "name": "css ./node_modules/css-loader!./node_modules/bootstrap/dist/css/bootstrap-reboot.css", "index": 2, "index2": 0, "size": 4807, "built": false, "optional": false, "prefetched": false, "chunks": [ "main" ], "issuer": "/lpdb/node_modules/mini-css-extract-plugin/dist/loader.js!/lpdb/node_modules/css-loader/index.js!/lpdb/node_modules/postcss-loader/lib/index.js!/lpdb/node_modules/sass-loader/lib/loader.js!/lpdb/client/index.scss", "issuerId": "./client/index.scss", "issuerName": "./client/index.scss", "issuerPath": [ { "id": "./client/index.js", "identifier": "/lpdb/node_modules/babel-loader/lib/index.js!/lpdb/client/index.js", "name": "./client/index.js" }, { "id": "./client/index.scss", "identifier": "/lpdb/node_modules/mini-css-extract-plugin/dist/loader.js!/lpdb/node_modules/css-loader/index.js!/lpdb/node_modules/postcss-loader/lib/index.js!/lpdb/node_modules/sass-loader/lib/loader.js!/lpdb/client/index.scss", "name": "./client/index.scss" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "./client/index.scss", "moduleIdentifier": "/lpdb/node_modules/mini-css-extract-plugin/dist/loader.js!/lpdb/node_modules/css-loader/index.js!/lpdb/node_modules/postcss-loader/lib/index.js!/lpdb/node_modules/sass-loader/lib/loader.js!/lpdb/client/index.scss", "module": "./client/index.scss", "moduleName": "./client/index.scss" } ], "providedExports": null, "optimizationBailout": [], "depth": 2 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "index.js", "reasons": [] } ] } ], "filteredModules": 0, "children": [ { "errors": [], "warnings": [], "publicPath": "/static/bundles/", "outputPath": "/lpdb/bundles", "assetsByChunkName": {}, "assets": [], "filteredAssets": 0, "entrypoints": { "mini-css-extract-plugin": { "chunks": [ "mini-css-extract-plugin" ], "assets": [ "*" ], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "mini-css-extract-plugin": { "chunks": [ "mini-css-extract-plugin" ], "assets": [ "*" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": "mini-css-extract-plugin", "rendered": true, "initial": true, "entry": true, "size": 7897, "names": [ "mini-css-extract-plugin" ], "files": [ "*" ], "hash": "0a66b245ce5674406bd4", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "mini-css-extract-plugin", "request": "!!/lpdb/node_modules/css-loader/index.js!/lpdb/node_modules/postcss-loader/lib/index.js!/lpdb/node_modules/sass-loader/lib/loader.js!/lpdb/client/index.scss", "reasons": [] } ] } ], "filteredModules": 0, "children": [], "name": "mini-css-extract-plugin node_modules/css-loader/index.js!node_modules/postcss-loader/lib/index.js!node_modules/sass-loader/lib/loader.js!client/index.scss" } ] } ================================================ FILE: test/stats/with-module-concatenation-info/bundle.js ================================================ !function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";t.r(r);console.log("a1","b","c","d","e")}]); ================================================ FILE: test/stats/with-module-concatenation-info/expected-chart-data.js ================================================ module.exports = { label: 'index.js + 5 modules (concatenated)', concatenated: true, statSize: 332, parsedSize: 0, gzipSize: 0, groups: [ { inaccurateSizes: true, gzipSize: 0, id: null, label: 'index.js', parsedSize: 0, path: './index.js + 5 modules (concatenated)/index.js', statSize: 196 }, { inaccurateSizes: true, gzipSize: 0, id: null, label: 'a.js', parsedSize: 0, path: './index.js + 5 modules (concatenated)/a.js', statSize: 48 }, { label: 'modules-1', gzipSize: 0, inaccurateSizes: true, parsedSize: 0, path: './index.js + 5 modules (concatenated)/modules-1', statSize: 44, groups: [ { inaccurateSizes: true, gzipSize: 0, id: null, label: 'b.js', parsedSize: 0, path: './index.js + 5 modules (concatenated)/modules-1/b.js', statSize: 22 }, { inaccurateSizes: true, gzipSize: 0, id: null, label: 'c.js', parsedSize: 0, path: './index.js + 5 modules (concatenated)/modules-1/c.js', statSize: 22 } ] }, { label: 'modules-2', inaccurateSizes: true, gzipSize: 0, parsedSize: 0, path: './index.js + 5 modules (concatenated)/modules-2', statSize: 44, groups: [ { inaccurateSizes: true, gzipSize: 0, id: null, label: 'd.js', parsedSize: 0, path: './index.js + 5 modules (concatenated)/modules-2/d.js', statSize: 22 }, { inaccurateSizes: true, gzipSize: 0, id: null, label: 'e.js', parsedSize: 0, path: './index.js + 5 modules (concatenated)/modules-2/e.js', statSize: 22 } ] } ] }; ================================================ FILE: test/stats/with-module-concatenation-info/stats.json ================================================ { "errors": [], "warnings": [], "version": "4.0.0", "hash": "d8c858adcd390ee63793", "time": 1129, "builtAt": 1519570526379, "publicPath": "", "outputPath": "/Volumes/Work/webpack-bundle-analyzer/test/output", "assetsByChunkName": { "main": "bundle.js" }, "assets": [ { "name": "bundle.js", "size": 600, "chunks": [ 0 ], "chunkNames": [ "main" ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "main": { "chunks": [ 0 ], "assets": [ "bundle.js" ] } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 332, "names": [ "main" ], "files": [ "bundle.js" ], "hash": "007330edb8c53027cbbc", "siblings": [], "parents": [], "children": [], "modules": [ { "id": 0, "identifier": "/test/wp4/index.js e28de86a36ac92369ef12de880629ef9", "name": "./index.js + 5 modules", "index": 0, "index2": 5, "size": 332, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./index.js", "loc": "main" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js", "index": 0, "index2": 5, "size": 196, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./index.js", "loc": "main" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module", "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "import { a1 } from './a';\nimport { b } from './modules-1/b';\nimport { c } from './modules-1/c';\nimport { d } from './modules-2/d';\nimport { e } from './modules-2/e';\n\nconsole.log(a1, b, c, d, e);\n" }, { "id": null, "identifier": "/test/wp4/a.js", "name": "./a.js", "index": 1, "index2": 0, "size": 48, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./a", "loc": "1:0-25" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./a", "loc": "7:12-14" } ], "usedExports": [ "a1" ], "providedExports": [ "a1", "a2" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const a1 = 'a1';\nexport const a2 = 'a2';\n" }, { "id": null, "identifier": "/test/wp4/modules-1/b.js", "name": "./modules-1/b.js", "index": 2, "index2": 1, "size": 22, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./modules-1/b", "loc": "2:0-34" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./modules-1/b", "loc": "7:16-17" } ], "usedExports": [ "b" ], "providedExports": [ "b" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const b = 'b';\n" }, { "id": null, "identifier": "/test/wp4/modules-1/c.js", "name": "./modules-1/c.js", "index": 3, "index2": 2, "size": 22, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./modules-1/c", "loc": "3:0-34" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./modules-1/c", "loc": "7:19-20" } ], "usedExports": [ "c" ], "providedExports": [ "c" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const c = 'c';\n" }, { "id": null, "identifier": "/test/wp4/modules-2/d.js", "name": "./modules-2/d.js", "index": 4, "index2": 3, "size": 22, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./modules-2/d", "loc": "4:0-34" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./modules-2/d", "loc": "7:22-23" } ], "usedExports": [ "d" ], "providedExports": [ "d" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const d = 'd';\n" }, { "id": null, "identifier": "/test/wp4/modules-2/e.js", "name": "./modules-2/e.js", "index": 5, "index2": 4, "size": 22, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./modules-2/e", "loc": "5:0-34" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./modules-2/e", "loc": "7:25-26" } ], "usedExports": [ "e" ], "providedExports": [ "e" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const e = 'e';\n" } ], "filteredModules": 0 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "./index.js", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/test/wp4/index.js e28de86a36ac92369ef12de880629ef9", "name": "./index.js + 5 modules", "index": 0, "index2": 5, "size": 332, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./index.js", "loc": "main" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [], "depth": 0, "modules": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js", "index": 0, "index2": 5, "size": 196, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "./index.js", "loc": "main" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module", "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "import { a1 } from './a';\nimport { b } from './modules-1/b';\nimport { c } from './modules-1/c';\nimport { d } from './modules-2/d';\nimport { e } from './modules-2/e';\n\nconsole.log(a1, b, c, d, e);\n" }, { "id": null, "identifier": "/test/wp4/a.js", "name": "./a.js", "index": 1, "index2": 0, "size": 48, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./a", "loc": "1:0-25" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./a", "loc": "7:12-14" } ], "usedExports": [ "a1" ], "providedExports": [ "a1", "a2" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const a1 = 'a1';\nexport const a2 = 'a2';\n" }, { "id": null, "identifier": "/test/wp4/modules-1/b.js", "name": "./modules-1/b.js", "index": 2, "index2": 1, "size": 22, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./modules-1/b", "loc": "2:0-34" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./modules-1/b", "loc": "7:16-17" } ], "usedExports": [ "b" ], "providedExports": [ "b" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const b = 'b';\n" }, { "id": null, "identifier": "/test/wp4/modules-1/c.js", "name": "./modules-1/c.js", "index": 3, "index2": 2, "size": 22, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./modules-1/c", "loc": "3:0-34" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./modules-1/c", "loc": "7:19-20" } ], "usedExports": [ "c" ], "providedExports": [ "c" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const c = 'c';\n" }, { "id": null, "identifier": "/test/wp4/modules-2/d.js", "name": "./modules-2/d.js", "index": 4, "index2": 3, "size": 22, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./modules-2/d", "loc": "4:0-34" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./modules-2/d", "loc": "7:22-23" } ], "usedExports": [ "d" ], "providedExports": [ "d" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const d = 'd';\n" }, { "id": null, "identifier": "/test/wp4/modules-2/e.js", "name": "./modules-2/e.js", "index": 5, "index2": 4, "size": 22, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [], "assets": [], "issuer": "/test/wp4/index.js", "issuerId": null, "issuerName": "./index.js", "issuerPath": [ { "id": null, "identifier": "/test/wp4/index.js", "name": "./index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony side effect evaluation", "userRequest": "./modules-2/e", "loc": "5:0-34" }, { "moduleId": null, "moduleIdentifier": "/test/wp4/index.js", "module": "./index.js", "moduleName": "./index.js", "type": "harmony import specifier", "userRequest": "./modules-2/e", "loc": "7:25-26" } ], "usedExports": [ "e" ], "providedExports": [ "e" ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "export const e = 'e';\n" } ], "filteredModules": 0 } ], "filteredModules": 0, "children": [] } ================================================ FILE: test/stats/with-modules-chunk.json ================================================ { "errors": [], "warnings": [], "version": "1.14.0", "hash": "4e39ab22a848116a4c15", "children": [ { "errors": [], "warnings": [], "version": "1.14.0", "hash": "4e39ab22a848116a4c15", "time": 79, "publicPath": "", "assetsByChunkName": { "bundle": "bundle.mjs" }, "assets": [ { "name": "bundle.mjs", "size": 1735, "chunks": [0], "chunkNames": ["bundle"], "emitted": true } ], "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "extraAsync": false, "size": 141, "names": ["bundle"], "files": ["bundle.mjs"], "hash": "eb0091314b5c4ca75abf", "parents": [], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "index": 0, "index2": 3, "size": 54, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": null, "profile": { "factory": 19, "building": 15 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [], "source": "require('./a');\nrequire('./b');\nrequire('./a-clone');\n" }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 8, "building": 6 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a", "loc": "1:0-14" } ], "source": "module.exports = 'module a';\n" }, { "id": 2, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "index": 2, "index2": 1, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 9, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./b", "loc": "2:0-14" } ], "source": "module.exports = 'module b';\n" }, { "id": 3, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a-clone.js", "name": "./src/a-clone.js", "index": 3, "index2": 2, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 10, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a-clone", "loc": "3:0-20" } ], "source": "module.exports = 'module a';\n" } ], "filteredModules": 0, "origins": [ { "moduleId": 0, "module": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "moduleName": "./src/index.js", "loc": "", "name": "bundle", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "name": "./src/index.js", "index": 0, "index2": 3, "size": 54, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": null, "profile": { "factory": 19, "building": 15 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [], "source": "require('./a');\nrequire('./b');\nrequire('./a-clone');\n" }, { "id": 1, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a.js", "name": "./src/a.js", "index": 1, "index2": 0, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 8, "building": 6 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a", "loc": "1:0-14" } ], "source": "module.exports = 'module a';\n" }, { "id": 2, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/b.js", "name": "./src/b.js", "index": 2, "index2": 1, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 9, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./b", "loc": "2:0-14" } ], "source": "module.exports = 'module b';\n" }, { "id": 3, "identifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/a-clone.js", "name": "./src/a-clone.js", "index": 3, "index2": 2, "size": 29, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [0], "assets": [], "issuer": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "profile": { "factory": 10, "building": 5 }, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 0, "moduleIdentifier": "/Volumes/Work/webpack-bundle-analyzer/test/src/index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "cjs require", "userRequest": "./a-clone", "loc": "3:0-20" } ], "source": "module.exports = 'module a';\n" } ], "filteredModules": 0, "children": [] } ] } ================================================ FILE: test/stats/with-modules-in-chunks/expected-chart-data.js ================================================ module.exports = [ { 'label': 'runtime.6afe30102d8fe7337431.js', 'statSize': 1053, 'groups': [] }, { 'label': 'polyfills.2903ad11212d7d797800.js', 'statSize': 101, 'groups': [ { 'label': 'node_modules/core-js/modules', 'path': './node_modules/core-js/modules', 'statSize': 101, 'groups': [ { 'id': '+rLv', 'label': '_html.js', 'path': './node_modules/core-js/modules/_html.js', 'statSize': 101 } ] } ] }, { 'label': 'main.e339f68cc77f07c43589.js', 'statSize': 160, 'groups': [ { 'label': 'src', 'path': './src', 'statSize': 160, 'groups': [ { 'id': 'crnd', 'label': '$$_lazy_route_resource lazy namespace object', 'path': './src/$$_lazy_route_resource lazy namespace object', 'statSize': 160 } ] } ] } ]; ================================================ FILE: test/stats/with-modules-in-chunks/stats.json ================================================ { "errors": [], "warnings": [], "version": "4.6.0", "hash": "3e40877c6bf4ead7ce87", "publicPath": "", "outputPath": "/ng6-app", "assetsByChunkName": { "runtime": "runtime.6afe30102d8fe7337431.js", "styles": "styles.34c57ab7888ec1573f9c.css", "polyfills": "polyfills.2903ad11212d7d797800.js", "main": "main.e339f68cc77f07c43589.js" }, "assets": [ { "name": "runtime.6afe30102d8fe7337431.js", "size": 1053, "chunks": [ 0 ], "chunkNames": [ "runtime" ], "emitted": true }, { "name": "styles.34c57ab7888ec1573f9c.css", "size": 0, "chunks": [ 1 ], "chunkNames": [ "styles" ], "emitted": true }, { "name": "polyfills.2903ad11212d7d797800.js", "size": 59561, "chunks": [ 2 ], "chunkNames": [ "polyfills" ], "emitted": true }, { "name": "main.e339f68cc77f07c43589.js", "size": 152607, "chunks": [ 3 ], "chunkNames": [ "main" ], "emitted": true }, { "name": "favicon.ico", "size": 5430, "chunks": [], "chunkNames": [], "emitted": true }, { "name": "stats.json", "size": 0, "chunks": [], "chunkNames": [] }, { "name": "3rdpartylicenses.txt", "size": 2179, "chunks": [], "chunkNames": [] }, { "name": "index.html", "size": 586, "chunks": [], "chunkNames": [] } ], "filteredAssets": 0, "entrypoints": { "main": { "chunks": [ 0, 3 ], "assets": [ "runtime.6afe30102d8fe7337431.js", "main.e339f68cc77f07c43589.js" ], "children": {}, "childAssets": {} }, "polyfills": { "chunks": [ 0, 2 ], "assets": [ "runtime.6afe30102d8fe7337431.js", "polyfills.2903ad11212d7d797800.js" ], "children": {}, "childAssets": {} }, "styles": { "chunks": [ 0, 1 ], "assets": [ "runtime.6afe30102d8fe7337431.js", "styles.34c57ab7888ec1573f9c.css" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 0, "names": [ "runtime" ], "files": [ "runtime.6afe30102d8fe7337431.js" ], "hash": "6afe30102d8fe7337431", "siblings": [ 1, 2, 3 ], "parents": [], "children": [], "childrenByOrder": {}, "modules": [], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "reasons": [] }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "polyfills", "reasons": [] }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "styles", "reasons": [] } ] }, { "id": 1, "rendered": true, "initial": true, "entry": false, "size": 147, "names": [ "styles" ], "files": [ "styles.34c57ab7888ec1573f9c.css" ], "hash": "eac73a092fc2e8501030", "siblings": [ 0 ], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 0, "identifier": "css /Volumes/Work/ng6-app/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!/Volumes/Work/ng6-app/node_modules/postcss-loader/lib/index.js??extracted!/Volumes/Work/ng6-app/src/styles.css 0", "name": "css ./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/lib??extracted!./src/styles.css", "index": 148, "index2": 146, "size": 80, "built": false, "optional": false, "prefetched": false, "chunks": [ 1 ], "issuer": "/Volumes/Work/ng6-app/node_modules/mini-css-extract-plugin/dist/loader.js!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!/Volumes/Work/ng6-app/node_modules/postcss-loader/lib/index.js??extracted!/Volumes/Work/ng6-app/src/styles.css", "issuerId": "OmL/", "issuerName": "./src/styles.css", "issuerPath": [ { "id": 1, "identifier": "multi /Volumes/Work/ng6-app/src/styles.css", "name": "multi ./src/styles.css" }, { "id": "OmL/", "identifier": "/Volumes/Work/ng6-app/node_modules/mini-css-extract-plugin/dist/loader.js!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!/Volumes/Work/ng6-app/node_modules/postcss-loader/lib/index.js??extracted!/Volumes/Work/ng6-app/src/styles.css", "name": "./src/styles.css" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "OmL/", "moduleIdentifier": "/Volumes/Work/ng6-app/node_modules/mini-css-extract-plugin/dist/loader.js!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!/Volumes/Work/ng6-app/node_modules/postcss-loader/lib/index.js??extracted!/Volumes/Work/ng6-app/src/styles.css", "module": "./src/styles.css", "moduleName": "./src/styles.css" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "styles", "reasons": [] } ] }, { "id": 2, "rendered": true, "initial": true, "entry": false, "size": 183344, "names": [ "polyfills" ], "files": [ "polyfills.2903ad11212d7d797800.js" ], "hash": "2903ad11212d7d797800", "siblings": [ 0 ], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": "+rLv", "identifier": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/core-js/modules/_html.js", "name": "./node_modules/core-js/modules/_html.js", "index": 96, "index2": 88, "size": 101, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 2 ], "issuer": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/core-js/modules/_object-create.js", "issuerId": "Kuth", "issuerName": "./node_modules/core-js/modules/_object-create.js", "issuerPath": [ { "id": 2, "identifier": "multi /Volumes/Work/ng6-app/src/polyfills.ts", "name": "multi ./src/polyfills.ts" }, { "id": "hN/g", "identifier": "/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--17-0!/Volumes/Work/ng6-app/node_modules/@ngtools/webpack/src/index.js!/Volumes/Work/ng6-app/src/polyfills.ts", "name": "./src/polyfills.ts" }, { "id": "FZcq", "identifier": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/core-js/es7/reflect.js", "name": "./node_modules/core-js/es7/reflect.js" }, { "id": "uAtd", "identifier": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js", "name": "./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js" }, { "id": "T39b", "identifier": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/core-js/modules/es6.set.js", "name": "./node_modules/core-js/modules/es6.set.js" }, { "id": "wmvG", "identifier": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/core-js/modules/_collection-strong.js", "name": "./node_modules/core-js/modules/_collection-strong.js" }, { "id": "Kuth", "identifier": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/core-js/modules/_object-create.js", "name": "./node_modules/core-js/modules/_object-create.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "Kuth", "moduleIdentifier": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/core-js/modules/_object-create.js", "module": "./node_modules/core-js/modules/_object-create.js", "moduleName": "./node_modules/core-js/modules/_object-create.js", "type": "cjs require", "userRequest": "./_html", "loc": "18:2-20" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 7 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "polyfills", "reasons": [] } ] }, { "id": 3, "rendered": true, "initial": true, "entry": false, "size": 1132413, "names": [ "main" ], "files": [ "main.e339f68cc77f07c43589.js" ], "hash": "e339f68cc77f07c43589", "siblings": [ 0 ], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": "crnd", "identifier": "/Volumes/Work/ng6-app/src/$$_lazy_route_resource lazy groupOptions: {} namespace object", "name": "./src/$$_lazy_route_resource lazy namespace object", "index": 58, "index2": 53, "size": 160, "built": true, "optional": false, "prefetched": false, "chunks": [ 3 ], "issuer": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/@angular/core/fesm5/core.js", "issuerId": null, "issuerName": "./node_modules/@angular/core/fesm5/core.js", "issuerPath": [ { "id": 3, "identifier": "multi /Volumes/Work/ng6-app/src/main.ts", "name": "multi ./src/main.ts" }, { "id": null, "identifier": "/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--17-0!/Volumes/Work/ng6-app/node_modules/@ngtools/webpack/src/index.js!/Volumes/Work/ng6-app/src/main.ts", "name": "./src/main.ts" }, { "id": null, "identifier": "/Volumes/Work/ng6-app/node_modules/cache-loader/dist/cjs.js??ref--8-0!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--8-1!/Volumes/Work/ng6-app/node_modules/@angular/core/fesm5/core.js", "name": "./node_modules/@angular/core/fesm5/core.js" } ], "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": "zUnb", "moduleIdentifier": "/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--17-0!/Volumes/Work/ng6-app/node_modules/@ngtools/webpack/src/index.js!/Volumes/Work/ng6-app/src/main.ts 40d81dc475464ed670e8b87f50048d33", "module": "./src/main.ts + 58 modules", "moduleName": "./src/main.ts + 58 modules", "type": "import() context lazy", "userRequest": ".", "loc": "5518:15-36" }, { "moduleId": "zUnb", "moduleIdentifier": "/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js??ref--17-0!/Volumes/Work/ng6-app/node_modules/@ngtools/webpack/src/index.js!/Volumes/Work/ng6-app/src/main.ts 40d81dc475464ed670e8b87f50048d33", "module": "./src/main.ts + 58 modules", "moduleName": "./src/main.ts + 58 modules", "type": "import() context lazy", "userRequest": ".", "loc": "5530:15-102" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "reasons": [] } ] } ], "children": [ { "errors": [], "warnings": [], "publicPath": "", "outputPath": "/Volumes/Work/ng6-app/dist/ng6-app", "assetsByChunkName": {}, "assets": [], "filteredAssets": 0, "entrypoints": { "mini-css-extract-plugin": { "chunks": [ 0 ], "assets": [ "*" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 125, "names": [ "mini-css-extract-plugin" ], "files": [ "*" ], "hash": "86ef7ed56df014a3a96e", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": "OCjF", "identifier": "/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!/Volumes/Work/ng6-app/node_modules/postcss-loader/lib/index.js??extracted!/Volumes/Work/ng6-app/src/styles.css", "name": "./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/lib??extracted!./src/styles.css", "index": 0, "index2": 0, "size": 125, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "!!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!/Volumes/Work/ng6-app/node_modules/postcss-loader/lib/index.js??extracted!/Volumes/Work/ng6-app/src/styles.css", "loc": "mini-css-extract-plugin" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "mini-css-extract-plugin", "request": "!!/Volumes/Work/ng6-app/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!/Volumes/Work/ng6-app/node_modules/postcss-loader/lib/index.js??extracted!/Volumes/Work/ng6-app/src/styles.css", "reasons": [] } ] } ], "children": [], "name": "mini-css-extract-plugin node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!node_modules/postcss-loader/lib/index.js??extracted!src/styles.css" } ] } ================================================ FILE: test/stats/with-multiple-entrypoints/expected-chart-data.js ================================================ module.exports = [ { label: "react-vendors.js", isAsset: true, statSize: 138490, groups: [ { label: "../node_modules", path: "./../node_modules", statSize: 135827, groups: [ { label: "object-assign", path: "./../node_modules/object-assign", statSize: 2108, groups: [ { id: 320, label: "index.js", path: "./../node_modules/object-assign/index.js", statSize: 2108, }, ], parsedSize: 0, gzipSize: 0, }, { label: "react-dom", path: "./../node_modules/react-dom", statSize: 122051, groups: [ { label: "cjs", path: "./../node_modules/react-dom/cjs", statSize: 120688, groups: [ { id: 967, label: "react-dom.production.min.js", path: "./../node_modules/react-dom/cjs/react-dom.production.min.js", statSize: 120688, }, ], parsedSize: 0, gzipSize: 0, }, { id: 316, label: "index.js", path: "./../node_modules/react-dom/index.js", statSize: 1363, }, ], parsedSize: 0, gzipSize: 0, }, { label: "react", path: "./../node_modules/react", statSize: 6640, groups: [ { label: "cjs", path: "./../node_modules/react/cjs", statSize: 6450, groups: [ { id: 426, label: "react.production.min.js", path: "./../node_modules/react/cjs/react.production.min.js", statSize: 6450, }, ], parsedSize: 0, gzipSize: 0, }, { id: 784, label: "index.js", path: "./../node_modules/react/index.js", statSize: 190, }, ], parsedSize: 0, gzipSize: 0, }, { label: "scheduler", path: "./../node_modules/scheduler", statSize: 5028, groups: [ { label: "cjs", path: "./../node_modules/scheduler/cjs", statSize: 4830, groups: [ { id: 475, label: "scheduler.production.min.js", path: "./../node_modules/scheduler/cjs/scheduler.production.min.js", statSize: 4830, }, ], parsedSize: 0, gzipSize: 0, }, { id: 616, label: "index.js", path: "./../node_modules/scheduler/index.js", statSize: 198, }, ], parsedSize: 0, gzipSize: 0, }, ], parsedSize: 0, gzipSize: 0, }, { label: "node_modules/prop-types", path: "./node_modules/prop-types", statSize: 2663, groups: [ { id: 703, label: "factoryWithThrowingShims.js", path: "./node_modules/prop-types/factoryWithThrowingShims.js", statSize: 1639, }, { id: 697, label: "index.js", path: "./node_modules/prop-types/index.js", statSize: 710, }, { label: "lib", path: "./node_modules/prop-types/lib", statSize: 314, groups: [ { id: 414, label: "ReactPropTypesSecret.js", path: "./node_modules/prop-types/lib/ReactPropTypesSecret.js", statSize: 314, }, ], parsedSize: 0, gzipSize: 0, }, ], parsedSize: 0, gzipSize: 0, }, ], isInitialByEntrypoint: { "react-vendors": true, }, }, { label: "other-vendors.js", isAsset: true, statSize: 561135, groups: [ { label: "node_modules", path: "./node_modules", statSize: 560989, groups: [ { label: "isomorphic-fetch", path: "./node_modules/isomorphic-fetch", statSize: 233, groups: [ { id: 301, label: "fetch-npm-browserify.js", path: "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", statSize: 233, }, ], parsedSize: 0, gzipSize: 0, }, { label: "lodash", path: "./node_modules/lodash", statSize: 544098, groups: [ { id: 486, label: "lodash.js", path: "./node_modules/lodash/lodash.js", statSize: 544098, }, ], parsedSize: 0, gzipSize: 0, }, { label: "whatwg-fetch", path: "./node_modules/whatwg-fetch", statSize: 16658, groups: [ { id: 147, label: "fetch.js", path: "./node_modules/whatwg-fetch/fetch.js", statSize: 16658, }, ], parsedSize: 0, gzipSize: 0, }, ], parsedSize: 0, gzipSize: 0, }, { id: 830, label: "other-vendors.js", path: "./other-vendors.js", statSize: 146, }, ], isInitialByEntrypoint: { "other-vendors": true, }, }, { label: "runtime.js", isAsset: true, statSize: 3205, groups: [ ], isInitialByEntrypoint: { "react-vendors": true, "other-vendors": true, }, }, { label: "page1.js", isAsset: true, statSize: 176, groups: [ { id: 832, label: "page1.js", path: "./page1.js", statSize: 176, }, ], isInitialByEntrypoint: { page1: true, }, }, { label: "app.js", isAsset: true, statSize: 116, groups: [ { id: 389, label: "app.js", path: "./app.js", statSize: 116, }, ], isInitialByEntrypoint: { app: true, }, }, { label: "lazy_js.js", isAsset: true, statSize: 98, groups: [ { id: 401, label: "lazy.js", path: "./lazy.js", statSize: 98, }, ], isInitialByEntrypoint: { }, }, ] ================================================ FILE: test/stats/with-multiple-entrypoints/stats.json ================================================ { "hash": "063fb032f6c5983a9ddf", "version": "5.74.0", "time": 2660, "builtAt": 1660834599531, "publicPath": "auto", "outputPath": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/dist", "assetsByChunkName": { "app": [ "app.js" ], "page1": [ "page1.js" ], "react-vendors": [ "react-vendors.js" ], "other-vendors": [ "other-vendors.js" ], "runtime": [ "runtime.js" ] }, "assets": [ { "type": "asset", "name": "react-vendors.js", "size": 130522, "emitted": false, "comparedForEmit": true, "cached": false, "info": { "javascriptModule": false, "minimized": true, "related": { "license": "react-vendors.js.LICENSE.txt" }, "size": 130522 }, "chunkNames": [ "react-vendors" ], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "filteredRelated": 0, "related": [ { "type": "license", "name": "react-vendors.js.LICENSE.txt", "size": 788, "emitted": false, "comparedForEmit": true, "cached": false, "info": { "extractedComments": true, "size": 788 }, "chunkNames": [], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "related": {}, "chunks": [], "auxiliaryChunks": [], "isOverSizeLimit": false } ], "chunks": [ "react-vendors" ], "auxiliaryChunks": [], "isOverSizeLimit": false }, { "type": "asset", "name": "other-vendors.js", "size": 79779, "emitted": false, "comparedForEmit": true, "cached": false, "info": { "javascriptModule": false, "minimized": true, "related": { "license": "other-vendors.js.LICENSE.txt" }, "size": 79779 }, "chunkNames": [ "other-vendors" ], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "filteredRelated": 0, "related": [ { "type": "license", "name": "other-vendors.js.LICENSE.txt", "size": 336, "emitted": false, "comparedForEmit": true, "cached": false, "info": { "extractedComments": true, "size": 336 }, "chunkNames": [], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "related": {}, "chunks": [], "auxiliaryChunks": [], "isOverSizeLimit": false } ], "chunks": [ "other-vendors" ], "auxiliaryChunks": [], "isOverSizeLimit": false }, { "type": "asset", "name": "runtime.js", "size": 3205, "emitted": false, "comparedForEmit": true, "cached": false, "info": { "javascriptModule": false, "minimized": true, "size": 3205 }, "chunkNames": [ "runtime" ], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "related": {}, "chunks": [ "runtime" ], "auxiliaryChunks": [], "isOverSizeLimit": false }, { "type": "asset", "name": "page1.js", "size": 333, "emitted": false, "comparedForEmit": true, "cached": false, "info": { "javascriptModule": false, "minimized": true, "size": 333 }, "chunkNames": [ "page1" ], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "related": {}, "chunks": [ "page1" ], "auxiliaryChunks": [], "isOverSizeLimit": false }, { "type": "asset", "name": "app.js", "size": 274, "emitted": false, "comparedForEmit": true, "cached": false, "info": { "javascriptModule": false, "minimized": true, "size": 274 }, "chunkNames": [ "app" ], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "related": {}, "chunks": [ "app" ], "auxiliaryChunks": [], "isOverSizeLimit": false }, { "type": "asset", "name": "lazy_js.js", "size": 226, "emitted": false, "comparedForEmit": true, "cached": false, "info": { "javascriptModule": false, "minimized": true, "size": 226 }, "chunkNames": [], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "related": {}, "chunks": [ "lazy_js" ], "auxiliaryChunks": [], "isOverSizeLimit": false } ], "chunks": [ { "rendered": true, "initial": true, "entry": false, "recorded": false, "size": 116, "sizes": { "javascript": 116 }, "names": [ "app" ], "idHints": [], "runtime": [ "runtime" ], "files": [ "app.js" ], "auxiliaryFiles": [], "hash": "e1d2a5315887c375256c", "childrenByOrder": {}, "id": "app", "siblings": [], "parents": [ "other-vendors", "runtime" ], "children": [ "page1" ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 116, "sizes": { "javascript": 116 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "name": "./app.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "index": 14, "preOrderIndex": 14, "index2": 14, "postOrderIndex": 14, "cacheable": true, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 389, "issuerId": null, "chunks": [ "app" ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./app.js", "loc": "app", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 4:0-37", "ModuleConcatenation bailout: Cannot concat with ./node_modules/isomorphic-fetch/fetch-npm-browserify.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js: Module is not an ECMAScript module" ], "depth": 0 } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "app", "request": "./app.js" } ] }, { "rendered": true, "initial": false, "entry": false, "recorded": false, "size": 98, "sizes": { "javascript": 98 }, "names": [], "idHints": [], "runtime": [ "runtime" ], "files": [ "lazy_js.js" ], "auxiliaryFiles": [], "hash": "29208135d57b1902b932", "childrenByOrder": {}, "id": "lazy_js", "siblings": [], "parents": [ "page1" ], "children": [], "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 98, "sizes": { "javascript": 98 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "name": "./lazy.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "index": 16, "preOrderIndex": 16, "index2": 16, "postOrderIndex": 16, "cacheable": true, "optional": false, "orphan": false, "dependent": false, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "issuerName": "./page1.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "name": "./page1.js", "id": 832 } ], "failed": false, "errors": 0, "warnings": 0, "id": 401, "issuerId": 832, "chunks": [ "lazy_js" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "import()", "active": true, "explanation": "", "userRequest": "./lazy", "loc": "7:0-16", "moduleId": 832, "resolvedModuleId": 832 } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 4:0-31", "ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ./node_modules/prop-types/index.js: Module is not an ECMAScript module" ], "depth": 1 } ], "origins": [ { "module": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "moduleName": "./page1.js", "loc": "7:0-16", "request": "./lazy", "moduleId": 832 } ] }, { "rendered": true, "initial": true, "entry": false, "recorded": false, "size": 561135, "sizes": { "javascript": 561135 }, "names": [ "other-vendors" ], "idHints": [], "runtime": [ "runtime" ], "files": [ "other-vendors.js" ], "auxiliaryFiles": [], "hash": "42c7e47a63870103194c", "childrenByOrder": {}, "id": "other-vendors", "siblings": [ "runtime" ], "parents": [], "children": [ "app" ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 233, "sizes": { "javascript": 233 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "name": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "index": 12, "preOrderIndex": 12, "index2": 12, "postOrderIndex": 12, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "issuerName": "./app.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "name": "./app.js", "id": 389 } ], "failed": false, "errors": 0, "warnings": 0, "id": 301, "issuerId": 389, "chunks": [ "other-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "module": "./app.js", "moduleName": "./app.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "resolvedModule": "./app.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "1:0-47", "moduleId": 389, "resolvedModuleId": 389 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "module": "./app.js", "moduleName": "./app.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "resolvedModule": "./app.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "4:12-27", "moduleId": 389, "resolvedModuleId": 389 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "module": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "moduleName": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "resolvedModule": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "6:0-14", "moduleId": 301, "resolvedModuleId": 301 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "module": "./other-vendors.js", "moduleName": "./other-vendors.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "resolvedModule": "./other-vendors.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "2:0-47", "moduleId": 830, "resolvedModuleId": 830 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "module": "./other-vendors.js", "moduleName": "./other-vendors.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "resolvedModule": "./other-vendors.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "5:20-35", "moduleId": 830, "resolvedModuleId": 830 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "1:0-47", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "5:12-27", "moduleId": 832, "resolvedModuleId": 832 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 6:0-14", "Statement (ExpressionStatement) with side effects in source code at 5:0-24", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 544098, "sizes": { "javascript": 544098 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "name": "./node_modules/lodash/lodash.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "index": 11, "preOrderIndex": 11, "index2": 10, "postOrderIndex": 10, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "issuerName": "./app.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "name": "./app.js", "id": 389 } ], "failed": false, "errors": 0, "warnings": 0, "id": 486, "issuerId": 389, "chunks": [ "other-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "module": "./app.js", "moduleName": "./app.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "resolvedModule": "./app.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "lodash", "loc": "2:0-28", "moduleId": 389, "resolvedModuleId": 389 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "module": "./app.js", "moduleName": "./app.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "resolvedModule": "./app.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "lodash", "loc": "4:29-35", "moduleId": 389, "resolvedModuleId": 389 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "module": "./lazy.js", "moduleName": "./lazy.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "resolvedModule": "./lazy.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "lodash", "loc": "1:0-28", "moduleId": 401, "resolvedModuleId": 401 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "module": "./lazy.js", "moduleName": "./lazy.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "resolvedModule": "./lazy.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "lodash", "loc": "4:12-18", "moduleId": 401, "resolvedModuleId": 401 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "439:50-57", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "439:62-78", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "439:82-89", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "module decorator", "active": true, "explanation": "", "userRequest": null, "loc": "442:63-69", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "module decorator", "active": true, "explanation": "", "userRequest": null, "loc": "442:74-80", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "module decorator", "active": true, "explanation": "", "userRequest": null, "loc": "442:93-99", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "17209:7-11", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "module": "./other-vendors.js", "moduleName": "./other-vendors.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "resolvedModule": "./other-vendors.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "lodash", "loc": "1:0-28", "moduleId": 830, "resolvedModuleId": 830 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "module": "./other-vendors.js", "moduleName": "./other-vendors.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "resolvedModule": "./other-vendors.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "lodash", "loc": "5:12-18", "moduleId": 830, "resolvedModuleId": 830 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: this is used directly at 17209:7-11", "CommonJS bailout: exports is used directly at 439:50-57", "CommonJS bailout: exports is used directly at 439:82-89", "Statement (ExpressionStatement) with side effects in source code at 9:1-17209:14", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 16658, "sizes": { "javascript": 16658 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/whatwg-fetch/fetch.js", "name": "./node_modules/whatwg-fetch/fetch.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/whatwg-fetch/fetch.js", "index": 13, "preOrderIndex": 13, "index2": 11, "postOrderIndex": 11, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "issuerName": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "name": "./app.js", "id": 389 }, { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "name": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "id": 301 } ], "failed": false, "errors": 0, "warnings": 0, "id": 147, "issuerId": 301, "chunks": [ "other-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "module": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "moduleName": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "resolvedModule": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "whatwg-fetch", "loc": "5:0-23", "moduleId": 301, "resolvedModuleId": 301 } ], "usedExports": true, "providedExports": [ "DOMException", "Headers", "Request", "Response", "fetch" ], "optimizationBailout": [ "Statement (VariableDeclaration) with side effects in source code at 1:0-4:43" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 146, "sizes": { "javascript": 146 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "name": "./other-vendors.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "index": 10, "preOrderIndex": 10, "index2": 13, "postOrderIndex": 13, "cacheable": true, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 830, "issuerId": null, "chunks": [ "other-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./other-vendors", "loc": "other-vendors", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-37", "ModuleConcatenation bailout: Cannot concat with ./node_modules/isomorphic-fetch/fetch-npm-browserify.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js: Module is not an ECMAScript module" ], "depth": 0 } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "other-vendors", "request": "./other-vendors" } ] }, { "rendered": true, "initial": true, "entry": false, "recorded": false, "size": 176, "sizes": { "javascript": 176 }, "names": [ "page1" ], "idHints": [], "runtime": [ "runtime" ], "files": [ "page1.js" ], "auxiliaryFiles": [], "hash": "8c687168d86bd60e3873", "childrenByOrder": {}, "id": "page1", "siblings": [], "parents": [ "app", "react-vendors", "runtime" ], "children": [ "lazy_js" ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 176, "sizes": { "javascript": 176 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "name": "./page1.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "index": 15, "preOrderIndex": 15, "index2": 15, "postOrderIndex": 15, "cacheable": true, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 832, "issuerId": null, "chunks": [ "page1" ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./page1.js", "loc": "page1", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-46", "ModuleConcatenation bailout: Cannot concat with ./node_modules/isomorphic-fetch/fetch-npm-browserify.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ../../node_modules/react-dom/index.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ../../node_modules/react/index.js: Module is not an ECMAScript module" ], "depth": 0 } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "page1", "request": "./page1.js" } ] }, { "rendered": true, "initial": true, "entry": false, "recorded": false, "size": 138490, "sizes": { "javascript": 138490 }, "names": [ "react-vendors" ], "idHints": [], "runtime": [ "runtime" ], "files": [ "react-vendors.js" ], "auxiliaryFiles": [], "hash": "f8fdd081d0d4863891c3", "childrenByOrder": {}, "id": "react-vendors", "siblings": [ "runtime" ], "parents": [], "children": [ "page1" ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 2108, "sizes": { "javascript": 2108 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/object-assign/index.js", "name": "../../node_modules/object-assign/index.js", "nameForCondition": "/home/coder/webpack/node_modules/object-assign/index.js", "index": 2, "preOrderIndex": 2, "index2": 0, "postOrderIndex": 0, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "issuerName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "id": 316 }, { "identifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "name": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "id": 967 } ], "failed": false, "errors": 0, "warnings": 0, "id": 320, "issuerId": 967, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/object-assign/index.js", "module": "../../node_modules/object-assign/index.js", "moduleName": "../../node_modules/object-assign/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/object-assign/index.js", "resolvedModule": "../../node_modules/object-assign/index.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "65:0-14", "moduleId": 320, "resolvedModuleId": 320 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "module": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "moduleName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModule": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "object-assign", "loc": "12:39-63", "moduleId": 967, "resolvedModuleId": 967 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/react/cjs/react.production.min.js", "module": "../../node_modules/react/cjs/react.production.min.js", "moduleName": "../../node_modules/react/cjs/react.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react/cjs/react.production.min.js", "resolvedModule": "../../node_modules/react/cjs/react.production.min.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "object-assign", "loc": "9:19-43", "moduleId": 426, "resolvedModuleId": 426 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 65:0-14", "Statement (VariableDeclaration) with side effects in source code at 9:0-57", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 120688, "sizes": { "javascript": 120688 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "name": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "nameForCondition": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "index": 4, "preOrderIndex": 4, "index2": 5, "postOrderIndex": 5, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/node_modules/react-dom/index.js", "issuerName": "../../node_modules/react-dom/index.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "id": 316 } ], "failed": false, "errors": 0, "warnings": 0, "id": 967, "issuerId": 316, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/react-dom/index.js", "module": "../../node_modules/react-dom/index.js", "moduleName": "../../node_modules/react-dom/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react-dom/index.js", "resolvedModule": "../../node_modules/react-dom/index.js", "type": "cjs export require", "active": true, "explanation": "", "userRequest": "./cjs/react-dom.production.min.js", "loc": "35:2-63", "moduleId": 316, "resolvedModuleId": 316 } ], "usedExports": true, "providedExports": [ "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "createPortal", "findDOMNode", "flushSync", "hydrate", "render", "unmountComponentAtNode", "unstable_batchedUpdates", "unstable_createPortal", "unstable_renderSubtreeIntoContainer", "version" ], "optimizationBailout": [ "Statement (VariableDeclaration) with side effects in source code at 12:13-87", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 1363, "sizes": { "javascript": 1363 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "nameForCondition": "/home/coder/webpack/node_modules/react-dom/index.js", "index": 3, "preOrderIndex": 3, "index2": 6, "postOrderIndex": 6, "cacheable": true, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 316, "issuerId": null, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "react-dom", "loc": "3:0-33", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "react-dom", "loc": "5:36-44", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "react-dom", "loc": "react-vendors", "moduleId": null, "resolvedModuleId": null } ], "usedExports": true, "providedExports": [ "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "createPortal", "findDOMNode", "flushSync", "hydrate", "render", "unmountComponentAtNode", "unstable_batchedUpdates", "unstable_createPortal", "unstable_renderSubtreeIntoContainer", "version" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 34:2-13", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 6450, "sizes": { "javascript": 6450 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/react/cjs/react.production.min.js", "name": "../../node_modules/react/cjs/react.production.min.js", "nameForCondition": "/home/coder/webpack/node_modules/react/cjs/react.production.min.js", "index": 1, "preOrderIndex": 1, "index2": 1, "postOrderIndex": 1, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/node_modules/react/index.js", "issuerName": "../../node_modules/react/index.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react/index.js", "name": "../../node_modules/react/index.js", "id": 784 } ], "failed": false, "errors": 0, "warnings": 0, "id": 426, "issuerId": 784, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/react/index.js", "module": "../../node_modules/react/index.js", "moduleName": "../../node_modules/react/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react/index.js", "resolvedModule": "../../node_modules/react/index.js", "type": "cjs export require", "active": true, "explanation": "", "userRequest": "./cjs/react.production.min.js", "loc": "4:2-59", "moduleId": 784, "resolvedModuleId": 784 } ], "usedExports": true, "providedExports": [ "Children", "Component", "Fragment", "Profiler", "PureComponent", "StrictMode", "Suspense", "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "cloneElement", "createContext", "createElement", "createFactory", "createRef", "forwardRef", "isValidElement", "lazy", "memo", "useCallback", "useContext", "useDebugValue", "useEffect", "useImperativeHandle", "useLayoutEffect", "useMemo", "useReducer", "useRef", "useState", "version" ], "optimizationBailout": [ "Statement (VariableDeclaration) with side effects in source code at 9:13-60", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 190, "sizes": { "javascript": 190 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/react/index.js", "name": "../../node_modules/react/index.js", "nameForCondition": "/home/coder/webpack/node_modules/react/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 784, "issuerId": null, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "react", "loc": "2:0-26", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "react", "loc": "5:29-34", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "module": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "moduleName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModule": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "react", "loc": "12:20-36", "moduleId": 967, "resolvedModuleId": 967 }, { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "react", "loc": "react-vendors", "moduleId": null, "resolvedModuleId": null } ], "usedExports": true, "providedExports": [ "Children", "Component", "Fragment", "Profiler", "PureComponent", "StrictMode", "Suspense", "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "cloneElement", "createContext", "createElement", "createFactory", "createRef", "forwardRef", "isValidElement", "lazy", "memo", "useCallback", "useContext", "useDebugValue", "useEffect", "useImperativeHandle", "useLayoutEffect", "useMemo", "useReducer", "useRef", "useState", "version" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 4:2-60", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 4830, "sizes": { "javascript": 4830 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "name": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "nameForCondition": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "index": 6, "preOrderIndex": 6, "index2": 3, "postOrderIndex": 3, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/node_modules/scheduler/index.js", "issuerName": "../../node_modules/scheduler/index.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "id": 316 }, { "identifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "name": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "id": 967 }, { "identifier": "/home/coder/webpack/node_modules/scheduler/index.js", "name": "../../node_modules/scheduler/index.js", "id": 616 } ], "failed": false, "errors": 0, "warnings": 0, "id": 475, "issuerId": 616, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "10:121-141", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "11:504-524", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "12:312-332", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "13:15-35", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "16:106-134", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "16:248-268", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "19:56-76", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/index.js", "module": "../../node_modules/scheduler/index.js", "moduleName": "../../node_modules/scheduler/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/index.js", "resolvedModule": "../../node_modules/scheduler/index.js", "type": "cjs export require", "active": true, "explanation": "", "userRequest": "./cjs/scheduler.production.min.js", "loc": "4:2-63", "moduleId": 616, "resolvedModuleId": 616 } ], "usedExports": true, "providedExports": [ "unstable_IdlePriority", "unstable_ImmediatePriority", "unstable_LowPriority", "unstable_NormalPriority", "unstable_Profiling", "unstable_UserBlockingPriority", "unstable_cancelCallback", "unstable_continueExecution", "unstable_forceFrameRate", "unstable_getCurrentPriorityLevel", "unstable_getFirstCallbackNode", "unstable_next", "unstable_now", "unstable_pauseExecution", "unstable_requestPaint", "unstable_runWithPriority", "unstable_scheduleCallback", "unstable_shouldYield", "unstable_wrapCallback" ], "optimizationBailout": [ "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 10:121-141", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 11:504-524", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 12:312-332", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 13:15-35", "CommonJS bailout: exports.unstable_shouldYield(...) prevents optimization as exports is passed as call context at 16:106-134", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 16:248-268", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 19:56-76", "Statement (IfStatement) with side effects in source code at 9:25-238", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 198, "sizes": { "javascript": 198 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/scheduler/index.js", "name": "../../node_modules/scheduler/index.js", "nameForCondition": "/home/coder/webpack/node_modules/scheduler/index.js", "index": 5, "preOrderIndex": 5, "index2": 4, "postOrderIndex": 4, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "issuerName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "id": 316 }, { "identifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "name": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "id": 967 } ], "failed": false, "errors": 0, "warnings": 0, "id": 616, "issuerId": 967, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "module": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "moduleName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModule": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "scheduler", "loc": "12:66-86", "moduleId": 967, "resolvedModuleId": 967 } ], "usedExports": true, "providedExports": [ "unstable_IdlePriority", "unstable_ImmediatePriority", "unstable_LowPriority", "unstable_NormalPriority", "unstable_Profiling", "unstable_UserBlockingPriority", "unstable_cancelCallback", "unstable_continueExecution", "unstable_forceFrameRate", "unstable_getCurrentPriorityLevel", "unstable_getFirstCallbackNode", "unstable_next", "unstable_now", "unstable_pauseExecution", "unstable_requestPaint", "unstable_runWithPriority", "unstable_scheduleCallback", "unstable_shouldYield", "unstable_wrapCallback" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 4:2-64", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 1639, "sizes": { "javascript": 1639 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "name": "./node_modules/prop-types/factoryWithThrowingShims.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "index": 8, "preOrderIndex": 8, "index2": 8, "postOrderIndex": 8, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "issuerName": "./node_modules/prop-types/index.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "name": "./node_modules/prop-types/index.js", "id": 697 } ], "failed": false, "errors": 0, "warnings": 0, "id": 703, "issuerId": 697, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "module": "./node_modules/prop-types/factoryWithThrowingShims.js", "moduleName": "./node_modules/prop-types/factoryWithThrowingShims.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "resolvedModule": "./node_modules/prop-types/factoryWithThrowingShims.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "16:0-14", "moduleId": 703, "resolvedModuleId": 703 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "module": "./node_modules/prop-types/index.js", "moduleName": "./node_modules/prop-types/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "resolvedModule": "./node_modules/prop-types/index.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "./factoryWithThrowingShims", "loc": "18:19-56", "moduleId": 697, "resolvedModuleId": 697 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 16:0-14", "Statement (VariableDeclaration) with side effects in source code at 10:0-65", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 710, "sizes": { "javascript": 710 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "name": "./node_modules/prop-types/index.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "index": 7, "preOrderIndex": 7, "index2": 9, "postOrderIndex": 9, "cacheable": true, "optional": false, "orphan": false, "dependent": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 697, "issuerId": null, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "module": "./lazy.js", "moduleName": "./lazy.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "resolvedModule": "./lazy.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "prop-types", "loc": "2:0-35", "moduleId": 401, "resolvedModuleId": 401 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "module": "./lazy.js", "moduleName": "./lazy.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "resolvedModule": "./lazy.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "prop-types", "loc": "4:20-29", "moduleId": 401, "resolvedModuleId": 401 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "module": "./node_modules/prop-types/index.js", "moduleName": "./node_modules/prop-types/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "resolvedModule": "./node_modules/prop-types/index.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "18:2-16", "moduleId": 697, "resolvedModuleId": 697 }, { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "prop-types", "loc": "react-vendors", "moduleId": null, "resolvedModuleId": null } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 18:2-16", "Statement (ExpressionStatement) with side effects in source code at 18:2-59", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 314, "sizes": { "javascript": 314 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/lib/ReactPropTypesSecret.js", "name": "./node_modules/prop-types/lib/ReactPropTypesSecret.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/lib/ReactPropTypesSecret.js", "index": 9, "preOrderIndex": 9, "index2": 7, "postOrderIndex": 7, "cacheable": true, "optional": false, "orphan": false, "dependent": true, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "issuerName": "./node_modules/prop-types/factoryWithThrowingShims.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "name": "./node_modules/prop-types/index.js", "id": 697 }, { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "name": "./node_modules/prop-types/factoryWithThrowingShims.js", "id": 703 } ], "failed": false, "errors": 0, "warnings": 0, "id": 414, "issuerId": 703, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "module": "./node_modules/prop-types/factoryWithThrowingShims.js", "moduleName": "./node_modules/prop-types/factoryWithThrowingShims.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "resolvedModule": "./node_modules/prop-types/factoryWithThrowingShims.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "./lib/ReactPropTypesSecret", "loc": "10:27-64", "moduleId": 703, "resolvedModuleId": 703 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/lib/ReactPropTypesSecret.js", "module": "./node_modules/prop-types/lib/ReactPropTypesSecret.js", "moduleName": "./node_modules/prop-types/lib/ReactPropTypesSecret.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/lib/ReactPropTypesSecret.js", "resolvedModule": "./node_modules/prop-types/lib/ReactPropTypesSecret.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "12:0-14", "moduleId": 414, "resolvedModuleId": 414 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 12:0-14", "Statement (ExpressionStatement) with side effects in source code at 12:0-38", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2 } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "react-vendors", "request": "prop-types" }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "react-vendors", "request": "react" }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "react-vendors", "request": "react-dom" } ] }, { "rendered": true, "initial": true, "entry": true, "recorded": false, "size": 8284, "sizes": { "runtime": 8284 }, "names": [ "runtime" ], "idHints": [], "runtime": [ "runtime" ], "files": [ "runtime.js" ], "auxiliaryFiles": [], "hash": "f56bf390b59d43c091e4", "childrenByOrder": {}, "id": "runtime", "siblings": [ "other-vendors", "react-vendors" ], "parents": [], "children": [ "app", "page1" ], "modules": [ { "type": "module", "moduleType": "runtime", "layer": null, "size": 886, "sizes": { "runtime": 886 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/chunk loaded", "name": "webpack/runtime/chunk loaded", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 267, "sizes": { "runtime": 267 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/compat get default export", "name": "webpack/runtime/compat get default export", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 308, "sizes": { "runtime": 308 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/define property getters", "name": "webpack/runtime/define property getters", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 326, "sizes": { "runtime": 326 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/ensure chunk", "name": "webpack/runtime/ensure chunk", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 167, "sizes": { "runtime": 167 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/get javascript chunk filename", "name": "webpack/runtime/get javascript chunk filename", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 221, "sizes": { "runtime": 221 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/global", "name": "webpack/runtime/global", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 88, "sizes": { "runtime": 88 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/hasOwnProperty shorthand", "name": "webpack/runtime/hasOwnProperty shorthand", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 3227, "sizes": { "runtime": 3227 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/jsonp chunk loading", "name": "webpack/runtime/jsonp chunk loading", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 1530, "sizes": { "runtime": 1530 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/load script", "name": "webpack/runtime/load script", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 274, "sizes": { "runtime": 274 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/make namespace object", "name": "webpack/runtime/make namespace object", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 123, "sizes": { "runtime": 123 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/node module decorator", "name": "webpack/runtime/node module decorator", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 867, "sizes": { "runtime": 867 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/publicPath", "name": "webpack/runtime/publicPath", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "dependent": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null } ], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "other-vendors", "request": "./other-vendors" }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "react-vendors", "request": "prop-types" }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "react-vendors", "request": "react" }, { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "react-vendors", "request": "react-dom" } ] } ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 190, "sizes": { "javascript": 190 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/react/index.js", "name": "../../node_modules/react/index.js", "nameForCondition": "/home/coder/webpack/node_modules/react/index.js", "index": 0, "preOrderIndex": 0, "index2": 2, "postOrderIndex": 2, "cacheable": true, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 784, "issuerId": null, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "react", "loc": "2:0-26", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "react", "loc": "5:29-34", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "module": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "moduleName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModule": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "react", "loc": "12:20-36", "moduleId": 967, "resolvedModuleId": 967 }, { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "react", "loc": "react-vendors", "moduleId": null, "resolvedModuleId": null } ], "usedExports": true, "providedExports": [ "Children", "Component", "Fragment", "Profiler", "PureComponent", "StrictMode", "Suspense", "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "cloneElement", "createContext", "createElement", "createFactory", "createRef", "forwardRef", "isValidElement", "lazy", "memo", "useCallback", "useContext", "useDebugValue", "useEffect", "useImperativeHandle", "useLayoutEffect", "useMemo", "useReducer", "useRef", "useState", "version" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 4:2-60", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 1363, "sizes": { "javascript": 1363 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "nameForCondition": "/home/coder/webpack/node_modules/react-dom/index.js", "index": 3, "preOrderIndex": 3, "index2": 6, "postOrderIndex": 6, "cacheable": true, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 316, "issuerId": null, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "react-dom", "loc": "3:0-33", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "react-dom", "loc": "5:36-44", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "react-dom", "loc": "react-vendors", "moduleId": null, "resolvedModuleId": null } ], "usedExports": true, "providedExports": [ "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "createPortal", "findDOMNode", "flushSync", "hydrate", "render", "unmountComponentAtNode", "unstable_batchedUpdates", "unstable_createPortal", "unstable_renderSubtreeIntoContainer", "version" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 34:2-13", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 710, "sizes": { "javascript": 710 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "name": "./node_modules/prop-types/index.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "index": 7, "preOrderIndex": 7, "index2": 9, "postOrderIndex": 9, "cacheable": true, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 697, "issuerId": null, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "module": "./lazy.js", "moduleName": "./lazy.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "resolvedModule": "./lazy.js", "type": "harmony side effect evaluation", "active": false, "explanation": "", "userRequest": "prop-types", "loc": "2:0-35", "moduleId": 401, "resolvedModuleId": 401 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "module": "./lazy.js", "moduleName": "./lazy.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "resolvedModule": "./lazy.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "prop-types", "loc": "4:20-29", "moduleId": 401, "resolvedModuleId": 401 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "module": "./node_modules/prop-types/index.js", "moduleName": "./node_modules/prop-types/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "resolvedModule": "./node_modules/prop-types/index.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "18:2-16", "moduleId": 697, "resolvedModuleId": 697 }, { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "prop-types", "loc": "react-vendors", "moduleId": null, "resolvedModuleId": null } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 18:2-16", "Statement (ExpressionStatement) with side effects in source code at 18:2-59", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 146, "sizes": { "javascript": 146 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "name": "./other-vendors.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "index": 10, "preOrderIndex": 10, "index2": 13, "postOrderIndex": 13, "cacheable": true, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 830, "issuerId": null, "chunks": [ "other-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./other-vendors", "loc": "other-vendors", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-37", "ModuleConcatenation bailout: Cannot concat with ./node_modules/isomorphic-fetch/fetch-npm-browserify.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 116, "sizes": { "javascript": 116 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "name": "./app.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "index": 14, "preOrderIndex": 14, "index2": 14, "postOrderIndex": 14, "cacheable": true, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 389, "issuerId": null, "chunks": [ "app" ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./app.js", "loc": "app", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 4:0-37", "ModuleConcatenation bailout: Cannot concat with ./node_modules/isomorphic-fetch/fetch-npm-browserify.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 176, "sizes": { "javascript": 176 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "name": "./page1.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "index": 15, "preOrderIndex": 15, "index2": 15, "postOrderIndex": 15, "cacheable": true, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "id": 832, "issuerId": null, "chunks": [ "page1" ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "./page1.js", "loc": "page1", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": [], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 5:0-46", "ModuleConcatenation bailout: Cannot concat with ./node_modules/isomorphic-fetch/fetch-npm-browserify.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ../../node_modules/react-dom/index.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ../../node_modules/react/index.js: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 6450, "sizes": { "javascript": 6450 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/react/cjs/react.production.min.js", "name": "../../node_modules/react/cjs/react.production.min.js", "nameForCondition": "/home/coder/webpack/node_modules/react/cjs/react.production.min.js", "index": 1, "preOrderIndex": 1, "index2": 1, "postOrderIndex": 1, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/node_modules/react/index.js", "issuerName": "../../node_modules/react/index.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react/index.js", "name": "../../node_modules/react/index.js", "id": 784 } ], "failed": false, "errors": 0, "warnings": 0, "id": 426, "issuerId": 784, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/react/index.js", "module": "../../node_modules/react/index.js", "moduleName": "../../node_modules/react/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react/index.js", "resolvedModule": "../../node_modules/react/index.js", "type": "cjs export require", "active": true, "explanation": "", "userRequest": "./cjs/react.production.min.js", "loc": "4:2-59", "moduleId": 784, "resolvedModuleId": 784 } ], "usedExports": true, "providedExports": [ "Children", "Component", "Fragment", "Profiler", "PureComponent", "StrictMode", "Suspense", "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "cloneElement", "createContext", "createElement", "createFactory", "createRef", "forwardRef", "isValidElement", "lazy", "memo", "useCallback", "useContext", "useDebugValue", "useEffect", "useImperativeHandle", "useLayoutEffect", "useMemo", "useReducer", "useRef", "useState", "version" ], "optimizationBailout": [ "Statement (VariableDeclaration) with side effects in source code at 9:13-60", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 120688, "sizes": { "javascript": 120688 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "name": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "nameForCondition": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "index": 4, "preOrderIndex": 4, "index2": 5, "postOrderIndex": 5, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/node_modules/react-dom/index.js", "issuerName": "../../node_modules/react-dom/index.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "id": 316 } ], "failed": false, "errors": 0, "warnings": 0, "id": 967, "issuerId": 316, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/react-dom/index.js", "module": "../../node_modules/react-dom/index.js", "moduleName": "../../node_modules/react-dom/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react-dom/index.js", "resolvedModule": "../../node_modules/react-dom/index.js", "type": "cjs export require", "active": true, "explanation": "", "userRequest": "./cjs/react-dom.production.min.js", "loc": "35:2-63", "moduleId": 316, "resolvedModuleId": 316 } ], "usedExports": true, "providedExports": [ "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "createPortal", "findDOMNode", "flushSync", "hydrate", "render", "unmountComponentAtNode", "unstable_batchedUpdates", "unstable_createPortal", "unstable_renderSubtreeIntoContainer", "version" ], "optimizationBailout": [ "Statement (VariableDeclaration) with side effects in source code at 12:13-87", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 1639, "sizes": { "javascript": 1639 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "name": "./node_modules/prop-types/factoryWithThrowingShims.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "index": 8, "preOrderIndex": 8, "index2": 8, "postOrderIndex": 8, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "issuerName": "./node_modules/prop-types/index.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "name": "./node_modules/prop-types/index.js", "id": 697 } ], "failed": false, "errors": 0, "warnings": 0, "id": 703, "issuerId": 697, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "module": "./node_modules/prop-types/factoryWithThrowingShims.js", "moduleName": "./node_modules/prop-types/factoryWithThrowingShims.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "resolvedModule": "./node_modules/prop-types/factoryWithThrowingShims.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "16:0-14", "moduleId": 703, "resolvedModuleId": 703 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "module": "./node_modules/prop-types/index.js", "moduleName": "./node_modules/prop-types/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "resolvedModule": "./node_modules/prop-types/index.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "./factoryWithThrowingShims", "loc": "18:19-56", "moduleId": 697, "resolvedModuleId": 697 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 16:0-14", "Statement (VariableDeclaration) with side effects in source code at 10:0-65", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 544098, "sizes": { "javascript": 544098 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "name": "./node_modules/lodash/lodash.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "index": 11, "preOrderIndex": 11, "index2": 10, "postOrderIndex": 10, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "issuerName": "./app.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "name": "./app.js", "id": 389 } ], "failed": false, "errors": 0, "warnings": 0, "id": 486, "issuerId": 389, "chunks": [ "other-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "module": "./app.js", "moduleName": "./app.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "resolvedModule": "./app.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "lodash", "loc": "2:0-28", "moduleId": 389, "resolvedModuleId": 389 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "module": "./app.js", "moduleName": "./app.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "resolvedModule": "./app.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "lodash", "loc": "4:29-35", "moduleId": 389, "resolvedModuleId": 389 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "module": "./lazy.js", "moduleName": "./lazy.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "resolvedModule": "./lazy.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "lodash", "loc": "1:0-28", "moduleId": 401, "resolvedModuleId": 401 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "module": "./lazy.js", "moduleName": "./lazy.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "resolvedModule": "./lazy.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "lodash", "loc": "4:12-18", "moduleId": 401, "resolvedModuleId": 401 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "439:50-57", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "439:62-78", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "439:82-89", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "module decorator", "active": true, "explanation": "", "userRequest": null, "loc": "442:63-69", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "module decorator", "active": true, "explanation": "", "userRequest": null, "loc": "442:74-80", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "module decorator", "active": true, "explanation": "", "userRequest": null, "loc": "442:93-99", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/lodash/lodash.js", "resolvedModule": "./node_modules/lodash/lodash.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "17209:7-11", "moduleId": 486, "resolvedModuleId": 486 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "module": "./other-vendors.js", "moduleName": "./other-vendors.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "resolvedModule": "./other-vendors.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "lodash", "loc": "1:0-28", "moduleId": 830, "resolvedModuleId": 830 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "module": "./other-vendors.js", "moduleName": "./other-vendors.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "resolvedModule": "./other-vendors.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "lodash", "loc": "5:12-18", "moduleId": 830, "resolvedModuleId": 830 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: this is used directly at 17209:7-11", "CommonJS bailout: exports is used directly at 439:50-57", "CommonJS bailout: exports is used directly at 439:82-89", "Statement (ExpressionStatement) with side effects in source code at 9:1-17209:14", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 233, "sizes": { "javascript": 233 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "name": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "index": 12, "preOrderIndex": 12, "index2": 12, "postOrderIndex": 12, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "issuerName": "./app.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "name": "./app.js", "id": 389 } ], "failed": false, "errors": 0, "warnings": 0, "id": 301, "issuerId": 389, "chunks": [ "other-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "module": "./app.js", "moduleName": "./app.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "resolvedModule": "./app.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "1:0-47", "moduleId": 389, "resolvedModuleId": 389 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "module": "./app.js", "moduleName": "./app.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "resolvedModule": "./app.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "4:12-27", "moduleId": 389, "resolvedModuleId": 389 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "module": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "moduleName": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "resolvedModule": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "6:0-14", "moduleId": 301, "resolvedModuleId": 301 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "module": "./other-vendors.js", "moduleName": "./other-vendors.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "resolvedModule": "./other-vendors.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "2:0-47", "moduleId": 830, "resolvedModuleId": 830 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "module": "./other-vendors.js", "moduleName": "./other-vendors.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/other-vendors.js", "resolvedModule": "./other-vendors.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "5:20-35", "moduleId": 830, "resolvedModuleId": 830 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony side effect evaluation", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "1:0-47", "moduleId": 832, "resolvedModuleId": 832 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "harmony import specifier", "active": true, "explanation": "", "userRequest": "isomorphic-fetch", "loc": "5:12-27", "moduleId": 832, "resolvedModuleId": 832 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 6:0-14", "Statement (ExpressionStatement) with side effects in source code at 5:0-24", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 98, "sizes": { "javascript": 98 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "name": "./lazy.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/lazy.js", "index": 16, "preOrderIndex": 16, "index2": 16, "postOrderIndex": 16, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "issuerName": "./page1.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "name": "./page1.js", "id": 832 } ], "failed": false, "errors": 0, "warnings": 0, "id": 401, "issuerId": 832, "chunks": [ "lazy_js" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "module": "./page1.js", "moduleName": "./page1.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/page1.js", "resolvedModule": "./page1.js", "type": "import()", "active": true, "explanation": "", "userRequest": "./lazy", "loc": "7:0-16", "moduleId": 832, "resolvedModuleId": 832 } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 4:0-31", "ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js: Module is not an ECMAScript module", "ModuleConcatenation bailout: Cannot concat with ./node_modules/prop-types/index.js: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 2108, "sizes": { "javascript": 2108 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/object-assign/index.js", "name": "../../node_modules/object-assign/index.js", "nameForCondition": "/home/coder/webpack/node_modules/object-assign/index.js", "index": 2, "preOrderIndex": 2, "index2": 0, "postOrderIndex": 0, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "issuerName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "id": 316 }, { "identifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "name": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "id": 967 } ], "failed": false, "errors": 0, "warnings": 0, "id": 320, "issuerId": 967, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/object-assign/index.js", "module": "../../node_modules/object-assign/index.js", "moduleName": "../../node_modules/object-assign/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/object-assign/index.js", "resolvedModule": "../../node_modules/object-assign/index.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "65:0-14", "moduleId": 320, "resolvedModuleId": 320 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "module": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "moduleName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModule": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "object-assign", "loc": "12:39-63", "moduleId": 967, "resolvedModuleId": 967 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/react/cjs/react.production.min.js", "module": "../../node_modules/react/cjs/react.production.min.js", "moduleName": "../../node_modules/react/cjs/react.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react/cjs/react.production.min.js", "resolvedModule": "../../node_modules/react/cjs/react.production.min.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "object-assign", "loc": "9:19-43", "moduleId": 426, "resolvedModuleId": 426 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 65:0-14", "Statement (VariableDeclaration) with side effects in source code at 9:0-57", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 198, "sizes": { "javascript": 198 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/scheduler/index.js", "name": "../../node_modules/scheduler/index.js", "nameForCondition": "/home/coder/webpack/node_modules/scheduler/index.js", "index": 5, "preOrderIndex": 5, "index2": 4, "postOrderIndex": 4, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "issuerName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "id": 316 }, { "identifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "name": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "id": 967 } ], "failed": false, "errors": 0, "warnings": 0, "id": 616, "issuerId": 967, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "module": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "moduleName": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "resolvedModule": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "scheduler", "loc": "12:66-86", "moduleId": 967, "resolvedModuleId": 967 } ], "usedExports": true, "providedExports": [ "unstable_IdlePriority", "unstable_ImmediatePriority", "unstable_LowPriority", "unstable_NormalPriority", "unstable_Profiling", "unstable_UserBlockingPriority", "unstable_cancelCallback", "unstable_continueExecution", "unstable_forceFrameRate", "unstable_getCurrentPriorityLevel", "unstable_getFirstCallbackNode", "unstable_next", "unstable_now", "unstable_pauseExecution", "unstable_requestPaint", "unstable_runWithPriority", "unstable_scheduleCallback", "unstable_shouldYield", "unstable_wrapCallback" ], "optimizationBailout": [ "Statement (ExpressionStatement) with side effects in source code at 4:2-64", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 314, "sizes": { "javascript": 314 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/lib/ReactPropTypesSecret.js", "name": "./node_modules/prop-types/lib/ReactPropTypesSecret.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/lib/ReactPropTypesSecret.js", "index": 9, "preOrderIndex": 9, "index2": 7, "postOrderIndex": 7, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "issuerName": "./node_modules/prop-types/factoryWithThrowingShims.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/index.js", "name": "./node_modules/prop-types/index.js", "id": 697 }, { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "name": "./node_modules/prop-types/factoryWithThrowingShims.js", "id": 703 } ], "failed": false, "errors": 0, "warnings": 0, "id": 414, "issuerId": 703, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "module": "./node_modules/prop-types/factoryWithThrowingShims.js", "moduleName": "./node_modules/prop-types/factoryWithThrowingShims.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/factoryWithThrowingShims.js", "resolvedModule": "./node_modules/prop-types/factoryWithThrowingShims.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "./lib/ReactPropTypesSecret", "loc": "10:27-64", "moduleId": 703, "resolvedModuleId": 703 }, { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/lib/ReactPropTypesSecret.js", "module": "./node_modules/prop-types/lib/ReactPropTypesSecret.js", "moduleName": "./node_modules/prop-types/lib/ReactPropTypesSecret.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/prop-types/lib/ReactPropTypesSecret.js", "resolvedModule": "./node_modules/prop-types/lib/ReactPropTypesSecret.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "12:0-14", "moduleId": 414, "resolvedModuleId": 414 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 12:0-14", "Statement (ExpressionStatement) with side effects in source code at 12:0-38", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 16658, "sizes": { "javascript": 16658 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/whatwg-fetch/fetch.js", "name": "./node_modules/whatwg-fetch/fetch.js", "nameForCondition": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/whatwg-fetch/fetch.js", "index": 13, "preOrderIndex": 13, "index2": 11, "postOrderIndex": 11, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "issuerName": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "issuerPath": [ { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/app.js", "name": "./app.js", "id": 389 }, { "identifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "name": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "id": 301 } ], "failed": false, "errors": 0, "warnings": 0, "id": 147, "issuerId": 301, "chunks": [ "other-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "module": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "moduleName": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "resolvedModuleIdentifier": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch/fetch-npm-browserify.js", "resolvedModule": "./node_modules/isomorphic-fetch/fetch-npm-browserify.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "whatwg-fetch", "loc": "5:0-23", "moduleId": 301, "resolvedModuleId": 301 } ], "usedExports": true, "providedExports": [ "DOMException", "Headers", "Request", "Response", "fetch" ], "optimizationBailout": [ "Statement (VariableDeclaration) with side effects in source code at 1:0-4:43" ], "depth": 2 }, { "type": "module", "moduleType": "javascript/auto", "layer": null, "size": 4830, "sizes": { "javascript": 4830 }, "built": true, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "name": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "nameForCondition": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "index": 6, "preOrderIndex": 6, "index2": 3, "postOrderIndex": 3, "cacheable": true, "optional": false, "orphan": false, "issuer": "/home/coder/webpack/node_modules/scheduler/index.js", "issuerName": "../../node_modules/scheduler/index.js", "issuerPath": [ { "identifier": "/home/coder/webpack/node_modules/react-dom/index.js", "name": "../../node_modules/react-dom/index.js", "id": 316 }, { "identifier": "/home/coder/webpack/node_modules/react-dom/cjs/react-dom.production.min.js", "name": "../../node_modules/react-dom/cjs/react-dom.production.min.js", "id": 967 }, { "identifier": "/home/coder/webpack/node_modules/scheduler/index.js", "name": "../../node_modules/scheduler/index.js", "id": 616 } ], "failed": false, "errors": 0, "warnings": 0, "id": 475, "issuerId": 616, "chunks": [ "react-vendors" ], "assets": [], "reasons": [ { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "10:121-141", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "11:504-524", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "12:312-332", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "13:15-35", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "16:106-134", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "16:248-268", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "module": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "moduleName": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/cjs/scheduler.production.min.js", "resolvedModule": "../../node_modules/scheduler/cjs/scheduler.production.min.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "19:56-76", "moduleId": 475, "resolvedModuleId": 475 }, { "moduleIdentifier": "/home/coder/webpack/node_modules/scheduler/index.js", "module": "../../node_modules/scheduler/index.js", "moduleName": "../../node_modules/scheduler/index.js", "resolvedModuleIdentifier": "/home/coder/webpack/node_modules/scheduler/index.js", "resolvedModule": "../../node_modules/scheduler/index.js", "type": "cjs export require", "active": true, "explanation": "", "userRequest": "./cjs/scheduler.production.min.js", "loc": "4:2-63", "moduleId": 616, "resolvedModuleId": 616 } ], "usedExports": true, "providedExports": [ "unstable_IdlePriority", "unstable_ImmediatePriority", "unstable_LowPriority", "unstable_NormalPriority", "unstable_Profiling", "unstable_UserBlockingPriority", "unstable_cancelCallback", "unstable_continueExecution", "unstable_forceFrameRate", "unstable_getCurrentPriorityLevel", "unstable_getFirstCallbackNode", "unstable_next", "unstable_now", "unstable_pauseExecution", "unstable_requestPaint", "unstable_runWithPriority", "unstable_scheduleCallback", "unstable_shouldYield", "unstable_wrapCallback" ], "optimizationBailout": [ "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 10:121-141", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 11:504-524", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 12:312-332", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 13:15-35", "CommonJS bailout: exports.unstable_shouldYield(...) prevents optimization as exports is passed as call context at 16:106-134", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 16:248-268", "CommonJS bailout: exports.unstable_now(...) prevents optimization as exports is passed as call context at 19:56-76", "Statement (IfStatement) with side effects in source code at 9:25-238", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 3 }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 886, "sizes": { "runtime": 886 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/chunk loaded", "name": "webpack/runtime/chunk loaded", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 267, "sizes": { "runtime": 267 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/compat get default export", "name": "webpack/runtime/compat get default export", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 308, "sizes": { "runtime": 308 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/define property getters", "name": "webpack/runtime/define property getters", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 326, "sizes": { "runtime": 326 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/ensure chunk", "name": "webpack/runtime/ensure chunk", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 167, "sizes": { "runtime": 167 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/get javascript chunk filename", "name": "webpack/runtime/get javascript chunk filename", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 221, "sizes": { "runtime": 221 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/global", "name": "webpack/runtime/global", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 88, "sizes": { "runtime": 88 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/hasOwnProperty shorthand", "name": "webpack/runtime/hasOwnProperty shorthand", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 3227, "sizes": { "runtime": 3227 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/jsonp chunk loading", "name": "webpack/runtime/jsonp chunk loading", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 1530, "sizes": { "runtime": 1530 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/load script", "name": "webpack/runtime/load script", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 274, "sizes": { "runtime": 274 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/make namespace object", "name": "webpack/runtime/make namespace object", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 123, "sizes": { "runtime": 123 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/node module decorator", "name": "webpack/runtime/node module decorator", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null }, { "type": "module", "moduleType": "runtime", "layer": null, "size": 867, "sizes": { "runtime": 867 }, "built": false, "codeGenerated": true, "buildTimeExecuted": false, "cached": false, "identifier": "webpack/runtime/publicPath", "name": "webpack/runtime/publicPath", "nameForCondition": null, "index": null, "preOrderIndex": null, "index2": null, "postOrderIndex": null, "optional": false, "orphan": false, "failed": false, "errors": 0, "warnings": 0, "id": "", "chunks": [ "runtime" ], "assets": [], "reasons": [], "usedExports": null, "providedExports": [], "optimizationBailout": [], "depth": null } ], "entrypoints": { "app": { "name": "app", "chunks": [ "app" ], "assets": [ { "name": "app.js", "size": 274 } ], "filteredAssets": 0, "assetsSize": 274, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false }, "page1": { "name": "page1", "chunks": [ "page1" ], "assets": [ { "name": "page1.js", "size": 333 } ], "filteredAssets": 0, "assetsSize": 333, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false }, "react-vendors": { "name": "react-vendors", "chunks": [ "runtime", "react-vendors" ], "assets": [ { "name": "runtime.js", "size": 3205 }, { "name": "react-vendors.js", "size": 130522 } ], "filteredAssets": 0, "assetsSize": 133727, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false }, "other-vendors": { "name": "other-vendors", "chunks": [ "runtime", "other-vendors" ], "assets": [ { "name": "runtime.js", "size": 3205 }, { "name": "other-vendors.js", "size": 79779 } ], "filteredAssets": 0, "assetsSize": 82984, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false } }, "namedChunkGroups": { "app": { "name": "app", "chunks": [ "app" ], "assets": [ { "name": "app.js", "size": 274 } ], "filteredAssets": 0, "assetsSize": 274, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false }, "page1": { "name": "page1", "chunks": [ "page1" ], "assets": [ { "name": "page1.js", "size": 333 } ], "filteredAssets": 0, "assetsSize": 333, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false }, "react-vendors": { "name": "react-vendors", "chunks": [ "runtime", "react-vendors" ], "assets": [ { "name": "runtime.js", "size": 3205 }, { "name": "react-vendors.js", "size": 130522 } ], "filteredAssets": 0, "assetsSize": 133727, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false }, "other-vendors": { "name": "other-vendors", "chunks": [ "runtime", "other-vendors" ], "assets": [ { "name": "runtime.js", "size": 3205 }, { "name": "other-vendors.js", "size": 79779 } ], "filteredAssets": 0, "assetsSize": 82984, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false } }, "errors": [], "errorsCount": 0, "warnings": [ { "message": "configuration\nThe 'mode' option has not been set, webpack will fallback to 'production' for this value.\nSet 'mode' option to 'development' or 'production' to enable defaults for each environment.\nYou can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/", "stack": "NoModeWarning: configuration\nThe 'mode' option has not been set, webpack will fallback to 'production' for this value.\nSet 'mode' option to 'development' or 'production' to enable defaults for each environment.\nYou can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/\n at /home/coder/webpack/node_modules/webpack/lib/WarnNoModeSetPlugin.js:20:30\n at Hook.eval [as call] (eval at create (/home/coder/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), :19:1)\n at Hook.CALL_DELEGATE [as _call] (/home/coder/webpack/node_modules/tapable/lib/Hook.js:14:14)\n at Compiler.newCompilation (/home/coder/webpack/node_modules/webpack/lib/Compiler.js:1121:30)\n at /home/coder/webpack/node_modules/webpack/lib/Compiler.js:1166:29\n at Hook.eval [as callAsync] (eval at create (/home/coder/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :4:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/coder/webpack/node_modules/tapable/lib/Hook.js:18:14)\n at Compiler.compile (/home/coder/webpack/node_modules/webpack/lib/Compiler.js:1161:28)\n at /home/coder/webpack/node_modules/webpack/lib/Compiler.js:524:12\n at Compiler.readRecords (/home/coder/webpack/node_modules/webpack/lib/Compiler.js:986:5)" } ], "warningsCount": 1, "children": [] } ================================================ FILE: test/stats/with-no-entrypoints/stats.json ================================================ { "hash": "0d30ee86a3a7e89aaace", "version": "5.74.0", "time": 42, "builtAt": 1660844314317, "publicPath": "auto", "outputPath": "/home/coder/webpack/examples/code-splitting-depend-on-advanced/dist", "assetsByChunkName": {}, "assets": [], "chunks": [], "modules": [], "entrypoints": {}, "namedChunkGroups": {}, "errors": [], "errorsCount": 0, "warnings": [ { "message": "configuration\nThe 'mode' option has not been set, webpack will fallback to 'production' for this value.\nSet 'mode' option to 'development' or 'production' to enable defaults for each environment.\nYou can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/", "stack": "NoModeWarning: configuration\nThe 'mode' option has not been set, webpack will fallback to 'production' for this value.\nSet 'mode' option to 'development' or 'production' to enable defaults for each environment.\nYou can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/\n at /home/coder/webpack/node_modules/webpack/lib/WarnNoModeSetPlugin.js:20:30\n at Hook.eval [as call] (eval at create (/home/coder/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), :19:1)\n at Hook.CALL_DELEGATE [as _call] (/home/coder/webpack/node_modules/tapable/lib/Hook.js:14:14)\n at Compiler.newCompilation (/home/coder/webpack/node_modules/webpack/lib/Compiler.js:1121:30)\n at /home/coder/webpack/node_modules/webpack/lib/Compiler.js:1166:29\n at Hook.eval [as callAsync] (eval at create (/home/coder/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), :4:1)\n at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/coder/webpack/node_modules/tapable/lib/Hook.js:18:14)\n at Compiler.compile (/home/coder/webpack/node_modules/webpack/lib/Compiler.js:1161:28)\n at /home/coder/webpack/node_modules/webpack/lib/Compiler.js:524:12\n at Compiler.readRecords (/home/coder/webpack/node_modules/webpack/lib/Compiler.js:986:5)" } ], "warningsCount": 1, "children": [] } ================================================ FILE: test/stats/with-non-asset-asset/bundle.js ================================================ (()=>{var r={146:r=>{r.exports="module a"},296:r=>{r.exports="module a"},260:r=>{r.exports="module b"}},e={};function o(t){if(e[t])return e[t].exports;var p=e[t]={exports:{}};return r[t](p,p.exports,o),p.exports}o(296),o(260),o(146)})(); ================================================ FILE: test/stats/with-non-asset-asset/stats.json ================================================ { "hash": "a00ccf8c892bb7cacd85", "version": "5.1.0", "time": 279, "builtAt": 1602608505481, "publicPath": "auto", "outputPath": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/stats/with-non-asset-chunk", "assetsByChunkName": { "main": [ "bundle.js" ] }, "assets": [ { "type": "hidden assets", "filteredChildren": 1, "size": 29 }, { "type": "asset", "name": "bundle.js", "size": 237, "chunkNames": [ "main" ], "chunkIdHints": [], "auxiliaryChunkNames": [], "auxiliaryChunkIdHints": [], "emitted": true, "comparedForEmit": false, "cached": false, "info": { "minimized": true, "size": 237 }, "related": {}, "chunks": [ 179 ], "auxiliaryChunks": [], "isOverSizeLimit": false } ], "chunks": [ { "rendered": true, "initial": true, "entry": true, "recorded": false, "size": 141, "sizes": { "javascript": 141 }, "names": [ "main" ], "idHints": [], "runtime": [ "main" ], "files": [ "bundle.js" ], "auxiliaryFiles": [], "hash": "368fad705e34fecd2ddf", "childrenByOrder": {}, "id": 179, "siblings": [], "parents": [], "children": [], "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js" } ] } ], "modules": [ { "type": "module", "moduleType": "javascript/auto", "identifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "name": "./test/src/index.js", "nameForCondition": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "index": 0, "preOrderIndex": 0, "index2": 3, "postOrderIndex": 3, "size": 54, "sizes": { "javascript": 54 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "profile": { "total": 44, "resolving": 28, "restoring": 0, "building": 16, "integration": 0, "storing": 0, "additionalResolving": 0, "additionalIntegration": 0, "factory": 28, "dependencies": 0 }, "id": 755, "issuerId": null, "chunks": [ 179 ], "assets": [], "reasons": [ { "moduleIdentifier": null, "module": null, "moduleName": null, "resolvedModuleIdentifier": null, "resolvedModule": null, "type": "entry", "active": true, "explanation": "", "userRequest": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "loc": "main", "moduleId": null, "resolvedModuleId": null } ], "usedExports": [], "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/a.js", "name": "./test/src/a.js", "nameForCondition": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/a.js", "index": 1, "preOrderIndex": 1, "index2": 0, "postOrderIndex": 0, "size": 29, "sizes": { "javascript": 29 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./test/src/index.js", "issuerPath": [ { "identifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "name": "./test/src/index.js", "profile": { "total": 44, "resolving": 28, "restoring": 0, "building": 16, "integration": 0, "storing": 0, "additionalResolving": 0, "additionalIntegration": 0, "factory": 28, "dependencies": 0 }, "id": 755 } ], "failed": false, "errors": 0, "warnings": 0, "profile": { "total": 0, "resolving": 0, "restoring": 0, "building": 0, "integration": 0, "storing": 0, "additionalResolving": 0, "additionalIntegration": 0, "factory": 0, "dependencies": 0 }, "id": 296, "issuerId": 755, "chunks": [ 179 ], "assets": [], "reasons": [ { "moduleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/a.js", "module": "./test/src/a.js", "moduleName": "./test/src/a.js", "resolvedModuleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/a.js", "resolvedModule": "./test/src/a.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "1:0-14", "moduleId": 296, "resolvedModuleId": 296 }, { "moduleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "module": "./test/src/index.js", "moduleName": "./test/src/index.js", "resolvedModuleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./test/src/index.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "./a", "loc": "1:0-14", "moduleId": 755, "resolvedModuleId": 755 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 1:0-14", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/b.js", "name": "./test/src/b.js", "nameForCondition": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/b.js", "index": 2, "preOrderIndex": 2, "index2": 1, "postOrderIndex": 1, "size": 29, "sizes": { "javascript": 29 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./test/src/index.js", "issuerPath": [ { "identifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "name": "./test/src/index.js", "profile": { "total": 44, "resolving": 28, "restoring": 0, "building": 16, "integration": 0, "storing": 0, "additionalResolving": 0, "additionalIntegration": 0, "factory": 28, "dependencies": 0 }, "id": 755 } ], "failed": false, "errors": 0, "warnings": 0, "profile": { "total": 0, "resolving": 0, "restoring": 0, "building": 0, "integration": 0, "storing": 0, "additionalResolving": 0, "additionalIntegration": 0, "factory": 0, "dependencies": 0 }, "id": 260, "issuerId": 755, "chunks": [ 179 ], "assets": [], "reasons": [ { "moduleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/b.js", "module": "./test/src/b.js", "moduleName": "./test/src/b.js", "resolvedModuleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/b.js", "resolvedModule": "./test/src/b.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "1:0-14", "moduleId": 260, "resolvedModuleId": 260 }, { "moduleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "module": "./test/src/index.js", "moduleName": "./test/src/index.js", "resolvedModuleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./test/src/index.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "./b", "loc": "2:0-14", "moduleId": 755, "resolvedModuleId": 755 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 1:0-14", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 }, { "type": "module", "moduleType": "javascript/auto", "identifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/a-clone.js", "name": "./test/src/a-clone.js", "nameForCondition": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/a-clone.js", "index": 3, "preOrderIndex": 3, "index2": 2, "postOrderIndex": 2, "size": 29, "sizes": { "javascript": 29 }, "cacheable": true, "built": true, "codeGenerated": true, "cached": false, "optional": false, "orphan": false, "issuer": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "issuerName": "./test/src/index.js", "issuerPath": [ { "identifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "name": "./test/src/index.js", "profile": { "total": 44, "resolving": 28, "restoring": 0, "building": 16, "integration": 0, "storing": 0, "additionalResolving": 0, "additionalIntegration": 0, "factory": 28, "dependencies": 0 }, "id": 755 } ], "failed": false, "errors": 0, "warnings": 0, "profile": { "total": 0, "resolving": 0, "restoring": 0, "building": 0, "integration": 0, "storing": 0, "additionalResolving": 0, "additionalIntegration": 0, "factory": 0, "dependencies": 0 }, "id": 146, "issuerId": 755, "chunks": [ 179 ], "assets": [], "reasons": [ { "moduleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/a-clone.js", "module": "./test/src/a-clone.js", "moduleName": "./test/src/a-clone.js", "resolvedModuleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/a-clone.js", "resolvedModule": "./test/src/a-clone.js", "type": "cjs self exports reference", "active": true, "explanation": "", "userRequest": null, "loc": "1:0-14", "moduleId": 146, "resolvedModuleId": 146 }, { "moduleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "module": "./test/src/index.js", "moduleName": "./test/src/index.js", "resolvedModuleIdentifier": "/Users/zhengkenghong/Projects/Other/webpack-bundle-analyzer/test/src/index.js", "resolvedModule": "./test/src/index.js", "type": "cjs require", "active": true, "explanation": "", "userRequest": "./a-clone", "loc": "3:0-20", "moduleId": 755, "resolvedModuleId": 755 } ], "usedExports": null, "providedExports": null, "optimizationBailout": [ "CommonJS bailout: module.exports is used directly at 1:0-14", "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1 } ], "entrypoints": { "main": { "name": "main", "chunks": [ 179 ], "assets": [ { "name": "bundle.js", "size": 237 } ], "filteredAssets": 0, "assetsSize": 237, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false } }, "namedChunkGroups": { "main": { "name": "main", "chunks": [ 179 ], "assets": [ { "name": "bundle.js", "size": 237 } ], "filteredAssets": 0, "assetsSize": 237, "auxiliaryAssets": [], "filteredAuxiliaryAssets": 0, "auxiliaryAssetsSize": 0, "children": {}, "childAssets": {}, "isOverSizeLimit": false } }, "errors": [], "errorsCount": 0, "warnings": [], "warningsCount": 0, "children": [] } ================================================ FILE: test/stats/with-special-chars/bundle.js ================================================ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t),console.log("!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸǹǺǻǼǽǾǿȀȁȂȃȄȅȆȇȈȉȊȋȌȍȎȏȐȑȒȓȔȕȖȗȘșȚțȜȝȞȟȠȡȢȣȤȥȦȧȨȩȪȫȬȭȮȯȰȱȲȳȴȵȶȷȸȹȺȻȼȽȾȿɀɁɂɃɄɅɆɇɈɉɊɋɌɍɎɏɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀˁ˂˃˄˅ˆˇˈˉˊˋˌˍˎˏːˑ˒˓˔˕˖˗˘˙˚˛˜˝˞˟ˠˡˢˣˤ˥˦˧˨˩˪˫ˬ˭ˮ˯˰˱˲˳˴˵˶˷˸˹˺˻˼˽˾˿̴̵̶̷̸̡̢̧̨̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼͇͈͉͍͎̀́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̓̔̽̾̿̀́͂̓̈́͆͊͋͌̕̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͣͤͥͦͧͨͩͪͫͬͭͮͯ͘͜͟͢͝͞͠͡ͰͱͲͳʹ͵Ͷͷͺͻͼͽ;Ϳ΄΅Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϏϐϑϒϓϔϕϖϗϘϙϚϛϜϝϞϟϠϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϰϱϲϳϴϵ϶ϷϸϹϺϻϼϽϾϿЀЁЂЃЄЅІЇЈ")}]); ================================================ FILE: test/stats/with-special-chars/expected-chart-data.js ================================================ module.exports = [ { "groups": [ { "id": 0, "label": "index.js", "path": "./index.js", "statSize": 1021 } ], "label": "bundle.js", "statSize": 1021 } ]; ================================================ FILE: test/stats/with-special-chars/stats.json ================================================ { "errors": [], "warnings": [], "version": "4.25.1", "hash": "6a0006856f4405101aa5", "time": 279, "builtAt": 1542409324382, "publicPath": "", "outputPath": "/tmp/with-special-chars", "assetsByChunkName": { "main": "bundle.js" }, "assets": [ { "name": "bundle.js", "size": 1972, "chunks": [ 0 ], "chunkNames": [ "main" ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "main": { "chunks": [ 0 ], "assets": [ "bundle.js" ], "children": {}, "childAssets": {} } }, "namedChunkGroups": { "main": { "chunks": [ 0 ], "assets": [ "bundle.js" ], "children": {}, "childAssets": {} } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 1021, "names": [ "main" ], "files": [ "bundle.js" ], "hash": "ad9a5baaeb4c63ce54e3", "siblings": [], "parents": [], "children": [], "childrenByOrder": {}, "modules": [ { "id": 0, "identifier": "/tmp/with-special-chars/index.js", "name": "./index.js", "index": 0, "index2": 0, "size": 1021, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "/tmp/with-special-chars/index.js", "loc": "main" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "console.log(`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸǹǺǻǼǽǾǿȀȁȂȃȄȅȆȇȈȉȊȋȌȍȎȏȐȑȒȓȔȕȖȗȘșȚțȜȝȞȟȠȡȢȣȤȥȦȧȨȩȪȫȬȭȮȯȰȱȲȳȴȵȶȷȸȹȺȻȼȽȾȿɀɁɂɃɄɅɆɇɈɉɊɋɌɍɎɏɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀˁ˂˃˄˅ˆˇˈˉˊˋˌˍˎˏːˑ˒˓˔˕˖˗˘˙˚˛˜˝˞˟ˠˡˢˣˤ˥˦˧˨˩˪˫ˬ˭ˮ˯˰˱˲˳˴˵˶˷˸˹˺˻˼˽˾˿̴̵̶̷̸̡̢̧̨̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼͇͈͉͍͎̀́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̓̔̽̾̿̀́͂̓̈́͆͊͋͌̕̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͣͤͥͦͧͨͩͪͫͬͭͮͯ͘͜͟͢͝͞͠͡ͰͱͲͳʹ͵Ͷͷͺͻͼͽ;Ϳ΄΅Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϏϐϑϒϓϔϕϖϗϘϙϚϛϜϝϞϟϠϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϰϱϲϳϴϵ϶ϷϸϹϺϻϼϽϾϿЀЁЂЃЄЅІЇЈ`)\n" } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "request": "/tmp/with-special-chars/index.js", "reasons": [] } ] } ], "modules": [ { "id": 0, "identifier": "/tmp/with-special-chars/index.js", "name": "./index.js", "index": 0, "index2": 0, "size": 1021, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "assets": [], "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "/tmp/with-special-chars/index.js", "loc": "main" } ], "usedExports": true, "providedExports": [], "optimizationBailout": [ "ModuleConcatenation bailout: Module is an entry point" ], "depth": 0, "source": "console.log(`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸǹǺǻǼǽǾǿȀȁȂȃȄȅȆȇȈȉȊȋȌȍȎȏȐȑȒȓȔȕȖȗȘșȚțȜȝȞȟȠȡȢȣȤȥȦȧȨȩȪȫȬȭȮȯȰȱȲȳȴȵȶȷȸȹȺȻȼȽȾȿɀɁɂɃɄɅɆɇɈɉɊɋɌɍɎɏɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀˁ˂˃˄˅ˆˇˈˉˊˋˌˍˎˏːˑ˒˓˔˕˖˗˘˙˚˛˜˝˞˟ˠˡˢˣˤ˥˦˧˨˩˪˫ˬ˭ˮ˯˰˱˲˳˴˵˶˷˸˹˺˻˼˽˾˿̴̵̶̷̸̡̢̧̨̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼͇͈͉͍͎̀́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̓̔̽̾̿̀́͂̓̈́͆͊͋͌̕̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͣͤͥͦͧͨͩͪͫͬͭͮͯ͘͜͟͢͝͞͠͡ͰͱͲͳʹ͵Ͷͷͺͻͼͽ;Ϳ΄΅Ά·ΈΉΊΌΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϏϐϑϒϓϔϕϖϗϘϙϚϛϜϝϞϟϠϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϰϱϲϳϴϵ϶ϷϸϹϺϻϼϽϾϿЀЁЂЃЄЅІЇЈ`)\n" } ], "filteredModules": 0, "children": [] } ================================================ FILE: test/stats/with-worker-loader/bundle.js ================================================ !function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";n.r(t);var o=0,r={},u=new function(){return new Worker(n.p+"bundle.worker.js")};u.addEventListener("message",function(e){var t=e.data.id,n=r[t].fn,o=r[t].args;n.apply(null,o),delete r[t]}),window.setTimeout=function(e,t){var n=Array.prototype.slice.call(arguments,2);t=t||0;var i=o+=1;return r[i]={fn:e,args:n},u.postMessage({command:"setTimeout",id:i,timeout:t}),i},window.clearTimeout=function(e){u.postMessage({command:"clearTimeout",id:e}),delete r[e]},console.log("hello world"),window.setTimeout(()=>console.log("hello world after 5 sec"),5e3)},function(e,t,n){e.exports=n(0)}]); ================================================ FILE: test/stats/with-worker-loader/bundle.worker.js ================================================ !function(n){var t={};function r(e){if(t[e])return t[e].exports;var u=t[e]={i:e,l:!1,exports:{}};return n[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}r.m=n,r.c=t,r.d=function(n,t,e){r.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:e})},r.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,"a",t),t},r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.p="",r(r.s=3)}([function(n,t){n.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},function(n,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(n){"object"==typeof window&&(r=window)}n.exports=r},function(n,t,r){(function(n,e){var u; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(){var i,o=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="__lodash_hash_undefined__",l=500,s="__lodash_placeholder__",h=1,p=2,v=4,_=1,g=2,y=1,d=2,b=4,w=8,m=16,x=32,j=64,A=128,O=256,k=512,I=30,R="...",E=800,z=16,S=1,L=2,W=1/0,C=9007199254740991,T=1.7976931348623157e308,U=NaN,B=4294967295,$=B-1,D=B>>>1,M=[["ary",A],["bind",y],["bindKey",d],["curry",w],["curryRight",m],["flip",k],["partial",x],["partialRight",j],["rearg",O]],P="[object Arguments]",F="[object Array]",N="[object AsyncFunction]",q="[object Boolean]",Z="[object Date]",K="[object DOMException]",V="[object Error]",G="[object Function]",H="[object GeneratorFunction]",J="[object Map]",Y="[object Number]",Q="[object Null]",X="[object Object]",nn="[object Proxy]",tn="[object RegExp]",rn="[object Set]",en="[object String]",un="[object Symbol]",on="[object Undefined]",fn="[object WeakMap]",an="[object WeakSet]",cn="[object ArrayBuffer]",ln="[object DataView]",sn="[object Float32Array]",hn="[object Float64Array]",pn="[object Int8Array]",vn="[object Int16Array]",_n="[object Int32Array]",gn="[object Uint8Array]",yn="[object Uint8ClampedArray]",dn="[object Uint16Array]",bn="[object Uint32Array]",wn=/\b__p \+= '';/g,mn=/\b(__p \+=) '' \+/g,xn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jn=/&(?:amp|lt|gt|quot|#39);/g,An=/[&<>"']/g,On=RegExp(jn.source),kn=RegExp(An.source),In=/<%-([\s\S]+?)%>/g,Rn=/<%([\s\S]+?)%>/g,En=/<%=([\s\S]+?)%>/g,zn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sn=/^\w*$/,Ln=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wn=/[\\^$.*+?()[\]{}|]/g,Cn=RegExp(Wn.source),Tn=/^\s+|\s+$/g,Un=/^\s+/,Bn=/\s+$/,$n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Dn=/\{\n\/\* \[wrapped with (.+)\] \*/,Mn=/,? & /,Pn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fn=/\\(\\)?/g,Nn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qn=/\w*$/,Zn=/^[-+]0x[0-9a-f]+$/i,Kn=/^0b[01]+$/i,Vn=/^\[object .+?Constructor\]$/,Gn=/^0o[0-7]+$/i,Hn=/^(?:0|[1-9]\d*)$/,Jn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yn=/($^)/,Qn=/['\n\r\u2028\u2029\\]/g,Xn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",nt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",tt="[\\ud800-\\udfff]",rt="["+nt+"]",et="["+Xn+"]",ut="\\d+",it="[\\u2700-\\u27bf]",ot="[a-z\\xdf-\\xf6\\xf8-\\xff]",ft="[^\\ud800-\\udfff"+nt+ut+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",at="\\ud83c[\\udffb-\\udfff]",ct="[^\\ud800-\\udfff]",lt="(?:\\ud83c[\\udde6-\\uddff]){2}",st="[\\ud800-\\udbff][\\udc00-\\udfff]",ht="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pt="(?:"+ot+"|"+ft+")",vt="(?:"+ht+"|"+ft+")",_t="(?:"+et+"|"+at+")"+"?",gt="[\\ufe0e\\ufe0f]?"+_t+("(?:\\u200d(?:"+[ct,lt,st].join("|")+")[\\ufe0e\\ufe0f]?"+_t+")*"),yt="(?:"+[it,lt,st].join("|")+")"+gt,dt="(?:"+[ct+et+"?",et,lt,st,tt].join("|")+")",bt=RegExp("['’]","g"),wt=RegExp(et,"g"),mt=RegExp(at+"(?="+at+")|"+dt+gt,"g"),xt=RegExp([ht+"?"+ot+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[rt,ht,"$"].join("|")+")",vt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[rt,ht+pt,"$"].join("|")+")",ht+"?"+pt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ht+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ut,yt].join("|"),"g"),jt=RegExp("[\\u200d\\ud800-\\udfff"+Xn+"\\ufe0e\\ufe0f]"),At=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kt=-1,It={};It[sn]=It[hn]=It[pn]=It[vn]=It[_n]=It[gn]=It[yn]=It[dn]=It[bn]=!0,It[P]=It[F]=It[cn]=It[q]=It[ln]=It[Z]=It[V]=It[G]=It[J]=It[Y]=It[X]=It[tn]=It[rn]=It[en]=It[fn]=!1;var Rt={};Rt[P]=Rt[F]=Rt[cn]=Rt[ln]=Rt[q]=Rt[Z]=Rt[sn]=Rt[hn]=Rt[pn]=Rt[vn]=Rt[_n]=Rt[J]=Rt[Y]=Rt[X]=Rt[tn]=Rt[rn]=Rt[en]=Rt[un]=Rt[gn]=Rt[yn]=Rt[dn]=Rt[bn]=!0,Rt[V]=Rt[G]=Rt[fn]=!1;var Et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},zt=parseFloat,St=parseInt,Lt="object"==typeof n&&n&&n.Object===Object&&n,Wt="object"==typeof self&&self&&self.Object===Object&&self,Ct=Lt||Wt||Function("return this")(),Tt="object"==typeof t&&t&&!t.nodeType&&t,Ut=Tt&&"object"==typeof e&&e&&!e.nodeType&&e,Bt=Ut&&Ut.exports===Tt,$t=Bt&&Lt.process,Dt=function(){try{var n=Ut&&Ut.require&&Ut.require("util").types;return n||$t&&$t.binding&&$t.binding("util")}catch(n){}}(),Mt=Dt&&Dt.isArrayBuffer,Pt=Dt&&Dt.isDate,Ft=Dt&&Dt.isMap,Nt=Dt&&Dt.isRegExp,qt=Dt&&Dt.isSet,Zt=Dt&&Dt.isTypedArray;function Kt(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function Vt(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function Xt(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function mr(n,t){for(var r=n.length;r--&&ar(t,n[r],0)>-1;);return r}var xr=pr({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),jr=pr({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ar(n){return"\\"+Et[n]}function Or(n){return jt.test(n)}function kr(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function Ir(n,t){return function(r){return n(t(r))}}function Rr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r",""":'"',"'":"'"});var Cr=function n(t){var r=(t=null==t?Ct:Cr.defaults(Ct.Object(),t,Cr.pick(Ct,Ot))).Array,e=t.Date,u=t.Error,Xn=t.Function,nt=t.Math,tt=t.Object,rt=t.RegExp,et=t.String,ut=t.TypeError,it=r.prototype,ot=Xn.prototype,ft=tt.prototype,at=t["__core-js_shared__"],ct=ot.toString,lt=ft.hasOwnProperty,st=0,ht=function(){var n=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),pt=ft.toString,vt=ct.call(tt),_t=Ct._,gt=rt("^"+ct.call(lt).replace(Wn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yt=Bt?t.Buffer:i,dt=t.Symbol,mt=t.Uint8Array,jt=yt?yt.allocUnsafe:i,Et=Ir(tt.getPrototypeOf,tt),Lt=tt.create,Wt=ft.propertyIsEnumerable,Tt=it.splice,Ut=dt?dt.isConcatSpreadable:i,$t=dt?dt.iterator:i,Dt=dt?dt.toStringTag:i,ir=function(){try{var n=Bi(tt,"defineProperty");return n({},"",{}),n}catch(n){}}(),pr=t.clearTimeout!==Ct.clearTimeout&&t.clearTimeout,Tr=e&&e.now!==Ct.Date.now&&e.now,Ur=t.setTimeout!==Ct.setTimeout&&t.setTimeout,Br=nt.ceil,$r=nt.floor,Dr=tt.getOwnPropertySymbols,Mr=yt?yt.isBuffer:i,Pr=t.isFinite,Fr=it.join,Nr=Ir(tt.keys,tt),qr=nt.max,Zr=nt.min,Kr=e.now,Vr=t.parseInt,Gr=nt.random,Hr=it.reverse,Jr=Bi(t,"DataView"),Yr=Bi(t,"Map"),Qr=Bi(t,"Promise"),Xr=Bi(t,"Set"),ne=Bi(t,"WeakMap"),te=Bi(tt,"create"),re=ne&&new ne,ee={},ue=co(Jr),ie=co(Yr),oe=co(Qr),fe=co(Xr),ae=co(ne),ce=dt?dt.prototype:i,le=ce?ce.valueOf:i,se=ce?ce.toString:i;function he(n){if(Rf(n)&&!yf(n)&&!(n instanceof ge)){if(n instanceof _e)return n;if(lt.call(n,"__wrapped__"))return lo(n)}return new _e(n)}var pe=function(){function n(){}return function(t){if(!If(t))return{};if(Lt)return Lt(t);n.prototype=t;var r=new n;return n.prototype=i,r}}();function ve(){}function _e(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function ge(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=B,this.__views__=[]}function ye(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Ce(n,t,r,e,u,o){var f,a=t&h,c=t&p,l=t&v;if(r&&(f=u?r(n,e,u,o):r(n)),f!==i)return f;if(!If(n))return n;var s=yf(n);if(s){if(f=function(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&<.call(n,"index")&&(r.index=n.index,r.input=n.input),r}(n),!a)return ti(n,f)}else{var _=Mi(n),g=_==G||_==H;if(mf(n))return Hu(n,a);if(_==X||_==P||g&&!u){if(f=c||g?{}:Fi(n),!a)return c?function(n,t){return ri(n,Di(n),t)}(n,function(n,t){return n&&ri(t,ia(t),n)}(f,n)):function(n,t){return ri(n,$i(n),t)}(n,ze(f,n))}else{if(!Rt[_])return u?n:{};f=function(n,t,r){var e=n.constructor;switch(t){case cn:return Ju(n);case q:case Z:return new e(+n);case ln:return function(n,t){var r=t?Ju(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}(n,r);case sn:case hn:case pn:case vn:case _n:case gn:case yn:case dn:case bn:return Yu(n,r);case J:return new e;case Y:case en:return new e(n);case tn:return function(n){var t=new n.constructor(n.source,qn.exec(n));return t.lastIndex=n.lastIndex,t}(n);case rn:return new e;case un:return function(n){return le?tt(le.call(n)):{}}(n)}}(n,_,a)}}o||(o=new me);var y=o.get(n);if(y)return y;o.set(n,f),Wf(n)?n.forEach(function(e){f.add(Ce(e,t,r,e,n,o))}):Ef(n)&&n.forEach(function(e,u){f.set(u,Ce(e,t,r,u,n,o))});var d=s?i:(l?c?zi:Ei:c?ia:ua)(n);return Gt(d||n,function(e,u){d&&(e=n[u=e]),Ie(f,u,Ce(e,t,r,u,n,o))}),f}function Te(n,t,r){var e=r.length;if(null==n)return!e;for(n=tt(n);e--;){var u=r[e],o=t[u],f=n[u];if(f===i&&!(u in n)||!o(f))return!1}return!0}function Ue(n,t,r){if("function"!=typeof n)throw new ut(a);return ro(function(){n.apply(i,r)},t)}function Be(n,t,r,e){var u=-1,i=Qt,f=!0,a=n.length,c=[],l=t.length;if(!a)return c;r&&(t=nr(t,yr(r))),e?(i=Xt,f=!1):t.length>=o&&(i=br,f=!1,t=new we(t));n:for(;++u-1},de.prototype.set=function(n,t){var r=this.__data__,e=Re(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ye,map:new(Yr||de),string:new ye}},be.prototype.delete=function(n){var t=Ti(this,n).delete(n);return this.size-=t?1:0,t},be.prototype.get=function(n){return Ti(this,n).get(n)},be.prototype.has=function(n){return Ti(this,n).has(n)},be.prototype.set=function(n,t){var r=Ti(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},we.prototype.add=we.prototype.push=function(n){return this.__data__.set(n,c),this},we.prototype.has=function(n){return this.__data__.has(n)},me.prototype.clear=function(){this.__data__=new de,this.size=0},me.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},me.prototype.get=function(n){return this.__data__.get(n)},me.prototype.has=function(n){return this.__data__.has(n)},me.prototype.set=function(n,t){var r=this.__data__;if(r instanceof de){var e=r.__data__;if(!Yr||e.length0&&r(f)?t>1?Ne(f,t-1,r,e,u):tr(u,f):e||(u[u.length]=f)}return u}var qe=oi(),Ze=oi(!0);function Ke(n,t){return n&&qe(n,t,ua)}function Ve(n,t){return n&&Ze(n,t,ua)}function Ge(n,t){return Yt(t,function(t){return Af(n[t])})}function He(n,t){for(var r=0,e=(t=Zu(t,n)).length;null!=n&&rt}function Xe(n,t){return null!=n&<.call(n,t)}function nu(n,t){return null!=n&&t in tt(n)}function tu(n,t,e){for(var u=e?Xt:Qt,o=n[0].length,f=n.length,a=f,c=r(f),l=1/0,s=[];a--;){var h=n[a];a&&t&&(h=nr(h,yr(t))),l=Zr(h.length,l),c[a]=!e&&(t||o>=120&&h.length>=120)?new we(a&&h):i}h=n[0];var p=-1,v=c[0];n:for(;++p=f)return a;var c=r[e];return a*("desc"==c?-1:1)}}return n.index-t.index}(n,t,r)})}function yu(n,t,r){for(var e=-1,u=t.length,i={};++e-1;)f!==n&&Tt.call(f,a,1),Tt.call(n,a,1);return n}function bu(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;qi(u)?Tt.call(n,u,1):Bu(n,u)}}return n}function wu(n,t){return n+$r(Gr()*(t-n+1))}function mu(n,t){var r="";if(!n||t<1||t>C)return r;do{t%2&&(r+=n),(t=$r(t/2))&&(n+=n)}while(t);return r}function xu(n,t){return eo(Qi(n,t,za),n+"")}function ju(n){return je(pa(n))}function Au(n,t){var r=pa(n);return oo(r,We(t,0,r.length))}function Ou(n,t,r,e){if(!If(n))return n;for(var u=-1,o=(t=Zu(t,n)).length,f=o-1,a=n;null!=a&&++ui?0:i+t),(e=e>i?i:e)<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var o=r(i);++u>>1,o=n[i];null!==o&&!Tf(o)&&(r?o<=t:o=o){var l=t?null:mi(n);if(l)return Er(l);f=!1,u=br,c=new we}else c=t?[]:a;n:for(;++e=e?n:Eu(n,t,r)}var Gu=pr||function(n){return Ct.clearTimeout(n)};function Hu(n,t){if(t)return n.slice();var r=n.length,e=jt?jt(r):new n.constructor(r);return n.copy(e),e}function Ju(n){var t=new n.constructor(n.byteLength);return new mt(t).set(new mt(n)),t}function Yu(n,t){var r=t?Ju(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Qu(n,t){if(n!==t){var r=n!==i,e=null===n,u=n==n,o=Tf(n),f=t!==i,a=null===t,c=t==t,l=Tf(t);if(!a&&!l&&!o&&n>t||o&&f&&c&&!a&&!l||e&&f&&c||!r&&c||!u)return 1;if(!e&&!o&&!l&&n1?r[u-1]:i,f=u>2?r[2]:i;for(o=n.length>3&&"function"==typeof o?(u--,o):i,f&&Zi(r[0],r[1],f)&&(o=u<3?i:o,u=1),t=tt(t);++e-1?u[o?t[f]:f]:i}}function si(n){return Ri(function(t){var r=t.length,e=r,u=_e.prototype.thru;for(n&&t.reverse();e--;){var o=t[e];if("function"!=typeof o)throw new ut(a);if(u&&!f&&"wrapper"==Li(o))var f=new _e([],!0)}for(e=f?e:r;++e1&&w.reverse(),h&&la))return!1;var l=o.get(n),s=o.get(t);if(l&&s)return l==t&&s==n;var h=-1,p=!0,v=r&g?new we:i;for(o.set(n,t),o.set(t,n);++h-1&&n%1==0&&n1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace($n,"{\n/* [wrapped with "+t+"] */\n")}(e,function(n,t){return Gt(M,function(r){var e="_."+r[0];t&r[1]&&!Qt(n,e)&&n.push(e)}),n.sort()}(function(n){var t=n.match(Dn);return t?t[1].split(Mn):[]}(e),r)))}function io(n){var t=0,r=0;return function(){var e=Kr(),u=z-(e-r);if(r=e,u>0){if(++t>=E)return arguments[0]}else t=0;return n.apply(i,arguments)}}function oo(n,t){var r=-1,e=n.length,u=e-1;for(t=t===i?e:t;++r1?n[t-1]:i;return So(n,r="function"==typeof r?(n.pop(),r):i)});function $o(n){var t=he(n);return t.__chain__=!0,t}function Do(n,t){return t(n)}var Mo=Ri(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Le(t,n)};return!(t>1||this.__actions__.length)&&e instanceof ge&&qi(r)?((e=e.slice(r,+r+(t?1:0))).__actions__.push({func:Do,args:[u],thisArg:i}),new _e(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(i),n})):this.thru(u)});var Po=ei(function(n,t,r){lt.call(n,r)?++n[r]:Se(n,r,1)});var Fo=li(vo),No=li(_o);function qo(n,t){return(yf(n)?Gt:$e)(n,Ci(t,3))}function Zo(n,t){return(yf(n)?Ht:De)(n,Ci(t,3))}var Ko=ei(function(n,t,r){lt.call(n,r)?n[r].push(t):Se(n,r,[t])});var Vo=xu(function(n,t,e){var u=-1,i="function"==typeof t,o=bf(n)?r(n.length):[];return $e(n,function(n){o[++u]=i?Kt(t,n,e):ru(n,t,e)}),o}),Go=ei(function(n,t,r){Se(n,r,t)});function Ho(n,t){return(yf(n)?nr:su)(n,Ci(t,3))}var Jo=ei(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]});var Yo=xu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Zi(n,t[0],t[1])?t=[]:r>2&&Zi(t[0],t[1],t[2])&&(t=[t[0]]),gu(n,Ne(t,1),[])}),Qo=Tr||function(){return Ct.Date.now()};function Xo(n,t,r){return t=r?i:t,t=n&&null==t?n.length:t,ji(n,A,i,i,i,i,t)}function nf(n,t){var r;if("function"!=typeof t)throw new ut(a);return n=Pf(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=i),r}}var tf=xu(function(n,t,r){var e=y;if(r.length){var u=Rr(r,Wi(tf));e|=x}return ji(n,e,t,r,u)}),rf=xu(function(n,t,r){var e=y|d;if(r.length){var u=Rr(r,Wi(rf));e|=x}return ji(t,e,n,r,u)});function ef(n,t,r){var e,u,o,f,c,l,s=0,h=!1,p=!1,v=!0;if("function"!=typeof n)throw new ut(a);function _(t){var r=e,o=u;return e=u=i,s=t,f=n.apply(o,r)}function g(n){var r=n-l;return l===i||r>=t||r<0||p&&n-s>=o}function y(){var n=Qo();if(g(n))return d(n);c=ro(y,function(n){var r=t-(n-l);return p?Zr(r,o-(n-s)):r}(n))}function d(n){return c=i,v&&e?_(n):(e=u=i,f)}function b(){var n=Qo(),r=g(n);if(e=arguments,u=this,l=n,r){if(c===i)return function(n){return s=n,c=ro(y,t),h?_(n):f}(l);if(p)return Gu(c),c=ro(y,t),_(l)}return c===i&&(c=ro(y,t)),f}return t=Nf(t)||0,If(r)&&(h=!!r.leading,o=(p="maxWait"in r)?qr(Nf(r.maxWait)||0,t):o,v="trailing"in r?!!r.trailing:v),b.cancel=function(){c!==i&&Gu(c),s=0,e=l=u=c=i},b.flush=function(){return c===i?f:d(Qo())},b}var uf=xu(function(n,t){return Ue(n,1,t)}),of=xu(function(n,t,r){return Ue(n,Nf(t)||0,r)});function ff(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new ut(a);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(ff.Cache||be),r}function af(n){if("function"!=typeof n)throw new ut(a);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}ff.Cache=be;var cf=Ku(function(n,t){var r=(t=1==t.length&&yf(t[0])?nr(t[0],yr(Ci())):nr(Ne(t,1),yr(Ci()))).length;return xu(function(e){for(var u=-1,i=Zr(e.length,r);++u=t}),gf=eu(function(){return arguments}())?eu:function(n){return Rf(n)&<.call(n,"callee")&&!Wt.call(n,"callee")},yf=r.isArray,df=Mt?yr(Mt):function(n){return Rf(n)&&Ye(n)==cn};function bf(n){return null!=n&&kf(n.length)&&!Af(n)}function wf(n){return Rf(n)&&bf(n)}var mf=Mr||Na,xf=Pt?yr(Pt):function(n){return Rf(n)&&Ye(n)==Z};function jf(n){if(!Rf(n))return!1;var t=Ye(n);return t==V||t==K||"string"==typeof n.message&&"string"==typeof n.name&&!Sf(n)}function Af(n){if(!If(n))return!1;var t=Ye(n);return t==G||t==H||t==N||t==nn}function Of(n){return"number"==typeof n&&n==Pf(n)}function kf(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=C}function If(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function Rf(n){return null!=n&&"object"==typeof n}var Ef=Ft?yr(Ft):function(n){return Rf(n)&&Mi(n)==J};function zf(n){return"number"==typeof n||Rf(n)&&Ye(n)==Y}function Sf(n){if(!Rf(n)||Ye(n)!=X)return!1;var t=Et(n);if(null===t)return!0;var r=lt.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ct.call(r)==vt}var Lf=Nt?yr(Nt):function(n){return Rf(n)&&Ye(n)==tn};var Wf=qt?yr(qt):function(n){return Rf(n)&&Mi(n)==rn};function Cf(n){return"string"==typeof n||!yf(n)&&Rf(n)&&Ye(n)==en}function Tf(n){return"symbol"==typeof n||Rf(n)&&Ye(n)==un}var Uf=Zt?yr(Zt):function(n){return Rf(n)&&kf(n.length)&&!!It[Ye(n)]};var Bf=di(lu),$f=di(function(n,t){return n<=t});function Df(n){if(!n)return[];if(bf(n))return Cf(n)?Lr(n):ti(n);if($t&&n[$t])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[$t]());var t=Mi(n);return(t==J?kr:t==rn?Er:pa)(n)}function Mf(n){return n?(n=Nf(n))===W||n===-W?(n<0?-1:1)*T:n==n?n:0:0===n?n:0}function Pf(n){var t=Mf(n),r=t%1;return t==t?r?t-r:t:0}function Ff(n){return n?We(Pf(n),0,B):0}function Nf(n){if("number"==typeof n)return n;if(Tf(n))return U;if(If(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=If(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Tn,"");var r=Kn.test(n);return r||Gn.test(n)?St(n.slice(2),r?2:8):Zn.test(n)?U:+n}function qf(n){return ri(n,ia(n))}function Zf(n){return null==n?"":Tu(n)}var Kf=ui(function(n,t){if(Hi(t)||bf(t))ri(t,ua(t),n);else for(var r in t)lt.call(t,r)&&Ie(n,r,t[r])}),Vf=ui(function(n,t){ri(t,ia(t),n)}),Gf=ui(function(n,t,r,e){ri(t,ia(t),n,e)}),Hf=ui(function(n,t,r,e){ri(t,ua(t),n,e)}),Jf=Ri(Le);var Yf=xu(function(n,t){n=tt(n);var r=-1,e=t.length,u=e>2?t[2]:i;for(u&&Zi(t[0],t[1],u)&&(e=1);++r1),t}),ri(n,zi(n),r),e&&(r=Ce(r,h|p|v,ki));for(var u=t.length;u--;)Bu(r,t[u]);return r});var ca=Ri(function(n,t){return null==n?{}:function(n,t){return yu(n,t,function(t,r){return na(n,r)})}(n,t)});function la(n,t){if(null==n)return{};var r=nr(zi(n),function(n){return[n]});return t=Ci(t),yu(n,r,function(n,r){return t(n,r[0])})}var sa=xi(ua),ha=xi(ia);function pa(n){return null==n?[]:dr(n,ua(n))}var va=ai(function(n,t,r){return t=t.toLowerCase(),n+(r?_a(t):t)});function _a(n){return ja(Zf(n).toLowerCase())}function ga(n){return(n=Zf(n))&&n.replace(Jn,xr).replace(wt,"")}var ya=ai(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),da=ai(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),ba=fi("toLowerCase");var wa=ai(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()});var ma=ai(function(n,t,r){return n+(r?" ":"")+ja(t)});var xa=ai(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),ja=fi("toUpperCase");function Aa(n,t,r){return n=Zf(n),(t=r?i:t)===i?function(n){return At.test(n)}(n)?function(n){return n.match(xt)||[]}(n):function(n){return n.match(Pn)||[]}(n):n.match(t)||[]}var Oa=xu(function(n,t){try{return Kt(n,i,t)}catch(n){return jf(n)?n:new u(n)}}),ka=Ri(function(n,t){return Gt(t,function(t){t=ao(t),Se(n,t,tf(n[t],n))}),n});function Ia(n){return function(){return n}}var Ra=si(),Ea=si(!0);function za(n){return n}function Sa(n){return fu("function"==typeof n?n:Ce(n,h))}var La=xu(function(n,t){return function(r){return ru(r,n,t)}}),Wa=xu(function(n,t){return function(r){return ru(n,r,t)}});function Ca(n,t,r){var e=ua(t),u=Ge(t,e);null!=r||If(t)&&(u.length||!e.length)||(r=t,t=n,n=this,u=Ge(t,ua(t)));var i=!(If(r)&&"chain"in r&&!r.chain),o=Af(n);return Gt(u,function(r){var e=t[r];n[r]=e,o&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=ti(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,tr([this.value()],arguments))})}),n}function Ta(){}var Ua=_i(nr),Ba=_i(Jt),$a=_i(ur);function Da(n){return Ki(n)?hr(ao(n)):function(n){return function(t){return He(t,n)}}(n)}var Ma=yi(),Pa=yi(!0);function Fa(){return[]}function Na(){return!1}var qa=vi(function(n,t){return n+t},0),Za=wi("ceil"),Ka=vi(function(n,t){return n/t},1),Va=wi("floor");var Ga=vi(function(n,t){return n*t},1),Ha=wi("round"),Ja=vi(function(n,t){return n-t},0);return he.after=function(n,t){if("function"!=typeof t)throw new ut(a);return n=Pf(n),function(){if(--n<1)return t.apply(this,arguments)}},he.ary=Xo,he.assign=Kf,he.assignIn=Vf,he.assignInWith=Gf,he.assignWith=Hf,he.at=Jf,he.before=nf,he.bind=tf,he.bindAll=ka,he.bindKey=rf,he.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return yf(n)?n:[n]},he.chain=$o,he.chunk=function(n,t,e){t=(e?Zi(n,t,e):t===i)?1:qr(Pf(t),0);var u=null==n?0:n.length;if(!u||t<1)return[];for(var o=0,f=0,a=r(Br(u/t));ou?0:u+r),(e=e===i||e>u?u:Pf(e))<0&&(e+=u),e=r>e?0:Ff(e);r>>0)?(n=Zf(n))&&("string"==typeof t||null!=t&&!Lf(t))&&!(t=Tu(t))&&Or(n)?Vu(Lr(n),0,r):n.split(t,r):[]},he.spread=function(n,t){if("function"!=typeof n)throw new ut(a);return t=null==t?0:qr(Pf(t),0),xu(function(r){var e=r[t],u=Vu(r,0,t);return e&&tr(u,e),Kt(n,this,u)})},he.tail=function(n){var t=null==n?0:n.length;return t?Eu(n,1,t):[]},he.take=function(n,t,r){return n&&n.length?Eu(n,0,(t=r||t===i?1:Pf(t))<0?0:t):[]},he.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?Eu(n,(t=e-(t=r||t===i?1:Pf(t)))<0?0:t,e):[]},he.takeRightWhile=function(n,t){return n&&n.length?Du(n,Ci(t,3),!1,!0):[]},he.takeWhile=function(n,t){return n&&n.length?Du(n,Ci(t,3)):[]},he.tap=function(n,t){return t(n),n},he.throttle=function(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new ut(a);return If(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ef(n,t,{leading:e,maxWait:t,trailing:u})},he.thru=Do,he.toArray=Df,he.toPairs=sa,he.toPairsIn=ha,he.toPath=function(n){return yf(n)?nr(n,ao):Tf(n)?[n]:ti(fo(Zf(n)))},he.toPlainObject=qf,he.transform=function(n,t,r){var e=yf(n),u=e||mf(n)||Uf(n);if(t=Ci(t,4),null==r){var i=n&&n.constructor;r=u?e?new i:[]:If(n)&&Af(i)?pe(Et(n)):{}}return(u?Gt:Ke)(n,function(n,e,u){return t(r,n,e,u)}),r},he.unary=function(n){return Xo(n,1)},he.union=Io,he.unionBy=Ro,he.unionWith=Eo,he.uniq=function(n){return n&&n.length?Uu(n):[]},he.uniqBy=function(n,t){return n&&n.length?Uu(n,Ci(t,2)):[]},he.uniqWith=function(n,t){return t="function"==typeof t?t:i,n&&n.length?Uu(n,i,t):[]},he.unset=function(n,t){return null==n||Bu(n,t)},he.unzip=zo,he.unzipWith=So,he.update=function(n,t,r){return null==n?n:$u(n,t,qu(r))},he.updateWith=function(n,t,r,e){return e="function"==typeof e?e:i,null==n?n:$u(n,t,qu(r),e)},he.values=pa,he.valuesIn=function(n){return null==n?[]:dr(n,ia(n))},he.without=Lo,he.words=Aa,he.wrap=function(n,t){return lf(qu(t),n)},he.xor=Wo,he.xorBy=Co,he.xorWith=To,he.zip=Uo,he.zipObject=function(n,t){return Fu(n||[],t||[],Ie)},he.zipObjectDeep=function(n,t){return Fu(n||[],t||[],Ou)},he.zipWith=Bo,he.entries=sa,he.entriesIn=ha,he.extend=Vf,he.extendWith=Gf,Ca(he,he),he.add=qa,he.attempt=Oa,he.camelCase=va,he.capitalize=_a,he.ceil=Za,he.clamp=function(n,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=Nf(r))==r?r:0),t!==i&&(t=(t=Nf(t))==t?t:0),We(Nf(n),t,r)},he.clone=function(n){return Ce(n,v)},he.cloneDeep=function(n){return Ce(n,h|v)},he.cloneDeepWith=function(n,t){return Ce(n,h|v,t="function"==typeof t?t:i)},he.cloneWith=function(n,t){return Ce(n,v,t="function"==typeof t?t:i)},he.conformsTo=function(n,t){return null==t||Te(n,t,ua(t))},he.deburr=ga,he.defaultTo=function(n,t){return null==n||n!=n?t:n},he.divide=Ka,he.endsWith=function(n,t,r){n=Zf(n),t=Tu(t);var e=n.length,u=r=r===i?e:We(Pf(r),0,e);return(r-=t.length)>=0&&n.slice(r,u)==t},he.eq=pf,he.escape=function(n){return(n=Zf(n))&&kn.test(n)?n.replace(An,jr):n},he.escapeRegExp=function(n){return(n=Zf(n))&&Cn.test(n)?n.replace(Wn,"\\$&"):n},he.every=function(n,t,r){var e=yf(n)?Jt:Me;return r&&Zi(n,t,r)&&(t=i),e(n,Ci(t,3))},he.find=Fo,he.findIndex=vo,he.findKey=function(n,t){return or(n,Ci(t,3),Ke)},he.findLast=No,he.findLastIndex=_o,he.findLastKey=function(n,t){return or(n,Ci(t,3),Ve)},he.floor=Va,he.forEach=qo,he.forEachRight=Zo,he.forIn=function(n,t){return null==n?n:qe(n,Ci(t,3),ia)},he.forInRight=function(n,t){return null==n?n:Ze(n,Ci(t,3),ia)},he.forOwn=function(n,t){return n&&Ke(n,Ci(t,3))},he.forOwnRight=function(n,t){return n&&Ve(n,Ci(t,3))},he.get=Xf,he.gt=vf,he.gte=_f,he.has=function(n,t){return null!=n&&Pi(n,t,Xe)},he.hasIn=na,he.head=yo,he.identity=za,he.includes=function(n,t,r,e){n=bf(n)?n:pa(n),r=r&&!e?Pf(r):0;var u=n.length;return r<0&&(r=qr(u+r,0)),Cf(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&ar(n,t,r)>-1},he.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:Pf(r);return u<0&&(u=qr(e+u,0)),ar(n,t,u)},he.inRange=function(n,t,r){return t=Mf(t),r===i?(r=t,t=0):r=Mf(r),function(n,t,r){return n>=Zr(t,r)&&n=-C&&n<=C},he.isSet=Wf,he.isString=Cf,he.isSymbol=Tf,he.isTypedArray=Uf,he.isUndefined=function(n){return n===i},he.isWeakMap=function(n){return Rf(n)&&Mi(n)==fn},he.isWeakSet=function(n){return Rf(n)&&Ye(n)==an},he.join=function(n,t){return null==n?"":Fr.call(n,t)},he.kebabCase=ya,he.last=xo,he.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==i&&(u=(u=Pf(r))<0?qr(e+u,0):Zr(u,e-1)),t==t?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(n,t,u):fr(n,lr,u,!0)},he.lowerCase=da,he.lowerFirst=ba,he.lt=Bf,he.lte=$f,he.max=function(n){return n&&n.length?Pe(n,za,Qe):i},he.maxBy=function(n,t){return n&&n.length?Pe(n,Ci(t,2),Qe):i},he.mean=function(n){return sr(n,za)},he.meanBy=function(n,t){return sr(n,Ci(t,2))},he.min=function(n){return n&&n.length?Pe(n,za,lu):i},he.minBy=function(n,t){return n&&n.length?Pe(n,Ci(t,2),lu):i},he.stubArray=Fa,he.stubFalse=Na,he.stubObject=function(){return{}},he.stubString=function(){return""},he.stubTrue=function(){return!0},he.multiply=Ga,he.nth=function(n,t){return n&&n.length?_u(n,Pf(t)):i},he.noConflict=function(){return Ct._===this&&(Ct._=_t),this},he.noop=Ta,he.now=Qo,he.pad=function(n,t,r){n=Zf(n);var e=(t=Pf(t))?Sr(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return gi($r(u),r)+n+gi(Br(u),r)},he.padEnd=function(n,t,r){n=Zf(n);var e=(t=Pf(t))?Sr(n):0;return t&&et){var e=n;n=t,t=e}if(r||n%1||t%1){var u=Gr();return Zr(n+u*(t-n+zt("1e-"+((u+"").length-1))),t)}return wu(n,t)},he.reduce=function(n,t,r){var e=yf(n)?rr:vr,u=arguments.length<3;return e(n,Ci(t,4),r,u,$e)},he.reduceRight=function(n,t,r){var e=yf(n)?er:vr,u=arguments.length<3;return e(n,Ci(t,4),r,u,De)},he.repeat=function(n,t,r){return t=(r?Zi(n,t,r):t===i)?1:Pf(t),mu(Zf(n),t)},he.replace=function(){var n=arguments,t=Zf(n[0]);return n.length<3?t:t.replace(n[1],n[2])},he.result=function(n,t,r){var e=-1,u=(t=Zu(t,n)).length;for(u||(u=1,n=i);++eC)return[];var r=B,e=Zr(n,B);t=Ci(t),n-=B;for(var u=gr(e,t);++r=o)return n;var a=r-Sr(e);if(a<1)return e;var c=f?Vu(f,0,a).join(""):n.slice(0,a);if(u===i)return c+e;if(f&&(a+=c.length-a),Lf(u)){if(n.slice(a).search(u)){var l,s=c;for(u.global||(u=rt(u.source,Zf(qn.exec(u))+"g")),u.lastIndex=0;l=u.exec(s);)var h=l.index;c=c.slice(0,h===i?a:h)}}else if(n.indexOf(Tu(u),a)!=a){var p=c.lastIndexOf(u);p>-1&&(c=c.slice(0,p))}return c+e},he.unescape=function(n){return(n=Zf(n))&&On.test(n)?n.replace(jn,Wr):n},he.uniqueId=function(n){var t=++st;return Zf(n)+t},he.upperCase=xa,he.upperFirst=ja,he.each=qo,he.eachRight=Zo,he.first=yo,Ca(he,function(){var n={};return Ke(he,function(t,r){lt.call(he.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),he.VERSION="4.17.20",Gt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){he[n].placeholder=he}),Gt(["drop","take"],function(n,t){ge.prototype[n]=function(r){r=r===i?1:qr(Pf(r),0);var e=this.__filtered__&&!t?new ge(this):this.clone();return e.__filtered__?e.__takeCount__=Zr(r,e.__takeCount__):e.__views__.push({size:Zr(r,B),type:n+(e.__dir__<0?"Right":"")}),e},ge.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Gt(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==S||3==r;ge.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:Ci(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),Gt(["head","last"],function(n,t){var r="take"+(t?"Right":"");ge.prototype[n]=function(){return this[r](1).value()[0]}}),Gt(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");ge.prototype[n]=function(){return this.__filtered__?new ge(this):this[r](1)}}),ge.prototype.compact=function(){return this.filter(za)},ge.prototype.find=function(n){return this.filter(n).head()},ge.prototype.findLast=function(n){return this.reverse().find(n)},ge.prototype.invokeMap=xu(function(n,t){return"function"==typeof n?new ge(this):this.map(function(r){return ru(r,n,t)})}),ge.prototype.reject=function(n){return this.filter(af(Ci(n)))},ge.prototype.slice=function(n,t){n=Pf(n);var r=this;return r.__filtered__&&(n>0||t<0)?new ge(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==i&&(r=(t=Pf(t))<0?r.dropRight(-t):r.take(t-n)),r)},ge.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},ge.prototype.toArray=function(){return this.take(B)},Ke(ge.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=he[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);u&&(he.prototype[t]=function(){var t=this.__wrapped__,f=e?[1]:arguments,a=t instanceof ge,c=f[0],l=a||yf(t),s=function(n){var t=u.apply(he,tr([n],f));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(a=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,_=a&&!p;if(!o&&l){t=_?t:new ge(this);var g=n.apply(t,f);return g.__actions__.push({func:Do,args:[s],thisArg:i}),new _e(g,h)}return v&&_?n.apply(this,f):(g=this.thru(s),v?e?g.value()[0]:g.value():g)})}),Gt(["pop","push","shift","sort","splice","unshift"],function(n){var t=it[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);he.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(yf(u)?u:[],n)}return this[r](function(r){return t.apply(yf(r)?r:[],n)})}}),Ke(ge.prototype,function(n,t){var r=he[t];if(r){var e=r.name+"";lt.call(ee,e)||(ee[e]=[]),ee[e].push({name:t,func:r})}}),ee[hi(i,d).name]=[{name:"wrapper",func:i}],ge.prototype.clone=function(){var n=new ge(this.__wrapped__);return n.__actions__=ti(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=ti(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=ti(this.__views__),n},ge.prototype.reverse=function(){if(this.__filtered__){var n=new ge(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},ge.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=yf(n),e=t<0,u=r?n.length:0,i=function(n,t,r){for(var e=-1,u=r.length;++e=this.__values__.length;return{done:n,value:n?i:this.__values__[this.__index__++]}},he.prototype.plant=function(n){for(var t,r=this;r instanceof ve;){var e=lo(r);e.__index__=0,e.__values__=i,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t},he.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof ge){var t=n;return this.__actions__.length&&(t=new ge(this)),(t=t.reverse()).__actions__.push({func:Do,args:[ko],thisArg:i}),new _e(t,this.__chain__)}return this.thru(ko)},he.prototype.toJSON=he.prototype.valueOf=he.prototype.value=function(){return Mu(this.__wrapped__,this.__actions__)},he.prototype.first=he.prototype.head,$t&&(he.prototype[$t]=function(){return this}),he}();Ct._=Cr,(u=function(){return Cr}.call(t,r,t,e))===i||(e.exports=u)}).call(this)}).call(this,r(1),r(0)(n))},function(n,t,r){const e=r(2);var u=new Map;self.onmessage=(n=>{var t=n.data;switch(t.command){case"setTimeout":var r=e.toInteger(t.timeout),i=setTimeout(function(n){self.postMessage({id:n}),u.delete(n)}.bind(null,t.id),r);u.set(t.id,i);break;case"clearTimeout":i=u.get(t.id);e.isNil(i)||clearTimeout(i),u.delete(t.id)}})}]); ================================================ FILE: test/stats/with-worker-loader/stats.json ================================================ { "errors": [ ], "warnings": [ ], "version": "4.0.0", "hash": "cf9a021389e125c88552", "time": 343, "builtAt": 1597818131507, "publicPath": "", "outputPath": "D:\\Repos\\worker-loader-example\\dist", "assetsByChunkName": { "main": "bundle.js" }, "assets": [ { "name": "bundle.worker.js", "size": 72438, "chunks": [ ], "chunkNames": [ ], "emitted": true }, { "name": "bundle.js", "size": 1141, "chunks": [ 0 ], "chunkNames": [ "main" ], "emitted": true }, { "name": "index.html", "size": 226, "chunks": [ ], "chunkNames": [ ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "main": { "chunks": [ 0 ], "assets": [ "bundle.js" ] } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 978, "names": [ "main" ], "files": [ "bundle.js" ], "hash": "fe3d0c0bcc36b3540f03", "siblings": [ ], "parents": [ ], "children": [ ], "modules": [ { "id": 0, "identifier": "D:\\Repos\\worker-loader-example\\src\\index.js f3723979a9ae5daa2b97ad0b1caec0b9", "name": "./src/index.js + 1 modules", "index": 1, "index2": 1, "size": 950, "cacheable": false, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 1, "moduleIdentifier": "multi ./src/index.js", "module": "multi ./src/index.js", "moduleName": "multi ./src/index.js", "type": "single entry", "userRequest": "./src/index.js", "loc": "main:100000" } ], "usedExports": true, "providedExports": [ ], "optimizationBailout": [ ], "depth": 1, "modules": [ { "id": null, "identifier": "D:\\Repos\\worker-loader-example\\src\\index.js", "name": "./src/index.js", "index": 1, "index2": 1, "size": 853, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ ], "assets": [ ], "issuer": "multi ./src/index.js", "issuerId": 1, "issuerName": "multi ./src/index.js", "issuerPath": [ { "id": 1, "identifier": "multi ./src/index.js", "name": "multi ./src/index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 1, "moduleIdentifier": "multi ./src/index.js", "module": "multi ./src/index.js", "moduleName": "multi ./src/index.js", "type": "single entry", "userRequest": "./src/index.js", "loc": "main:100000" } ], "usedExports": true, "providedExports": [ ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: multi ./src/index.js (referenced with single entry)" ], "depth": 1, "source": "var timeoutId = 0;\r\nvar timeouts = {};\r\nimport Worker from './timeout.worker.js';\r\n\r\nvar worker = new Worker();\r\nworker.addEventListener(\"message\", function(evt) {\r\n var data = evt.data,\r\n id = data.id,\r\n fn = timeouts[id].fn,\r\n args = timeouts[id].args;\r\n\r\n fn.apply(null, args);\r\n delete timeouts[id];\r\n});\r\n\r\nwindow.setTimeout = function(fn, delay) {\r\n var args = Array.prototype.slice.call(arguments, 2);\r\n timeoutId += 1;\r\n delay = delay || 0;\r\n var id = timeoutId;\r\n timeouts[id] = {fn: fn, args: args};\r\n worker.postMessage({command: \"setTimeout\", id: id, timeout: delay});\r\n return id;\r\n};\r\n\r\nwindow.clearTimeout = function(id) {\r\n worker.postMessage({command: \"clearTimeout\", id: id});\r\n delete timeouts[id];\r\n};\r\n\r\nconsole.log(\"hello world\");\r\nwindow.setTimeout(() => console.log(\"hello world after 5 sec\"), 5*1000);" }, { "id": null, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\worker-loader\\dist\\cjs.js!D:\\Repos\\worker-loader-example\\src\\timeout.worker.js", "name": "./src/timeout.worker.js", "index": 2, "index2": 0, "size": 97, "cacheable": false, "built": true, "optional": false, "prefetched": false, "chunks": [ ], "assets": [ ], "issuer": "D:\\Repos\\worker-loader-example\\src\\index.js", "issuerId": null, "issuerName": "./src/index.js", "issuerPath": [ { "id": 1, "identifier": "multi ./src/index.js", "name": "multi ./src/index.js" }, { "id": null, "identifier": "D:\\Repos\\worker-loader-example\\src\\index.js", "name": "./src/index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "D:\\Repos\\worker-loader-example\\src\\index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "harmony side effect evaluation", "userRequest": "./timeout.worker.js", "loc": "3:0-41" }, { "moduleId": null, "moduleIdentifier": "D:\\Repos\\worker-loader-example\\src\\index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "harmony import specifier", "userRequest": "./timeout.worker.js", "loc": "5:17-23" } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 2, "source": "export default function() {\n return new Worker(__webpack_public_path__ + \"bundle.worker.js\");\n}\n" } ], "filteredModules": 0 }, { "id": 1, "identifier": "multi ./src/index.js", "name": "multi ./src/index.js", "index": 0, "index2": 2, "size": 28, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "multi entry" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "main", "reasons": [ ] } ] } ], "modules": [ { "id": 0, "identifier": "D:\\Repos\\worker-loader-example\\src\\index.js f3723979a9ae5daa2b97ad0b1caec0b9", "name": "./src/index.js + 1 modules", "index": 1, "index2": 1, "size": 950, "cacheable": false, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 1, "moduleIdentifier": "multi ./src/index.js", "module": "multi ./src/index.js", "moduleName": "multi ./src/index.js", "type": "single entry", "userRequest": "./src/index.js", "loc": "main:100000" } ], "usedExports": true, "providedExports": [ ], "optimizationBailout": [ ], "depth": 1, "modules": [ { "id": null, "identifier": "D:\\Repos\\worker-loader-example\\src\\index.js", "name": "./src/index.js", "index": 1, "index2": 1, "size": 853, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ ], "assets": [ ], "issuer": "multi ./src/index.js", "issuerId": 1, "issuerName": "multi ./src/index.js", "issuerPath": [ { "id": 1, "identifier": "multi ./src/index.js", "name": "multi ./src/index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 1, "moduleIdentifier": "multi ./src/index.js", "module": "multi ./src/index.js", "moduleName": "multi ./src/index.js", "type": "single entry", "userRequest": "./src/index.js", "loc": "main:100000" } ], "usedExports": true, "providedExports": [ ], "optimizationBailout": [ "ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: multi ./src/index.js (referenced with single entry)" ], "depth": 1, "source": "var timeoutId = 0;\r\nvar timeouts = {};\r\nimport Worker from './timeout.worker.js';\r\n\r\nvar worker = new Worker();\r\nworker.addEventListener(\"message\", function(evt) {\r\n var data = evt.data,\r\n id = data.id,\r\n fn = timeouts[id].fn,\r\n args = timeouts[id].args;\r\n\r\n fn.apply(null, args);\r\n delete timeouts[id];\r\n});\r\n\r\nwindow.setTimeout = function(fn, delay) {\r\n var args = Array.prototype.slice.call(arguments, 2);\r\n timeoutId += 1;\r\n delay = delay || 0;\r\n var id = timeoutId;\r\n timeouts[id] = {fn: fn, args: args};\r\n worker.postMessage({command: \"setTimeout\", id: id, timeout: delay});\r\n return id;\r\n};\r\n\r\nwindow.clearTimeout = function(id) {\r\n worker.postMessage({command: \"clearTimeout\", id: id});\r\n delete timeouts[id];\r\n};\r\n\r\nconsole.log(\"hello world\");\r\nwindow.setTimeout(() => console.log(\"hello world after 5 sec\"), 5*1000);" }, { "id": null, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\worker-loader\\dist\\cjs.js!D:\\Repos\\worker-loader-example\\src\\timeout.worker.js", "name": "./src/timeout.worker.js", "index": 2, "index2": 0, "size": 97, "cacheable": false, "built": true, "optional": false, "prefetched": false, "chunks": [ ], "assets": [ ], "issuer": "D:\\Repos\\worker-loader-example\\src\\index.js", "issuerId": null, "issuerName": "./src/index.js", "issuerPath": [ { "id": 1, "identifier": "multi ./src/index.js", "name": "multi ./src/index.js" }, { "id": null, "identifier": "D:\\Repos\\worker-loader-example\\src\\index.js", "name": "./src/index.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": "D:\\Repos\\worker-loader-example\\src\\index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "harmony side effect evaluation", "userRequest": "./timeout.worker.js", "loc": "3:0-41" }, { "moduleId": null, "moduleIdentifier": "D:\\Repos\\worker-loader-example\\src\\index.js", "module": "./src/index.js", "moduleName": "./src/index.js", "type": "harmony import specifier", "userRequest": "./timeout.worker.js", "loc": "5:17-23" } ], "usedExports": [ "default" ], "providedExports": [ "default" ], "optimizationBailout": [ ], "depth": 2, "source": "export default function() {\n return new Worker(__webpack_public_path__ + \"bundle.worker.js\");\n}\n" } ], "filteredModules": 0 }, { "id": 1, "identifier": "multi ./src/index.js", "name": "multi ./src/index.js", "index": 0, "index2": 2, "size": 28, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "multi entry" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0 } ], "filteredModules": 0, "children": [ { "errors": [ ], "warnings": [ ], "publicPath": "", "outputPath": "D:\\Repos\\worker-loader-example\\dist", "assetsByChunkName": { "HtmlWebpackPlugin_0": "__child-HtmlWebpackPlugin_0" }, "assets": [ { "name": "__child-HtmlWebpackPlugin_0", "size": 3127, "chunks": [ 0 ], "chunkNames": [ "HtmlWebpackPlugin_0" ] } ], "filteredAssets": 0, "entrypoints": { "HtmlWebpackPlugin_0": { "chunks": [ 0 ], "assets": [ "__child-HtmlWebpackPlugin_0" ] } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 436, "names": [ "HtmlWebpackPlugin_0" ], "files": [ "__child-HtmlWebpackPlugin_0" ], "hash": "9ae4615411036a99946e", "siblings": [ ], "parents": [ ], "children": [ ], "modules": [ { "id": 0, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\lib\\loader.js!D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\default_index.ejs", "name": "./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/html-webpack-plugin/default_index.ejs", "index": 0, "index2": 0, "size": 436, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\lib\\loader.js!D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\default_index.ejs", "loc": "HtmlWebpackPlugin_0" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "var _ = __non_webpack_require__(\"D:\\\\Repos\\\\worker-loader-example\\\\node_modules\\\\lodash\\\\lodash.js\");module.exports = function (templateParams) { with(templateParams) {return (function(data) {\nvar __t, __p = '';\n__p += '\\n\\n \\n \\n ' +\n((__t = ( htmlWebpackPlugin.options.title )) == null ? '' : __t) +\n'\\n \\n \\n \\n';\nreturn __p\n})();}}" } ], "filteredModules": 0, "origins": [ { "module": "", "moduleIdentifier": "", "moduleName": "", "loc": "HtmlWebpackPlugin_0", "request": "D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\lib\\loader.js!D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\default_index.ejs", "reasons": [ ] } ] } ], "modules": [ { "id": 0, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\lib\\loader.js!D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\default_index.ejs", "name": "./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/html-webpack-plugin/default_index.ejs", "index": 0, "index2": 0, "size": 436, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": null, "issuerId": null, "issuerName": null, "issuerPath": null, "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": null, "moduleIdentifier": null, "module": null, "moduleName": null, "type": "single entry", "userRequest": "D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\lib\\loader.js!D:\\Repos\\worker-loader-example\\node_modules\\html-webpack-plugin\\default_index.ejs", "loc": "HtmlWebpackPlugin_0" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 0, "source": "var _ = __non_webpack_require__(\"D:\\\\Repos\\\\worker-loader-example\\\\node_modules\\\\lodash\\\\lodash.js\");module.exports = function (templateParams) { with(templateParams) {return (function(data) {\nvar __t, __p = '';\n__p += '\\n\\n \\n \\n ' +\n((__t = ( htmlWebpackPlugin.options.title )) == null ? '' : __t) +\n'\\n \\n \\n \\n';\nreturn __p\n})();}}" } ], "filteredModules": 0, "children": [ ], "name": "HtmlWebpackCompiler" }, { "errors": [ ], "warnings": [ ], "publicPath": "", "outputPath": "D:\\Repos\\worker-loader-example\\dist", "assetsByChunkName": { "timeout.worker": "bundle.worker.js" }, "assets": [ { "name": "bundle.worker.js", "size": 72438, "chunks": [ 0 ], "chunkNames": [ "timeout.worker" ], "emitted": true } ], "filteredAssets": 0, "entrypoints": { "timeout.worker": { "chunks": [ 0 ], "assets": [ "bundle.worker.js" ] } }, "chunks": [ { "id": 0, "rendered": true, "initial": true, "entry": true, "size": 544273, "names": [ "timeout.worker" ], "files": [ "bundle.worker.js" ], "hash": "de3a975485d3f7f4a929", "siblings": [ ], "parents": [ ], "children": [ ], "modules": [ { "id": 0, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\webpack\\buildin\\module.js", "name": "(webpack)/buildin/module.js", "index": 3, "index2": 1, "size": 519, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": "D:\\Repos\\worker-loader-example\\node_modules\\lodash\\lodash.js", "issuerId": 2, "issuerName": "./node_modules/lodash/lodash.js", "issuerPath": [ { "id": 3, "identifier": "D:\\Repos\\worker-loader-example\\src\\timeout.worker.js", "name": "./src/timeout.worker.js" }, { "id": 2, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\lodash\\lodash.js", "name": "./node_modules/lodash/lodash.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 2, "moduleIdentifier": "D:\\Repos\\worker-loader-example\\node_modules\\lodash\\lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "type": "cjs require", "userRequest": "module", "loc": "1:0-41" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2, "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": 1, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\webpack\\buildin\\global.js", "name": "(webpack)/buildin/global.js", "index": 2, "index2": 0, "size": 509, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": "D:\\Repos\\worker-loader-example\\node_modules\\lodash\\lodash.js", "issuerId": 2, "issuerName": "./node_modules/lodash/lodash.js", "issuerPath": [ { "id": 3, "identifier": "D:\\Repos\\worker-loader-example\\src\\timeout.worker.js", "name": "./src/timeout.worker.js" }, { "id": 2, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\lodash\\lodash.js", "name": "./node_modules/lodash/lodash.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 2, "moduleIdentifier": "D:\\Repos\\worker-loader-example\\node_modules\\lodash\\lodash.js", "module": "./node_modules/lodash/lodash.js", "moduleName": "./node_modules/lodash/lodash.js", "type": "cjs require", "userRequest": "global", "loc": "1:0-41" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 2, "source": "var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n" }, { "id": 2, "identifier": "D:\\Repos\\worker-loader-example\\node_modules\\lodash\\lodash.js", "name": "./node_modules/lodash/lodash.js", "index": 1, "index2": 2, "size": 542563, "cacheable": true, "built": true, "optional": false, "prefetched": false, "chunks": [ 0 ], "assets": [ ], "issuer": "D:\\Repos\\worker-loader-example\\src\\timeout.worker.js", "issuerId": 3, "issuerName": "./src/timeout.worker.js", "issuerPath": [ { "id": 3, "identifier": "D:\\Repos\\worker-loader-example\\src\\timeout.worker.js", "name": "./src/timeout.worker.js" } ], "failed": false, "errors": 0, "warnings": 0, "reasons": [ { "moduleId": 3, "moduleIdentifier": "D:\\Repos\\worker-loader-example\\src\\timeout.worker.js", "module": "./src/timeout.worker.js", "moduleName": "./src/timeout.worker.js", "type": "cjs require", "userRequest": "lodash", "loc": "1:10-27" } ], "usedExports": true, "providedExports": null, "optimizationBailout": [ "ModuleConcatenation bailout: Module is not an ECMAScript module" ], "depth": 1, "source": "/**\n * @license\n * Lodash \n * Copyright OpenJS 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.20';\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 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|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\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 // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\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 * 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, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\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 stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(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 = safeGet(object, key),\n srcValue = safeGet(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) || 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 if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, 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 (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\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 var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var 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 `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 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 && nativeIsFinite(number)) {\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 // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\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 // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\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 = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\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`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\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 var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\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 * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\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 safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\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 (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\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 * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', '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': 30 },\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', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['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 timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\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 clearTimeout(timerId);\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(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\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 if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\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 (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\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': '